Annotation of embedaddon/rsync/Makefile.in, revision 1.1.1.4
1.1.1.4 ! misho 1: # The Makefile for rsync (configure creates it from Makefile.in).
1.1 misho 2:
3: prefix=@prefix@
4: datarootdir=@datarootdir@
5: exec_prefix=@exec_prefix@
6: bindir=@bindir@
1.1.1.4 ! misho 7: sbindir=@sbindir@
! 8: libdir=@libdir@/rsync
1.1 misho 9: mandir=@mandir@
10:
11: LIBS=@LIBS@
12: CC=@CC@
1.1.1.4 ! misho 13: AWK=@AWK@
1.1 misho 14: CFLAGS=@CFLAGS@
15: CPPFLAGS=@CPPFLAGS@
1.1.1.4 ! misho 16: CXX=@CXX@
! 17: CXXFLAGS=@CXXFLAGS@
1.1 misho 18: EXEEXT=@EXEEXT@
19: LDFLAGS=@LDFLAGS@
1.1.1.4 ! misho 20: LIBSLP=@LIBSLP@
! 21: SLPOBJ=@SLPOBJ@
1.1.1.3 misho 22: LIBOBJDIR=lib/
1.1 misho 23:
24: INSTALLCMD=@INSTALL@
25: INSTALLMAN=@INSTALL@
26:
27: srcdir=@srcdir@
1.1.1.2 misho 28: MKDIR_P=@MKDIR_P@
1.1 misho 29: VPATH=$(srcdir)
30: SHELL=/bin/sh
31:
32: .SUFFIXES:
33: .SUFFIXES: .c .o
34:
1.1.1.4 ! misho 35: SIMD_x86_64=simd-checksum-x86_64.o
! 36: ASM_x86_64=lib/md5-asm-x86_64.o
! 37:
! 38: GENFILES=configure.sh aclocal.m4 config.h.in rsync.1 rsync.1.html \
! 39: rsync-ssl.1 rsync-ssl.1.html rsyncd.conf.5 rsyncd.conf.5.html rsyncdb.1 rsyncdb.1.html
1.1.1.2 misho 40: HEADERS=byteorder.h config.h errcode.h proto.h rsync.h ifuncs.h itypes.h inums.h \
1.1.1.4 ! misho 41: lib/pool_alloc.h lib/mdigest.h lib/md-defines.h version.h
1.1 misho 42: LIBOBJ=lib/wildmatch.o lib/compat.o lib/snprintf.o lib/mdfour.o lib/md5.o \
43: lib/permstring.o lib/pool_alloc.o lib/sysacls.o lib/sysxattrs.o @LIBOBJS@
1.1.1.2 misho 44: zlib_OBJS=zlib/deflate.o zlib/inffast.o zlib/inflate.o zlib/inftrees.o \
1.1 misho 45: zlib/trees.o zlib/zutil.o zlib/adler32.o zlib/compress.o zlib/crc32.o
46: OBJS1=flist.o rsync.o generator.o receiver.o cleanup.o sender.o exclude.o \
1.1.1.2 misho 47: util.o util2.o main.o checksum.o match.o syscall.o log.o backup.o delete.o
1.1 misho 48: OBJS2=options.o io.o compat.o hlink.o token.o uidlist.o socket.o hashtable.o \
1.1.1.4 ! misho 49: usage.o fileio.o batch.o clientname.o chmod.o db.o acls.o xattrs.o
! 50: OBJS3=progress.o pipe.o @ASM@
! 51: DAEMON_OBJ = params.o loadparm.o clientserver.o access.o connection.o authenticate.o $(SLPOBJ)
1.1 misho 52: popt_OBJS=popt/findme.o popt/popt.o popt/poptconfig.o \
53: popt/popthelp.o popt/poptparse.o
1.1.1.4 ! misho 54: OBJS=$(OBJS1) $(OBJS2) $(OBJS3) @SIMD@ $(DAEMON_OBJ) $(LIBOBJ) @BUILD_ZLIB@ @BUILD_POPT@
1.1 misho 55:
1.1.1.4 ! misho 56: TLS_OBJ = tls.o syscall.o util.o util2.o t_stub.o lib/compat.o lib/snprintf.o lib/permstring.o lib/sysxattrs.o lib/wildmatch.o @BUILD_POPT@
1.1 misho 57:
58: # Programs we must have to run the test cases
59: CHECK_PROGS = rsync$(EXEEXT) tls$(EXEEXT) getgroups$(EXEEXT) getfsdev$(EXEEXT) \
1.1.1.2 misho 60: testrun$(EXEEXT) trimslash$(EXEEXT) t_unsafe$(EXEEXT) wildtest$(EXEEXT)
1.1 misho 61:
62: CHECK_SYMLINKS = testsuite/chown-fake.test testsuite/devices-fake.test testsuite/xattrs-hlink.test
63:
64: # Objects for CHECK_PROGS to clean
1.1.1.2 misho 65: CHECK_OBJS=tls.o testrun.o getgroups.o getfsdev.o t_stub.o t_unsafe.o trimslash.o wildtest.o
1.1 misho 66:
67: # note that the -I. is needed to handle config.h when using VPATH
68: .c.o:
69: @OBJ_SAVE@
70: $(CC) -I. -I$(srcdir) $(CFLAGS) $(CPPFLAGS) -c $< @CC_SHOBJ_FLAG@
71: @OBJ_RESTORE@
72:
1.1.1.4 ! misho 73: all: Makefile rsync$(EXEEXT) stunnel-rsyncd.conf @MAKE_MAN@
! 74: .PHONY: all
1.1 misho 75:
1.1.1.4 ! misho 76: .PHONY: install
1.1 misho 77: install: all
1.1.1.4 ! misho 78: -$(MKDIR_P) $(DESTDIR)$(bindir)
! 79: $(INSTALLCMD) $(INSTALL_STRIP) -m 755 rsync$(EXEEXT) $(DESTDIR)$(bindir)
! 80: $(INSTALLCMD) -m 755 $(srcdir)/rsync-ssl $(DESTDIR)$(bindir)
! 81: rsync -ilt rsyncdb$(EXEEXT) $(DESTDIR)$(bindir)/
! 82: -$(MKDIR_P) $(DESTDIR)$(mandir)/man1
! 83: -$(MKDIR_P) $(DESTDIR)$(mandir)/man5
! 84: if test -f rsync.1; then $(INSTALLMAN) -m 644 rsync.1 $(DESTDIR)$(mandir)/man1; fi
! 85: if test -f rsync-ssl.1; then $(INSTALLMAN) -m 644 rsync-ssl.1 $(DESTDIR)$(mandir)/man1; fi
! 86: if test -f rsyncdb.1; then $(INSTALLMAN) -m 644 rsyncdb.1 $(DESTDIR)$(mandir)/man1; fi
! 87: if test -f rsyncd.conf.5; then $(INSTALLMAN) -m 644 rsyncd.conf.5 $(DESTDIR)$(mandir)/man5; fi
1.1.1.2 misho 88:
89: install-ssl-daemon: stunnel-rsyncd.conf
1.1.1.4 ! misho 90: -$(MKDIR_P) $(DESTDIR)/etc/stunnel
! 91: $(INSTALLCMD) -m 644 stunnel-rsyncd.conf $(DESTDIR)/etc/stunnel/rsyncd.conf
1.1.1.2 misho 92: @if ! ls /etc/rsync-ssl/certs/server.* >/dev/null 2>/dev/null; then \
93: echo "Note that you'll need to install the certificate used by /etc/stunnel/rsyncd.conf"; \
94: fi
95:
1.1.1.4 ! misho 96: install-all: install install-ssl-daemon
1.1.1.2 misho 97:
1.1 misho 98: install-strip:
99: $(MAKE) INSTALL_STRIP='-s' install
100:
101: rsync$(EXEEXT): $(OBJS)
1.1.1.4 ! misho 102: $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) $(LIBSLP)
! 103:
! 104: rsyncdb$(EXEEXT): rsync$(EXEEXT)
! 105: ln -s rsync$(EXEEXT) rsyncdb$(EXEEXT)
1.1 misho 106:
107: $(OBJS): $(HEADERS)
108: $(CHECK_OBJS): $(HEADERS)
1.1.1.4 ! misho 109: tls.o xattrs.o: lib/sysxattrs.h
! 110: usage.o: latest-year.h help-rsync.h help-rsyncd.h help-rsyncdb.h git-version.h default-cvsignore.h
! 111: loadparm.o: default-dont-compress.h daemon-parm.h
1.1 misho 112:
113: flist.o: rounding.h
114:
1.1.1.4 ! misho 115: default-cvsignore.h default-dont-compress.h: rsync.1.md define-from-md.awk
! 116: $(AWK) -f $(srcdir)/define-from-md.awk -v hfile=$@ $(srcdir)/rsync.1.md
! 117:
! 118: help-rsync.h help-rsyncd.h: rsync.1.md help-from-md.awk
! 119: $(AWK) -f $(srcdir)/help-from-md.awk -v hfile=$@ $(srcdir)/rsync.1.md
! 120:
! 121: help-rsyncdb.h: rsyncdb.1.md help-from-md.awk
! 122: awk -f $(srcdir)/help-from-md.awk -v hfile=$@ $(srcdir)/rsyncdb.1.md
! 123:
! 124: daemon-parm.h: daemon-parm.txt daemon-parm.awk
! 125: $(AWK) -f $(srcdir)/daemon-parm.awk $(srcdir)/daemon-parm.txt
! 126:
! 127: rounding.h: rounding.c rsync.h proto.h
1.1 misho 128: @for r in 0 1 3; do \
129: if $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o rounding -DEXTRA_ROUNDING=$$r -I. $(srcdir)/rounding.c >rounding.out 2>&1; then \
130: echo "#define EXTRA_ROUNDING $$r" >rounding.h; \
131: if test -f "$$HOME/build_farm/build_test.fns"; then \
132: echo "EXTRA_ROUNDING is $$r" >&2; \
133: fi; \
134: break; \
135: fi; \
136: done
137: @rm -f rounding
138: @if test -f rounding.h; then : ; else \
139: cat rounding.out 1>&2; \
140: echo "Failed to create rounding.h!" 1>&2; \
141: exit 1; \
142: fi
143: @rm -f rounding.out
144:
1.1.1.4 ! misho 145: # While $(wildcard ...) is a GNU make idiom, at least other makes should just turn it into an
! 146: # empty string (we need something that will vanish if we're not building a git checkout).
! 147: # If you want an updated git version w/o GNU make, remove git-version.h after a pull.
! 148: git-version.h: mkgitver $(wildcard $(srcdir)/.git/logs/HEAD)
! 149: $(srcdir)/mkgitver
! 150:
! 151: simd-checksum-x86_64.o: simd-checksum-x86_64.cpp
! 152: @$(srcdir)/cmdormsg disable-simd $(CXX) -I. $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $(srcdir)/simd-checksum-x86_64.cpp
! 153:
! 154: simd-md5-parallel-x86_64.o: simd-md5-parallel-x86_64.cpp
! 155: @$(srcdir)/cmdormsg disable-simd $(CXX) -I. $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $(srcdir)/simd-md5-parallel-x86_64.cpp
! 156:
! 157: lib/md5-asm-x86_64.o: lib/md5-asm-x86_64.S config.h lib/md-defines.h
! 158: @$(srcdir)/cmdormsg disable-asm $(CC) -I. @NOEXECSTACK@ -c -o $@ $(srcdir)/lib/md5-asm-x86_64.S
! 159:
1.1 misho 160: tls$(EXEEXT): $(TLS_OBJ)
161: $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(TLS_OBJ) $(LIBS)
162:
1.1.1.2 misho 163: testrun$(EXEEXT): testrun.o
164: $(CC) $(CFLAGS) $(LDFLAGS) -o $@ testrun.o
165:
1.1 misho 166: getgroups$(EXEEXT): getgroups.o
167: $(CC) $(CFLAGS) $(LDFLAGS) -o $@ getgroups.o $(LIBS)
168:
169: getfsdev$(EXEEXT): getfsdev.o
170: $(CC) $(CFLAGS) $(LDFLAGS) -o $@ getfsdev.o $(LIBS)
171:
1.1.1.4 ! misho 172: TRIMSLASH_OBJ = trimslash.o syscall.o util.o util2.o t_stub.o lib/compat.o lib/snprintf.o lib/wildmatch.o
1.1 misho 173: trimslash$(EXEEXT): $(TRIMSLASH_OBJ)
174: $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(TRIMSLASH_OBJ) $(LIBS)
175:
1.1.1.2 misho 176: T_UNSAFE_OBJ = t_unsafe.o syscall.o util.o util2.o t_stub.o lib/compat.o lib/snprintf.o lib/wildmatch.o
1.1 misho 177: t_unsafe$(EXEEXT): $(T_UNSAFE_OBJ)
178: $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(T_UNSAFE_OBJ) $(LIBS)
179:
1.1.1.4 ! misho 180: .PHONY: conf
! 181: conf: configure.sh config.h.in
! 182:
! 183: .PHONY: gen
1.1 misho 184: gen: conf proto.h man
185:
1.1.1.4 ! misho 186: .PHONY: gensend
1.1 misho 187: gensend: gen
1.1.1.4 ! misho 188: rsync -aic $(GENFILES) $${SAMBA_HOST-samba.org}:/home/ftp/pub/rsync/generated-files/
1.1 misho 189:
1.1.1.3 misho 190: aclocal.m4: $(srcdir)/m4/*.m4
191: aclocal -I $(srcdir)/m4
192:
1.1 misho 193: configure.sh config.h.in: configure.ac aclocal.m4
194: @if test -f configure.sh; then cp -p configure.sh configure.sh.old; else touch configure.sh.old; fi
195: @if test -f config.h.in; then cp -p config.h.in config.h.in.old; else touch config.h.in.old; fi
196: autoconf -o configure.sh
197: autoheader && touch config.h.in
198: @if diff configure.sh configure.sh.old >/dev/null 2>&1; then \
199: echo "configure.sh is unchanged."; \
200: rm configure.sh.old; \
201: else \
202: echo "configure.sh has CHANGED."; \
203: fi
204: @if diff config.h.in config.h.in.old >/dev/null 2>&1; then \
205: echo "config.h.in is unchanged."; \
206: rm config.h.in.old; \
207: else \
208: echo "config.h.in has CHANGED."; \
209: fi
210: @if test -f configure.sh.old -o -f config.h.in.old; then \
211: if test "$(MAKECMDGOALS)" = reconfigure; then \
212: echo 'Continuing with "make reconfigure".'; \
213: else \
214: echo 'You may need to run:'; \
215: echo ' make reconfigure'; \
216: exit 1; \
217: fi \
218: fi
219:
1.1.1.4 ! misho 220: .PHONY: reconfigure
1.1 misho 221: reconfigure: configure.sh
222: ./config.status --recheck
223: ./config.status
224:
1.1.1.4 ! misho 225: .PHONY: restatus
! 226: restatus:
! 227: ./config.status
! 228:
1.1 misho 229: Makefile: Makefile.in config.status configure.sh config.h.in
230: @if test -f Makefile; then cp -p Makefile Makefile.old; else touch Makefile.old; fi
231: @./config.status
232: @if diff Makefile Makefile.old >/dev/null 2>&1; then \
233: echo "Makefile is unchanged."; \
234: rm Makefile.old; \
235: else \
236: if test "$(MAKECMDGOALS)" = reconfigure; then \
237: echo 'Continuing with "make reconfigure".'; \
238: else \
239: echo "Makefile updated -- rerun your make command."; \
240: exit 1; \
241: fi \
242: fi
243:
1.1.1.2 misho 244: stunnel-rsyncd.conf: $(srcdir)/stunnel-rsyncd.conf.in Makefile
245: sed 's;\@bindir\@;$(bindir);g' <$(srcdir)/stunnel-rsyncd.conf.in >stunnel-rsyncd.conf
246:
1.1.1.4 ! misho 247: .PHONY: proto
1.1 misho 248: proto: proto.h-tstamp
249:
250: proto.h: proto.h-tstamp
251: @if test -f proto.h; then :; else cp -p $(srcdir)/proto.h .; fi
252:
1.1.1.4 ! misho 253: proto.h-tstamp: $(srcdir)/*.c $(srcdir)/lib/compat.c daemon-parm.h
! 254: $(AWK) -f $(srcdir)/mkproto.awk $(srcdir)/*.c $(srcdir)/lib/compat.c daemon-parm.h
1.1 misho 255:
1.1.1.4 ! misho 256: .PHONY: man
! 257: man: rsync.1 rsync-ssl.1 rsyncd.conf.5 rsyncdb.1
1.1.1.2 misho 258:
1.1.1.4 ! misho 259: rsync.1: rsync.1.md md2man version.h Makefile
! 260: @$(srcdir)/maybe-make-man $(srcdir) rsync.1.md
1.1 misho 261:
1.1.1.4 ! misho 262: rsync-ssl.1: rsync-ssl.1.md md2man version.h Makefile
! 263: @$(srcdir)/maybe-make-man $(srcdir) rsync-ssl.1.md
! 264:
! 265: rsyncd.conf.5: rsyncd.conf.5.md md2man version.h Makefile
! 266: @$(srcdir)/maybe-make-man $(srcdir) rsyncd.conf.5.md
! 267:
! 268: rsyncdb.1: rsyncdb.1.md md2man NEWS.md Makefile
! 269: @$(srcdir)/maybe-make-man $(srcdir) rsyncdb.1.md
! 270:
! 271: .PHONY: clean
1.1 misho 272: clean: cleantests
1.1.1.4 ! misho 273: rm -f *~ $(OBJS) $(CHECK_PROGS) $(CHECK_OBJS) $(CHECK_SYMLINKS) rsyncdb$(EXEEXT) \
! 274: rounding rounding.h *.old rsync*.1 rsync*.5 rsync*.html \
! 275: daemon-parm.h help-*.h default-*.h proto.h proto.h-tstamp
1.1 misho 276:
1.1.1.4 ! misho 277: .PHONY: cleantests
1.1 misho 278: cleantests:
279: rm -rf ./testtmp*
280:
281: # We try to delete built files from both the source and build
282: # directories, just in case somebody previously configured things in
283: # the source directory.
1.1.1.4 ! misho 284: .PHONY: distclean
1.1 misho 285: distclean: clean
1.1.1.4 ! misho 286: for dir in $(srcdir) . ; do \
! 287: (cd "$$dir" && rm -rf Makefile config.h config.status stunnel-rsyncd.conf \
! 288: lib/dummy popt/dummy zlib/dummy config.cache config.log shconfig \
! 289: $(GENFILES) autom4te.cache) ; \
! 290: done
1.1 misho 291:
292: # this target is really just for my use. It only works on a limited
293: # range of machines and is used to produce a list of potentially
294: # dead (ie. unused) functions in the code. (tridge)
1.1.1.4 ! misho 295: .PHONY: finddead
1.1 misho 296: finddead:
297: nm *.o */*.o |grep 'U ' | awk '{print $$2}' | sort -u > nmused.txt
298: nm *.o */*.o |grep 'T ' | awk '{print $$3}' | sort -u > nmfns.txt
299: comm -13 nmused.txt nmfns.txt
1.1.1.4 ! misho 300: @rm nmused.txt nmfns.txt
1.1 misho 301:
302: # 'check' is the GNU name, 'test' is the name for everybody else :-)
1.1.1.4 ! misho 303: .PHONY: test
1.1 misho 304: test: check
305:
306: # There seems to be no standard way to specify some variables as
307: # exported from a Makefile apart from listing them like this.
308:
309: # This depends on building rsync; if we need any helper programs it
310: # should depend on them too.
311:
312: # We try to run the scripts with POSIX mode on, in the hope that will
313: # catch Bash-isms earlier even if we're running on GNU. Of course, we
314: # might lose in the future where POSIX diverges from old sh.
315:
1.1.1.4 ! misho 316: .PHONY: check
1.1 misho 317: check: all $(CHECK_PROGS) $(CHECK_SYMLINKS)
318: rsync_bin=`pwd`/rsync$(EXEEXT) $(srcdir)/runtests.sh
319:
1.1.1.4 ! misho 320: .PHONY: check29
1.1 misho 321: check29: all $(CHECK_PROGS) $(CHECK_SYMLINKS)
322: rsync_bin=`pwd`/rsync$(EXEEXT) $(srcdir)/runtests.sh --protocol=29
323:
1.1.1.4 ! misho 324: .PHONY: check30
1.1.1.2 misho 325: check30: all $(CHECK_PROGS) $(CHECK_SYMLINKS)
326: rsync_bin=`pwd`/rsync$(EXEEXT) $(srcdir)/runtests.sh --protocol=30
327:
1.1.1.4 ! misho 328: wildtest.o: wildtest.c t_stub.o lib/wildmatch.c rsync.h config.h
1.1 misho 329: wildtest$(EXEEXT): wildtest.o lib/compat.o lib/snprintf.o @BUILD_POPT@
330: $(CC) $(CFLAGS) $(LDFLAGS) -o $@ wildtest.o lib/compat.o lib/snprintf.o @BUILD_POPT@ $(LIBS)
331:
332: testsuite/chown-fake.test:
333: ln -s chown.test $(srcdir)/testsuite/chown-fake.test
334:
335: testsuite/devices-fake.test:
336: ln -s devices.test $(srcdir)/testsuite/devices-fake.test
337:
338: testsuite/xattrs-hlink.test:
339: ln -s xattrs.test $(srcdir)/testsuite/xattrs-hlink.test
340:
341: # This does *not* depend on building or installing: you can use it to
342: # check a version installed from a binary or some other source tree,
343: # if you want.
344:
1.1.1.4 ! misho 345: .PHONY: installcheck
1.1 misho 346: installcheck: $(CHECK_PROGS) $(CHECK_SYMLINKS)
347: POSIXLY_CORRECT=1 TOOLDIR=`pwd` rsync_bin="$(bindir)/rsync$(EXEEXT)" srcdir="$(srcdir)" $(srcdir)/runtests.sh
348:
349: # TODO: Add 'dist' target; need to know which files will be included
350:
351: # Run the SPLINT (Secure Programming Lint) tool. <www.splint.org>
352: .PHONY: splint
353: splint:
354: splint +unixlib +gnuextensions -weak rsync.c
355:
1.1.1.4 ! misho 356: .PHONY: doxygen
1.1 misho 357: doxygen:
358: cd $(srcdir) && rm dox/html/* && doxygen
359:
360: # for maintainers only
1.1.1.4 ! misho 361: .PHONY: doxygen-upload
1.1 misho 362: doxygen-upload:
363: rsync -avzv $(srcdir)/dox/html/ --delete \
1.1.1.3 misho 364: $${SAMBA_HOST-samba.org}:/home/httpd/html/rsync/doxygen/head/
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>