File: GNUmakefile.in

package info (click to toggle)
rdup 0.6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 784 kB
  • ctags: 108
  • sloc: sh: 3,225; ansic: 1,624; perl: 565; makefile: 65
file content (90 lines) | stat: -rw-r--r-- 2,746 bytes parent folder | download
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
OBJ=crawler.o rdup.o gfunc.o getdelim.o signal.o usage.o sha1.o regexp.o xattr.o abspath.o link.o
HDR=rdup.h
CMD=rdup
SHA_IN=shared.sh shared.pl
WRP_IN=rdup-restore rdup-snap-link rdup-simple
PRL_IN=rdup-gzip rdup-crypt rdup-snap rdup-gpg rdup-hist
MAN1_IN=rdup.1 rdup-restore.1 rdup-snap.1 rdup-backups.1 rdup-snap-link.1 rdup-simple.1 rdup-crypt.1 rdup-gzip.1 rdup-gpg.1 rdup-hist.1

SHA=$(addprefix shared/, $(SHA_IN))
PRL=$(addprefix pl-tools/, $(PRL_IN))
WRP=$(addprefix sh-wrapper/, $(WRP_IN))
MAN1=$(addprefix doc/, $(MAN1_IN))

prefix=@prefix@
exec_prefix=@exec_prefix@
datarootdir=@datarootdir@
localedir=@localedir@
bindir=@bindir@
sbindir=@sbindir@
mandir=@mandir@
sysconfdir=@sysconfdir@
datadir=@datadir@/rdup

GCC=@CC@
GLIB_CFLAGS=@GLIB_CFLAGS@
GLIB_LIBS=@GLIB_LIBS@
LIBS=@LIBS@
DRACE=-D_DEBUG_RACE
CFLAGS=-Wall -W -Werror @CFLAGS@ @DEFS@ -DLOCALEROOTDIR=\"@localedir@\" -Os -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -Wpointer-arith -Wstrict-prototypes
#CFLAGS=-Wall -W @CFLAGS@ @DEFS@ -Os $(DRACE) -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -Wpointer-arith -Wstrict-prototypes
INSTALL=./install-sh -c
INSTALL_DATA=$(INSTALL) -m 644

.PHONY:	all clean install all uninstall

%.o:    %.c ${HDR}
	${GCC} ${CFLAGS} ${GLIB_CFLAGS} -c $<

all:	rdup scripts

rdup:	${OBJ} ${HDR} 
	${GCC} ${GLIB_LIBS} ${OBJ} -o rdup

scripts:
	chmod +x $(RES) $(PRL) $(WRP)

po:	rdup.pot 
	( cd po ; make -f GNUmakefile all )

rdup.pot:
	xgettext --omit-header -k_ -d rdup -s -o rdup.pot *.c 
	xgettext -j -Lperl -kget -d rdup -s -o rdup.pot pl-tools/*.in

clean:
	rm -f *.o
	rm -f rdup rdup.mo
	( 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*.tar.bz2
	rm -f rdup*.tar.bz2.sha1
	rm -f ${MAN1}
	rm -f ${PRL}
	rm -f ${WRP}
	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 ${WRP}; do ${INSTALL} $$i ${DESTDIR}${bindir}/`basename $$i` ; done
	for i in ${PRL}; do ${INSTALL} $$i ${DESTDIR}${bindir}/`basename $$i` ; done
	for i in ${SHA}; do ${INSTALL_DATA} $$i ${DESTDIR}${datadir}/`basename $$i` ; done
	for i in ${MAN1}; do [ -f $$i ] &&  ${INSTALL_DATA} $$i ${DESTDIR}${mandir}/man1/`basename $$i` ; done; exit 0
	make -C po install

uninstall:
	for i in ${CMD}; do rm -f ${DESTDIR}${bindir}/$$i ; done
	for i in ${WRP}; do rm -f ${DESTDIR}${bindir}/`basename $$i` ; done
	for i in ${PRL}; do rm -f ${DESTDIR}${bindir}/`basename $$i` ; done
	for i in ${SHA}; do rm -f ${DESTDIR}${datadir}/`basename $$i` ; done
	for i in ${MAN1}; do rm -f  ${DESTDIR}${mandir}/man1/`basename $$i` ; done
	make -C po uninstall