Tweaked a sentence in the --size-only section.
[rsync/rsync.git] / Makefile.in
... / ...
CommitLineData
1# Makefile for rsync. This is processed by configure to produce the final
2# Makefile
3
4prefix=@prefix@
5datarootdir=@datarootdir@
6exec_prefix=@exec_prefix@
7bindir=@bindir@
8mandir=@mandir@
9
10LIBS=@LIBS@
11CC=@CC@
12CFLAGS=@CFLAGS@
13CPPFLAGS=@CPPFLAGS@
14EXEEXT=@EXEEXT@
15LDFLAGS=@LDFLAGS@
16
17INSTALLCMD=@INSTALL@
18INSTALLMAN=@INSTALL@
19
20srcdir=@srcdir@
21VPATH=$(srcdir)
22SHELL=/bin/sh
23
24VERSION=@VERSION@
25
26.SUFFIXES:
27.SUFFIXES: .c .o
28
29HEADERS=byteorder.h config.h errcode.h proto.h rsync.h lib/pool_alloc.h
30LIBOBJ=lib/wildmatch.o lib/compat.o lib/snprintf.o lib/mdfour.o lib/md5.o \
31 lib/permstring.o lib/pool_alloc.o lib/sysacls.o lib/sysxattrs.o @LIBOBJS@
32ZLIBOBJ=zlib/deflate.o zlib/inffast.o zlib/inflate.o zlib/inftrees.o \
33 zlib/trees.o zlib/zutil.o zlib/adler32.o zlib/compress.o zlib/crc32.o
34OBJS1=flist.o rsync.o generator.o receiver.o cleanup.o sender.o exclude.o \
35 util.o main.o checksum.o match.o syscall.o log.o backup.o
36OBJS2=options.o io.o compat.o hlink.o token.o uidlist.o socket.o \
37 fileio.o batch.o clientname.o chmod.o acls.o xattrs.o
38OBJS3=progress.o pipe.o
39DAEMON_OBJ = params.o loadparm.o clientserver.o access.o connection.o authenticate.o
40popt_OBJS=popt/findme.o popt/popt.o popt/poptconfig.o \
41 popt/popthelp.o popt/poptparse.o
42OBJS=$(OBJS1) $(OBJS2) $(OBJS3) $(DAEMON_OBJ) $(LIBOBJ) $(ZLIBOBJ) @BUILD_POPT@
43
44TLS_OBJ = tls.o syscall.o lib/compat.o lib/snprintf.o lib/permstring.o lib/sysxattrs.o @BUILD_POPT@
45
46# Programs we must have to run the test cases
47CHECK_PROGS = rsync$(EXEEXT) tls$(EXEEXT) getgroups$(EXEEXT) getfsdev$(EXEEXT) \
48 trimslash$(EXEEXT) t_unsafe$(EXEEXT) wildtest$(EXEEXT)
49
50CHECK_SYMLINKS = testsuite/chown-fake.test testsuite/devices-fake.test
51
52# Objects for CHECK_PROGS to clean
53CHECK_OBJS=getgroups.o getfsdev.o t_stub.o t_unsafe.o trimslash.o wildtest.o
54
55# note that the -I. is needed to handle config.h when using VPATH
56.c.o:
57@OBJ_SAVE@
58 $(CC) -I. -I$(srcdir) $(CFLAGS) $(CPPFLAGS) -c $< @CC_SHOBJ_FLAG@
59@OBJ_RESTORE@
60
61all: rsync$(EXEEXT)
62
63install: all
64 -mkdir -p ${DESTDIR}${bindir}
65 ${INSTALLCMD} ${INSTALL_STRIP} -m 755 rsync$(EXEEXT) ${DESTDIR}${bindir}
66 -mkdir -p ${DESTDIR}${mandir}/man1
67 -mkdir -p ${DESTDIR}${mandir}/man5
68 ${INSTALLMAN} -m 644 $(srcdir)/rsync.1 ${DESTDIR}${mandir}/man1
69 ${INSTALLMAN} -m 644 $(srcdir)/rsyncd.conf.5 ${DESTDIR}${mandir}/man5
70
71install-strip:
72 $(MAKE) INSTALL_STRIP='-s' install
73
74rsync$(EXEEXT): $(OBJS)
75 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
76
77$(OBJS): $(HEADERS)
78
79flist.o: rounding.h
80
81rounding.h: mkrounding$(EXEEXT)
82 ./mkrounding$(EXEEXT) >rounding.h
83
84mkrounding$(EXEEXT): mkrounding.c rsync.h
85 @sed '1,/^struct file_struct/d; /^}/,$$d' <$(srcdir)/rsync.h >mkrounding.h
86 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ -I. $(srcdir)/mkrounding.c
87 @rm mkrounding.h
88
89tls$(EXEEXT): $(TLS_OBJ)
90 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(TLS_OBJ) $(LIBS)
91
92getgroups$(EXEEXT): getgroups.o
93 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ getgroups.o $(LIBS)
94
95getfsdev$(EXEEXT): getfsdev.o
96 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ getfsdev.o $(LIBS)
97
98TRIMSLASH_OBJ = trimslash.o syscall.o lib/compat.o lib/snprintf.o
99trimslash$(EXEEXT): $(TRIMSLASH_OBJ)
100 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(TRIMSLASH_OBJ) $(LIBS)
101
102T_UNSAFE_OBJ = t_unsafe.o syscall.o util.o t_stub.o lib/compat.o lib/snprintf.o
103t_unsafe$(EXEEXT): $(T_UNSAFE_OBJ)
104 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(T_UNSAFE_OBJ) $(LIBS)
105
106gen:
107 cd $(srcdir) && $(MAKE) -f prepare-source.mak gen
108
109man:
110 cd $(srcdir) && $(MAKE) -f prepare-source.mak man
111
112proto:
113 cd $(srcdir) && $(MAKE) -f prepare-source.mak proto.h
114
115clean: cleantests
116 rm -f *~ $(OBJS) $(TLS_OBJ) $(CHECK_PROGS) $(CHECK_OBJS) $(CHECK_SYMLINKS) \
117 mkrounding mkrounding.h rounding.h
118
119cleantests:
120 rm -rf ./testtmp*
121
122# We try to delete built files from both the source and build
123# directories, just in case somebody previously configured things in
124# the source directory.
125distclean: clean
126 rm -f Makefile config.h config.status
127 rm -f $(srcdir)/Makefile $(srcdir)/config.h $(srcdir)/config.status
128
129 rm -f config.cache config.log
130 rm -f $(srcdir)/config.cache $(srcdir)/config.log
131
132 rm -f shconfig $(srcdir)/shconfig
133
134# this target is really just for my use. It only works on a limited
135# range of machines and is used to produce a list of potentially
136# dead (ie. unused) functions in the code. (tridge)
137finddead:
138 nm *.o */*.o |grep 'U ' | awk '{print $$2}' | sort -u > nmused.txt
139 nm *.o */*.o |grep 'T ' | awk '{print $$3}' | sort -u > nmfns.txt
140 comm -13 nmused.txt nmfns.txt
141
142# 'check' is the GNU name, 'test' is the name for everybody else :-)
143.PHONY: check test
144
145test: check
146
147# There seems to be no standard way to specify some variables as
148# exported from a Makefile apart from listing them like this.
149
150# This depends on building rsync; if we need any helper programs it
151# should depend on them too.
152
153# We try to run the scripts with POSIX mode on, in the hope that will
154# catch Bash-isms earlier even if we're running on GNU. Of course, we
155# might lose in the future where POSIX diverges from old sh.
156
157check: all $(CHECK_PROGS) $(CHECK_SYMLINKS)
158 rsync_bin=`pwd`/rsync$(EXEEXT) $(srcdir)/runtests.sh
159
160check29: all $(CHECK_PROGS) $(CHECK_SYMLINKS)
161 rsync_bin=`pwd`/rsync$(EXEEXT) $(srcdir)/runtests.sh --protocol=29
162
163wildtest.o: wildtest.c lib/wildmatch.c rsync.h
164wildtest$(EXEEXT): wildtest.o lib/compat.o lib/snprintf.o @BUILD_POPT@
165 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ wildtest.o lib/compat.o lib/snprintf.o @BUILD_POPT@ $(LIBS)
166
167testsuite/chown-fake.test:
168 ln -s chown.test $(srcdir)/testsuite/chown-fake.test
169
170testsuite/devices-fake.test:
171 ln -s devices.test $(srcdir)/testsuite/devices-fake.test
172
173# This does *not* depend on building or installing: you can use it to
174# check a version installed from a binary or some other source tree,
175# if you want.
176
177installcheck: $(CHECK_PROGS) $(CHECK_SYMLINKS)
178 POSIXLY_CORRECT=1 TOOLDIR=`pwd` rsync_bin="$(bindir)/rsync$(EXEEXT)" srcdir="$(srcdir)" $(srcdir)/runtests.sh
179
180# TODO: Add 'dist' target; need to know which files will be included
181
182# Run the SPLINT (Secure Programming Lint) tool. <www.splint.org>
183.PHONY: splint
184splint:
185 splint +unixlib +gnuextensions -weak rsync.c
186
187
188rsync.dvi: doc/rsync.texinfo
189 texi2dvi -o $@ $<
190
191rsync.ps: rsync.dvi
192 dvips -ta4 -o $@ $<
193
194rsync.pdf: doc/rsync.texinfo
195 texi2dvi -o $@ --pdf $<
196
197
198doxygen:
199 cd $(srcdir) && rm dox/html/* && doxygen
200
201# for maintainers only
202doxygen-upload:
203 rsync -avzv $(srcdir)/dox/html/ --delete \
204 samba.org:/home/httpd/html/rsync/doxygen/head/