SIMD_x86_64=simd-checksum-x86_64.o
ASM_x86_64=lib/md5-asm-x86_64.o
-GENFILES=configure.sh aclocal.m4 config.h.in proto.h proto.h-tstamp rsync.1 rsync.1.html \
+GENFILES=configure.sh aclocal.m4 config.h.in rsync.1 rsync.1.html \
rsync-ssl.1 rsync-ssl.1.html rsyncd.conf.5 rsyncd.conf.5.html
HEADERS=byteorder.h config.h errcode.h proto.h rsync.h ifuncs.h itypes.h inums.h \
lib/pool_alloc.h lib/mdigest.h lib/md-defines.h version.h
OBJS1=flist.o rsync.o generator.o receiver.o cleanup.o sender.o exclude.o \
util.o util2.o main.o checksum.o match.o syscall.o log.o backup.o delete.o
OBJS2=options.o io.o compat.o hlink.o token.o uidlist.o socket.o hashtable.o \
- fileio.o batch.o clientname.o chmod.o acls.o xattrs.o
+ usage.o fileio.o batch.o clientname.o chmod.o acls.o xattrs.o
OBJS3=progress.o pipe.o @ASM@
DAEMON_OBJ = params.o loadparm.o clientserver.o access.o connection.o authenticate.o
popt_OBJS=popt/findme.o popt/popt.o popt/poptconfig.o \
$(CC) -I. -I$(srcdir) $(CFLAGS) $(CPPFLAGS) -c $< @CC_SHOBJ_FLAG@
@OBJ_RESTORE@
-.PHONY: all
all: Makefile rsync$(EXEEXT) stunnel-rsyncd.conf @MAKE_MAN@
+.PHONY: all
.PHONY: install
install: all
$(OBJS): $(HEADERS)
$(CHECK_OBJS): $(HEADERS)
tls.o xattrs.o: lib/sysxattrs.h
-options.o: latest-year.h help-rsync.h help-rsyncd.h
-exclude.o: default-cvsignore.h
+usage.o: latest-year.h help-rsync.h help-rsyncd.h git-version.h default-cvsignore.h
loadparm.o: default-dont-compress.h daemon-parm.h
flist.o: rounding.h
fi
@rm -f rounding.out
+# While $(wildcard ...) is a GNU make idiom, at least other makes should just turn it into an
+# empty string (we need something that will vanish if we're not building a git checkout).
+# If you want an updated git version w/o GNU make, remove git-version.h after a pull.
+git-version.h: mkgitver $(wildcard $(srcdir)/.git/logs/HEAD)
+ $(srcdir)/mkgitver
+
simd-checksum-x86_64.o: simd-checksum-x86_64.cpp
@$(srcdir)/cmdormsg disable-simd $(CXX) -I. $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $(srcdir)/simd-checksum-x86_64.cpp
proto.h: proto.h-tstamp
@if test -f proto.h; then :; else cp -p $(srcdir)/proto.h .; fi
-proto.h-tstamp: $(srcdir)/*.c $(srcdir)/lib/compat.c config.h daemon-parm.h
+proto.h-tstamp: $(srcdir)/*.c $(srcdir)/lib/compat.c daemon-parm.h
$(AWK) -f $(srcdir)/mkproto.awk $(srcdir)/*.c $(srcdir)/lib/compat.c daemon-parm.h
.PHONY: man
clean: cleantests
rm -f *~ $(OBJS) $(CHECK_PROGS) $(CHECK_OBJS) $(CHECK_SYMLINKS) \
rounding rounding.h *.old rsync*.1 rsync*.5 rsync*.html \
- daemon-parm.h help-*.h default-*.h
+ daemon-parm.h help-*.h default-*.h proto.h proto.h-tstamp
.PHONY: cleantests
cleantests:
# the source directory.
.PHONY: distclean
distclean: clean
- rm -f Makefile config.h config.status
- rm -f stunnel-rsyncd.conf
- rm -f lib/dummy popt/dummy zlib/dummy
- rm -f $(srcdir)/Makefile $(srcdir)/config.h $(srcdir)/config.status
- rm -f $(srcdir)/lib/dummy $(srcdir)/popt/dummy $(srcdir)/zlib/dummy
- rm -f config.cache config.log
- rm -f $(srcdir)/config.cache $(srcdir)/config.log
- rm -f shconfig $(srcdir)/shconfig
- rm -f $(GENFILES)
- rm -rf autom4te.cache
+ for dir in $(srcdir) . ; do \
+ (cd "$$dir" && rm -rf Makefile config.h config.status stunnel-rsyncd.conf \
+ lib/dummy popt/dummy zlib/dummy config.cache config.log shconfig \
+ $(GENFILES) autom4te.cache) ; \
+ done
# this target is really just for my use. It only works on a limited
# range of machines and is used to produce a list of potentially
nm *.o */*.o |grep 'U ' | awk '{print $$2}' | sort -u > nmused.txt
nm *.o */*.o |grep 'T ' | awk '{print $$3}' | sort -u > nmfns.txt
comm -13 nmused.txt nmfns.txt
+ @rm nmused.txt nmfns.txt
# 'check' is the GNU name, 'test' is the name for everybody else :-)
.PHONY: test
# catch Bash-isms earlier even if we're running on GNU. Of course, we
# might lose in the future where POSIX diverges from old sh.
-.PHONY: check strict_check
-check strict_check: all $(CHECK_PROGS) $(CHECK_SYMLINKS)
- rsync_bin=`pwd`/rsync$(EXEEXT) $(srcdir)/runtests.sh $@
+.PHONY: check
+check: all $(CHECK_PROGS) $(CHECK_SYMLINKS)
+ rsync_bin=`pwd`/rsync$(EXEEXT) $(srcdir)/runtests.sh
-.PHONY: check29 strict_check29
-check29 strict_check29: all $(CHECK_PROGS) $(CHECK_SYMLINKS)
- rsync_bin=`pwd`/rsync$(EXEEXT) $(srcdir)/runtests.sh $@ --protocol=29
+.PHONY: check29
+check29: all $(CHECK_PROGS) $(CHECK_SYMLINKS)
+ rsync_bin=`pwd`/rsync$(EXEEXT) $(srcdir)/runtests.sh --protocol=29
-.PHONY: check30 strict_check30
-check30 strict_check30: all $(CHECK_PROGS) $(CHECK_SYMLINKS)
- rsync_bin=`pwd`/rsync$(EXEEXT) $(srcdir)/runtests.sh $@ --protocol=30
+.PHONY: check30
+check30: all $(CHECK_PROGS) $(CHECK_SYMLINKS)
+ rsync_bin=`pwd`/rsync$(EXEEXT) $(srcdir)/runtests.sh --protocol=30
wildtest.o: wildtest.c t_stub.o lib/wildmatch.c rsync.h config.h
wildtest$(EXEEXT): wildtest.o lib/compat.o lib/snprintf.o @BUILD_POPT@