Add an "unsafe" symlink to the symlink test case so we can see what happens.
[rsync/rsync.git] / Makefile.in
... / ...
CommitLineData
1# Makefile for rsync. This is processed by configure to produce the final
2# Makefile
3
4prefix=@prefix@
5exec_prefix=@exec_prefix@
6bindir=@bindir@
7mandir=@mandir@
8
9LIBS=@LIBS@
10CC=@CC@
11CFLAGS=@CFLAGS@
12LDFLAGS=@LDFLAGS@
13
14INSTALLCMD=@INSTALL@
15
16srcdir=@srcdir@
17VPATH=$(srcdir)
18SHELL=/bin/sh
19
20VERSION=@VERSION@
21
22.SUFFIXES:
23.SUFFIXES: .c .o
24
25LIBOBJ=lib/fnmatch.o lib/compat.o lib/snprintf.o lib/mdfour.o \
26 lib/permstring.o \
27 @LIBOBJS@
28ZLIBOBJ=zlib/deflate.o zlib/infblock.o zlib/infcodes.o zlib/inffast.o \
29 zlib/inflate.o zlib/inftrees.o zlib/infutil.o zlib/trees.o \
30 zlib/zutil.o zlib/adler32.o
31OBJS1=rsync.o generator.o receiver.o cleanup.o sender.o exclude.o util.o main.o checksum.o match.o syscall.o log.o backup.o
32OBJS2=options.o flist.o io.o compat.o hlink.o token.o uidlist.o socket.o fileio.o batch.o
33DAEMON_OBJ = params.o loadparm.o clientserver.o access.o connection.o authenticate.o
34popt_OBJS=popt/findme.o popt/popt.o popt/poptconfig.o \
35 popt/popthelp.o popt/poptparse.o
36OBJS=$(OBJS1) $(OBJS2) $(DAEMON_OBJ) $(LIBOBJ) $(ZLIBOBJ) @BUILD_POPT@
37
38tls_OBJ = tls.o syscall.o lib/permstring.o
39
40# Programs we must have to run the test cases
41CHECK_PROGS = rsync tls
42
43# note that the -I. is needed to handle config.h when using VPATH
44.c.o:
45@OBJ_SAVE@
46 $(CC) -I. -I$(srcdir) $(CFLAGS) -c $< @CC_SHOBJ_FLAG@
47@OBJ_RESTORE@
48
49all: rsync
50
51man: rsync.1 rsyncd.conf.5
52
53install: all
54 -mkdir -p ${bindir}
55 ${INSTALLCMD} -m 755 rsync ${bindir}
56 -mkdir -p ${mandir}/man1
57 -mkdir -p ${mandir}/man5
58 ${INSTALLCMD} -m 644 $(srcdir)/rsync.1 ${mandir}/man1
59 ${INSTALLCMD} -m 644 $(srcdir)/rsyncd.conf.5 ${mandir}/man5
60
61install-strip:
62 $(MAKE) INSTALLCMD='$(INSTALLCMD) -s' install
63
64rsync: $(OBJS)
65 @echo "Please ignore warnings below about mktemp -- it is used in a safe way"
66 $(CC) $(CFLAGS) $(LDFLAGS) -o rsync $(OBJS) $(LIBS)
67
68$(OBJS): config.h
69
70tls: $(tls_OBJ)
71 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(tls_OBJ) $(LIBS)
72
73Makefile: Makefile.in configure config.status
74 echo "WARNING: You need to run ./config.status --recheck"
75
76# don't actually run autoconf, just issue a warning
77configure: configure.in
78 echo "WARNING: you need to rerun autoconf"
79
80rsync.1: rsync.yo
81 yodl2man -o rsync.1 rsync.yo
82
83rsyncd.conf.5: rsyncd.conf.yo
84 yodl2man -o rsyncd.conf.5 rsyncd.conf.yo
85
86proto:
87 cat *.c lib/compat.c | awk -f mkproto.awk > proto.h
88
89clean:
90 rm -f *~ $(OBJS) rsync $(TLS_OBJ) tls
91 rm -rf ./testtmp
92 rm -f config.cache
93
94distclean: clean
95 rm -f Makefile config.h config.status
96
97# this target is really just for my use. It only works on a limited
98# range of machines and is used to produce a list of potentially
99# dead (ie. unused) functions in the code. (tridge)
100finddead:
101 nm *.o */*.o |grep 'U ' | awk '{print $$2}' | sort -u > nmused.txt
102 nm *.o */*.o |grep 'T ' | awk '{print $$3}' | sort -u > nmfns.txt
103 comm -13 nmused.txt nmfns.txt
104
105# 'check' is the GNU name, 'test' is the name for everybody else :-)
106.PHONY: check test
107
108test: check
109
110
111# There seems to be no standard way to specify some variables as
112# exported from a Makefile apart from listing them like this.
113
114# TODO: Tests that depend on built test aide programs like tls need to
115# know where the build directory is.
116
117# This depends on building rsync; if we need any helper programs it
118# should depend on them too.
119
120# We try to run the scripts with POSIX mode on, in the hope that will
121# catch Bash-isms earlier even if we're running on GNU. Of course, we
122# might lose in the future where POSIX diverges from old sh.
123
124check: all $(CHECK_PROGS)
125 POSIXLY_CORRECT=1 TLS=`pwd`/tls rsync_bin=`pwd`/rsync srcdir="$(srcdir)" $(srcdir)/runtests.sh
126
127# This does *not* depend on building or installing: you can use it to
128# check a version installed from a binary or some other source tree,
129# if you want.
130
131installcheck: $(CHECK_PROGS)
132 POSIXLY_CORRECT=1 TLS=`pwd`/tls rsync_bin="$(bindir)/rsync" srcdir="$(srcdir)" $(srcdir)/runtests.sh
133
134# TODO: Add 'dist' target; need to know which files will be included