forked from miekg/rdup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
GNUmakefile.in
117 lines (97 loc) · 3.27 KB
/
GNUmakefile.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
OBJ=crawler.o rdup.o gfunc.o getdelim.o signal.o usage.o sha1.o regexp.o abspath.o link.o reverse.o protocol.o msg.o common.o names.o child.o chown.o
OBJ_TR=rdup-tr.o signal.o getdelim.o usage-tr.o entry.o link.o protocol.o msg.o crypt.o base64.o common.o
OBJ_UP=rdup-up.o entry.o usage-up.o signal.o link.o getdelim.o abspath.o rm.o fs-up.o mkpath.o protocol.o msg.o dir.o common.o strippath.o names.o chown.o
HDR=rdup.h rdup-tr.h rdup-up.h io.h common.h entry.h
CMD=rdup rdup-tr rdup-up
SH=rdup-simple
MAN1_IN=rdup.1 rdup-tr.1 rdup-up.1 rdup-simple.1
MAN7_IN=rdup-backups.7
MAN1=$(addprefix doc/, $(MAN1_IN))
MAN7=$(addprefix doc/, $(MAN7_IN))
prefix=@prefix@
exec_prefix=@exec_prefix@
datarootdir=@datarootdir@
localedir=@localedir@
bindir=@bindir@
libdir=@libdir@
sbindir=@sbindir@
mandir=@mandir@
sysconfdir=@sysconfdir@
datadir=@datadir@/rdup
ARCHIVE_L=@ARCHIVE_L@
NETTLE_L=@NETTLE_L@
GCC=@CC@
GLIB_CFLAGS=@GLIB_CFLAGS@
GLIB_LIBS=@GLIB_LIBS@
LIBS=@LIBS@
DEBUG=@DEBUG@
CFLAGS=-Wall -W -Werror @CFLAGS@ @DEFS@ -DLOCALEROOTDIR=\"@localedir@\" -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -Os -Wpointer-arith -Wstrict-prototypes
INSTALL=./install-sh -c
INSTALL_DATA=$(INSTALL) -m 644
.PHONY: all clean install all uninstall strip
%.o: %.c ${HDR}
${GCC} ${CFLAGS} ${GLIB_CFLAGS} -c $<
ifeq (${ARCHIVE_L},no)
all: rdup rdup-up
@echo "WARNING: ** No archive library found; not building rdup-tr"
else
all: rdup rdup-up rdup-tr
endif
@chmod +x ${SH}
@if [ "${NETTLE_L}" = "no" ]; then echo "WARNING: ** No nettle library found; rdup-tr has no encryption"; fi
rdup-up: $(OBJ_UP) $(HDR)
${GCC} ${OBJ_UP} ${GLIB_LIBS} ${LDFLAGS} ${LIBS} -o rdup-up
rdup-tr: $(OBJ_TR) $(HDR)
${GCC} ${OBJ_TR} ${GLIB_LIBS} ${LDFLAGS} ${LIBS} -o rdup-tr
rdup: ${OBJ} ${HDR}
${GCC} ${OBJ} ${GLIB_LIBS} ${LDFLAGS} ${LIBS} -o rdup
ifeq (${ARCHIVE_L},no)
strip:
strip rdup rdup-up
else
strip:
strip rdup rdup-tr rdup-up
endif
po: rdup.pot
( cd po ; $(MAKE) -f GNUmakefile all )
rdup.pot: ${OBJ} ${OBJ_TR} ${OBJ_UP}
xgettext --omit-header -k_ -d rdup -s -o rdup.pot *.c
TAGS: *.[ch]
ctags *.[ch]
clean:
rm -f *.o
rm -f rdup.mo ${CMD}
( cd po ; $(MAKE) -f GNUmakefile clean )
realclean: clean
rm -rf autom4te.cache
rm -f config.log
rm -f config.status
rm -f config.h
rm -f rdup.h
rm -f rdup-tr.h
rm -f rdup-up.h
rm -f rdup*.tar.bz2
rm -f rdup*.tar.bz2.sha1
rm -f ${MAN1}
$(MAKE) -C po realclean
distclean:
install: all
mkdir -p ${DESTDIR}${mandir}/man1
# mkdir -p ${DESTDIR}${datadir}
for i in ${CMD}; do ${INSTALL} $$i ${DESTDIR}${bindir}/$$i ; done
for i in ${SH}; do ${INSTALL} $$i ${DESTDIR}${bindir}/$$i ; done
for i in ${MAN1}; do [ -f $$i ] && ${INSTALL_DATA} $$i ${DESTDIR}${mandir}/man1/`basename $$i` ; done; exit 0
for i in ${MAN7}; do [ -f $$i ] && ${INSTALL_DATA} $$i ${DESTDIR}${mandir}/man7/`basename $$i` ; done; exit 0
$(MAKE) -C po install
install-strip: all strip install
uninstall:
for i in ${CMD}; do rm -f ${DESTDIR}${bindir}/$$i ; done
for i in ${SH}; do rm -f ${DESTDIR}${bindir}/$$i ; done
for i in ${MAN1}; do rm -f ${DESTDIR}${mandir}/man1/`basename $$i` ; done
for i in ${MAN7}; do rm -f ${DESTDIR}${mandir}/man7/`basename $$i` ; done
$(MAKE) -C po uninstall
check: all
@[ -d testlogs ] || mkdir testlogs
@chmod +x testsuite/rdup/rdup*helper
runtest
@chmod -x testlogs/rdup.log