Typo corrections.
[rsync/rsync.git] / Makefile.in
CommitLineData
c627d613
AT
1# Makefile for rsync. This is processed by configure to produce the final
2# Makefile
3
6dd1782c
AT
4prefix=@prefix@
5exec_prefix=@exec_prefix@
4040be4d
DD
6bindir=@bindir@
7mandir=@mandir@
c627d613 8
c627d613 9LIBS=@LIBS@
95a38e86 10CC=@CC@
ce2ac5ac 11CFLAGS=@CFLAGS@
a1cc591b
WD
12CPPFLAGS=@CPPFLAGS@
13EXEEXT=@EXEEXT@
6a48ca56 14LDFLAGS=@LDFLAGS@
95a38e86 15
c627d613 16INSTALLCMD=@INSTALL@
daa3d0e2 17INSTALLMAN=@INSTALL@
c627d613 18
d0390cd3 19srcdir=@srcdir@
4040be4d 20VPATH=$(srcdir)
c627d613
AT
21SHELL=/bin/sh
22
a358449a
MP
23VERSION=@VERSION@
24
c627d613
AT
25.SUFFIXES:
26.SUFFIXES: .c .o
27
8ef6b725 28LIBOBJ=lib/fnmatch.o lib/compat.o lib/snprintf.o lib/mdfour.o \
ef6122c6 29 lib/permstring.o @LIBOBJS@
5914bf15
PM
30ZLIBOBJ=zlib/deflate.o zlib/infblock.o zlib/infcodes.o zlib/inffast.o \
31 zlib/inflate.o zlib/inftrees.o zlib/infutil.o zlib/trees.o \
ef6122c6
WD
32 zlib/zutil.o zlib/adler32.o
33OBJS1=rsync.o generator.o receiver.o cleanup.o sender.o exclude.o util.o \
34 main.o checksum.o match.o syscall.o log.o backup.o
35OBJS2=options.o flist.o io.o compat.o hlink.o token.o uidlist.o socket.o \
36 fileio.o batch.o clientname.o
b35d0d8e 37OBJS3=progress.o pipe.o
bcb7e502 38DAEMON_OBJ = params.o loadparm.o clientserver.o access.o connection.o authenticate.o
1ac15cd8
MP
39popt_OBJS=popt/findme.o popt/popt.o popt/poptconfig.o \
40 popt/popthelp.o popt/poptparse.o
b35d0d8e 41OBJS=$(OBJS1) $(OBJS2) $(OBJS3) $(DAEMON_OBJ) $(LIBOBJ) $(ZLIBOBJ) @BUILD_POPT@
c627d613 42
ef6122c6 43TLS_OBJ = tls.o syscall.o lib/permstring.o
7df0935a
MP
44
45# Programs we must have to run the test cases
ec6e0bf0
WD
46CHECK_PROGS = rsync$(EXEEXT) tls$(EXEEXT) getgroups$(EXEEXT) \
47 trimslash$(EXEEXT) t_unsafe$(EXEEXT)
7df0935a 48
0c0a3e2d
DD
49# Objects for CHECK_PROGS to clean
50CHECK_OBJS=getgroups.o t_stub.o t_unsafe.o trimslash.o
51
366bd905 52# note that the -I. is needed to handle config.h when using VPATH
c627d613 53.c.o:
692da0b5 54@OBJ_SAVE@
a1cc591b 55 $(CC) -I. -I$(srcdir) $(CFLAGS) $(CPPFLAGS) -c $< @CC_SHOBJ_FLAG@
692da0b5 56@OBJ_RESTORE@
c627d613 57
ec6e0bf0 58all: rsync$(EXEEXT)
a87b3b2a
AT
59
60man: rsync.1 rsyncd.conf.5
c627d613
AT
61
62install: all
6aaf8d8c 63 -mkdir -p ${DESTDIR}${bindir}
ec6e0bf0 64 ${INSTALLCMD} ${STRIP} -m 755 rsync$(EXEEXT) ${DESTDIR}${bindir}
6aaf8d8c
MP
65 -mkdir -p ${DESTDIR}${mandir}/man1
66 -mkdir -p ${DESTDIR}${mandir}/man5
67 ${INSTALLMAN} -m 644 $(srcdir)/rsync.1 ${DESTDIR}${mandir}/man1
68 ${INSTALLMAN} -m 644 $(srcdir)/rsyncd.conf.5 ${DESTDIR}${mandir}/man5
4040be4d
DD
69
70install-strip:
6aaf8d8c 71 $(MAKE) STRIP='-s' install
c627d613 72
ec6e0bf0 73rsync$(EXEEXT): $(OBJS)
a1cc591b 74 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
4ff3d9d6 75
a5ce1eb1
DD
76$(OBJS): config.h
77
ec6e0bf0 78tls$(EXEEXT): $(TLS_OBJ)
956ff9ff 79 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(TLS_OBJ) $(LIBS)
7df0935a 80
ec6e0bf0 81getgroups$(EXEEXT): getgroups.o
435f1ed7 82 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ getgroups.o $(LIBS)
4acbfa2a 83
c127e8aa 84TRIMSLASH_OBJ = trimslash.o syscall.o
ec6e0bf0 85trimslash$(EXEEXT): $(TRIMSLASH_OBJ)
c127e8aa
MP
86 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(TRIMSLASH_OBJ) $(LIBS)
87
9a933bc2 88T_UNSAFE_OBJ = t_unsafe.o syscall.o util.o t_stub.o lib/compat.o lib/snprintf.o
ec6e0bf0 89t_unsafe$(EXEEXT): $(T_UNSAFE_OBJ)
b35d0d8e
MP
90 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(T_UNSAFE_OBJ) $(LIBS)
91
e733c934
MP
92# I don't like these rules because CVS can skew the timestamps and
93# produce spurious warnings, and also make "make install" fail if the
94# source directory can no longer be found. Since we don't rebuild
95# automatically they're kind of lame anyhow.
96
97#Makefile: Makefile.in configure config.status
98# echo "WARNING: You need to run ./config.status --recheck"
4ff3d9d6 99
f62c17e3 100# don't actually run autoconf, just issue a warning
e733c934
MP
101#configure: configure.in
102# echo "WARNING: you need to rerun autoconf"
c627d613 103
48c1586c
MP
104$(srcdir)/rsync.1: $(srcdir)/rsync.yo
105 yodl2man -o $(srcdir)/rsync.1 $(srcdir)/rsync.yo
41059f75 106
48c1586c
MP
107$(srcdir)/rsyncd.conf.5: $(srcdir)/rsyncd.conf.yo
108 yodl2man -o $(srcdir)/rsyncd.conf.5 $(srcdir)/rsyncd.conf.yo
41059f75 109
c627d613 110proto:
1521eefb 111 cat $(srcdir)/*.c $(srcdir)/lib/compat.c | awk -f $(srcdir)/mkproto.awk > $(srcdir)/proto.h
c627d613 112
9299c8f0 113clean: cleantests
a1cc591b 114 rm -f *~ $(OBJS) $(TLS_OBJ) $(CHECK_PROGS) $(CHECK_OBJS)
9299c8f0
MP
115
116cleantests:
117 rm -rf ./testtmp*
c627d613 118
4610ac79
MP
119# We try to delete built files from both the source and build
120# directories, just in case somebody previously configured things in
121# the source directory.
af21c12f 122distclean: clean
ef6122c6
WD
123 rm -f Makefile config.h config.status
124 rm -f $(srcdir)/Makefile $(srcdir)/config.h $(srcdir)/config.status
2a5904a5
MP
125
126 rm -f config.cache config.log
127 rm -f $(srcdir)/config.cache $(srcdir)/config.log
128
129 rm -f shconfig $(srcdir)/shconfig
6e4fb64e
AT
130
131# this target is really just for my use. It only works on a limited
132# range of machines and is used to produce a list of potentially
133# dead (ie. unused) functions in the code. (tridge)
134finddead:
135 nm *.o */*.o |grep 'U ' | awk '{print $$2}' | sort -u > nmused.txt
136 nm *.o */*.o |grep 'T ' | awk '{print $$3}' | sort -u > nmfns.txt
ef6122c6 137 comm -13 nmused.txt nmfns.txt
a4772a4d
MP
138
139# 'check' is the GNU name, 'test' is the name for everybody else :-)
140.PHONY: check test
141
142test: check
143
e7d29902
MP
144
145# There seems to be no standard way to specify some variables as
146# exported from a Makefile apart from listing them like this.
147
7df0935a
MP
148# TODO: Tests that depend on built test aide programs like tls need to
149# know where the build directory is.
e7d29902 150
3a4c683f
MP
151# This depends on building rsync; if we need any helper programs it
152# should depend on them too.
153
42be5918
MP
154# We try to run the scripts with POSIX mode on, in the hope that will
155# catch Bash-isms earlier even if we're running on GNU. Of course, we
156# might lose in the future where POSIX diverges from old sh.
157
7df0935a 158check: all $(CHECK_PROGS)
ec6e0bf0 159 POSIXLY_CORRECT=1 TOOLDIR=`pwd` rsync_bin=`pwd`/rsync$(EXEEXT) srcdir="$(srcdir)" $(srcdir)/runtests.sh
e7d29902 160
3a4c683f
MP
161# This does *not* depend on building or installing: you can use it to
162# check a version installed from a binary or some other source tree,
163# if you want.
164
7df0935a 165installcheck: $(CHECK_PROGS)
ec6e0bf0 166 POSIXLY_CORRECT=1 TOOLDIR=`pwd` rsync_bin="$(bindir)/rsync$(EXEEXT)" srcdir="$(srcdir)" $(srcdir)/runtests.sh
e7d29902 167
cef40af2 168# TODO: Add 'dist' target; need to know which files will be included
6216ca2c 169
5648a819
MP
170# Run the SPLINT (Secure Programming Lint) tool. <www.splint.org>
171.PHONY: splint
ef6122c6 172splint:
5648a819
MP
173 splint +unixlib +gnuextensions -weak rsync.c
174
175
6216ca2c
MP
176rsync.dvi: doc/rsync.texinfo
177 texi2dvi -o $@ $<
178
ef6122c6 179rsync.ps: rsync.dvi
6216ca2c
MP
180 dvips -ta4 -o $@ $<
181
182rsync.pdf: doc/rsync.texinfo
183 texi2dvi -o $@ --pdf $<
b35d0d8e
MP
184
185
ef6122c6 186doxygen:
b35d0d8e
MP
187 cd $(srcdir) && rm dox/html/* && doxygen
188
189# for maintainers only
ef6122c6 190doxygen-upload:
b35d0d8e
MP
191 rsync -avzv $(srcdir)/dox/html/ --delete \
192 samba.org:/home/httpd/html/rsync/doxygen/head/