fetch: never unpack git fetch packs
[girocco.git] / src / GNUmakefile
blobb084155946d9e7df4268336781d779e8d10bf5ac
1 CC ?= cc
2 CFLAGS ?= -O
4 .PHONY : all clean install FORCE
6 all : can_user_push can_user_push_http getent get_user_uuid peek_packet rangecgi throttle list_packs
8 clean :
9 rm -rf can_user_push.o* can_user_push.d* can_user_push
10 rm -rf can_user_push_http.o* can_user_push_http.d* can_user_push_http
11 rm -rf getent.o* getent.d* getent
12 rm -rf get_user_uuid.o* get_user_uuid.d* get_user_uuid
13 rm -rf peek_packet.o* peek_packet.d* peek_packet
14 rm -rf rangecgi.o* rangecgi.d* rangecgi
15 rm -rf throttle.o* throttle.d* throttle
16 rm -rf list_packs.o* list_packs.d* list_packs.inc list_packs
17 rm -f GROUP-FILE PASSWD-FILE SOCKET-FILE
19 install :
21 TRACK_GROUP_FILE := $(shell cd .. && . ./shlib.sh && echo "$$cfg_chroot/etc/group")
22 export TRACK_GROUP_FILE
23 TRACK_PASSWD_FILE := $(shell cd .. && . ./shlib.sh && echo "$$cfg_chroot/etc/passwd")
24 export TRACK_PASSWD_FILE
25 TRACK_SOCKET_FILE := $(shell cd .. && . ./shlib.sh && echo "$$cfg_chroot/etc/taskd.socket")
26 export TRACK_SOCKET_FILE
28 GROUP-FILE: FORCE
29 @if test x"$$TRACK_GROUP_FILE" != x"`cat GROUP-FILE 2>/dev/null`"; then \
30 echo "* new group file location"; \
31 echo "$$TRACK_GROUP_FILE" >GROUP-FILE; \
34 PASSWD-FILE: FORCE
35 @if test x"$$TRACK_PASSWD_FILE" != x"`cat PASSWD-FILE 2>/dev/null`"; then \
36 echo "* new passwd file location"; \
37 echo "$$TRACK_PASSWD_FILE" >PASSWD-FILE; \
40 SOCKET-FILE: FORCE
41 @if test x"$$TRACK_SOCKET_FILE" != x"`cat SOCKET-FILE 2>/dev/null`"; then \
42 echo "* new taskd.pl socket file location"; \
43 echo "$$TRACK_SOCKET_FILE" >SOCKET-FILE; \
46 can_user_push : can_user_push.c
47 $(CC) -o $@ $(CFLAGS) $?
49 can_user_push_http : can_user_push_http.c GROUP-FILE
50 $(CC) -o $@ $(CFLAGS) -D"GROUP_FILE=\"$(TRACK_GROUP_FILE)\"" can_user_push_http.c
52 getent : getent.c
53 $(CC) -o $@ $(CFLAGS) $?
55 get_user_uuid : get_user_uuid.c PASSWD-FILE
56 $(CC) -o $@ $(CFLAGS) -D"PASSWD_FILE=\"$(TRACK_PASSWD_FILE)\"" get_user_uuid.c
58 peek_packet : peek_packet.c
59 $(CC) -o $@ $(CFLAGS) peek_packet.c
61 rangecgi : rangecgi.c
62 $(CC) -o $@ $(CFLAGS) rangecgi.c
64 throttle : throttle.c SOCKET-FILE
65 $(CC) -o $@ $(CFLAGS) -D"SOCKET_FILE=\"$(TRACK_SOCKET_FILE)\"" throttle.c
67 list_packs.inc : list_packs.txt
68 sed -e 's/\([\\"]\)/\\\1/g;s/^/"/;s/$$/\\n"/' $< >$@
70 list_packs : list_packs.c list_packs.inc
71 $(CC) -o $@ $(CFLAGS) list_packs.c