Typo corrections.
[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@
12CPPFLAGS=@CPPFLAGS@
13EXEEXT=@EXEEXT@
14LDFLAGS=@LDFLAGS@
15
16INSTALLCMD=@INSTALL@
17INSTALLMAN=@INSTALL@
18
19srcdir=@srcdir@
20VPATH=$(srcdir)
21SHELL=/bin/sh
22
23VERSION=@VERSION@
24
25.SUFFIXES:
26.SUFFIXES: .c .o
27
28LIBOBJ=lib/fnmatch.o lib/compat.o lib/snprintf.o lib/mdfour.o \
29 lib/permstring.o @LIBOBJS@
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 \
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
37OBJS3=progress.o pipe.o
38DAEMON_OBJ = params.o loadparm.o clientserver.o access.o connection.o authenticate.o
39popt_OBJS=popt/findme.o popt/popt.o popt/poptconfig.o \
40 popt/popthelp.o popt/poptparse.o
41OBJS=$(OBJS1) $(OBJS2) $(OBJS3) $(DAEMON_OBJ) $(LIBOBJ) $(ZLIBOBJ) @BUILD_POPT@
42
43TLS_OBJ = tls.o syscall.o lib/permstring.o
44
45# Programs we must have to run the test cases
46CHECK_PROGS = rsync$(EXEEXT) tls$(EXEEXT) getgroups$(EXEEXT) \
47 trimslash$(EXEEXT) t_unsafe$(EXEEXT)
48
49# Objects for CHECK_PROGS to clean
50CHECK_OBJS=getgroups.o t_stub.o t_unsafe.o trimslash.o
51
52# note that the -I. is needed to handle config.h when using VPATH
53.c.o:
54@OBJ_SAVE@
55 $(CC) -I. -I$(srcdir) $(CFLAGS) $(CPPFLAGS) -c $< @CC_SHOBJ_FLAG@
56@OBJ_RESTORE@
57
58all: rsync$(EXEEXT)
59
60man: rsync.1 rsyncd.conf.5
61
62install: all
63 -mkdir -p ${DESTDIR}${bindir}
64 ${INSTALLCMD} ${STRIP} -m 755 rsync$(EXEEXT) ${DESTDIR}${bindir}
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
69
70install-strip:
71 $(MAKE) STRIP='-s' install
72
73rsync$(EXEEXT): $(OBJS)
74 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
75
76$(OBJS): config.h
77
78tls$(EXEEXT): $(TLS_OBJ)
79 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(TLS_OBJ) $(LIBS)
80
81getgroups$(EXEEXT): getgroups.o
82 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ getgroups.o $(LIBS)
83
84TRIMSLASH_OBJ = trimslash.o syscall.o
85trimslash$(EXEEXT): $(TRIMSLASH_OBJ)
86 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(TRIMSLASH_OBJ) $(LIBS)
87
88T_UNSAFE_OBJ = t_unsafe.o syscall.o util.o t_stub.o lib/compat.o lib/snprintf.o
89t_unsafe$(EXEEXT): $(T_UNSAFE_OBJ)
90 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(T_UNSAFE_OBJ) $(LIBS)
91
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"
99
100# don't actually run autoconf, just issue a warning
101#configure: configure.in
102# echo "WARNING: you need to rerun autoconf"
103
104$(srcdir)/rsync.1: $(srcdir)/rsync.yo
105 yodl2man -o $(srcdir)/rsync.1 $(srcdir)/rsync.yo
106
107$(srcdir)/rsyncd.conf.5: $(srcdir)/rsyncd.conf.yo
108 yodl2man -o $(srcdir)/rsyncd.conf.5 $(srcdir)/rsyncd.conf.yo
109
110proto:
111 cat $(srcdir)/*.c $(srcdir)/lib/compat.c | awk -f $(srcdir)/mkproto.awk > $(srcdir)/proto.h
112
113clean: cleantests
114 rm -f *~ $(OBJS) $(TLS_OBJ) $(CHECK_PROGS) $(CHECK_OBJS)
115
116cleantests:
117 rm -rf ./testtmp*
118
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.
122distclean: clean
123 rm -f Makefile config.h config.status
124 rm -f $(srcdir)/Makefile $(srcdir)/config.h $(srcdir)/config.status
125
126 rm -f config.cache config.log
127 rm -f $(srcdir)/config.cache $(srcdir)/config.log
128
129 rm -f shconfig $(srcdir)/shconfig
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
137 comm -13 nmused.txt nmfns.txt
138
139# 'check' is the GNU name, 'test' is the name for everybody else :-)
140.PHONY: check test
141
142test: check
143
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
148# TODO: Tests that depend on built test aide programs like tls need to
149# know where the build directory is.
150
151# This depends on building rsync; if we need any helper programs it
152# should depend on them too.
153
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
158check: all $(CHECK_PROGS)
159 POSIXLY_CORRECT=1 TOOLDIR=`pwd` rsync_bin=`pwd`/rsync$(EXEEXT) srcdir="$(srcdir)" $(srcdir)/runtests.sh
160
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
165installcheck: $(CHECK_PROGS)
166 POSIXLY_CORRECT=1 TOOLDIR=`pwd` rsync_bin="$(bindir)/rsync$(EXEEXT)" srcdir="$(srcdir)" $(srcdir)/runtests.sh
167
168# TODO: Add 'dist' target; need to know which files will be included
169
170# Run the SPLINT (Secure Programming Lint) tool. <www.splint.org>
171.PHONY: splint
172splint:
173 splint +unixlib +gnuextensions -weak rsync.c
174
175
176rsync.dvi: doc/rsync.texinfo
177 texi2dvi -o $@ $<
178
179rsync.ps: rsync.dvi
180 dvips -ta4 -o $@ $<
181
182rsync.pdf: doc/rsync.texinfo
183 texi2dvi -o $@ --pdf $<
184
185
186doxygen:
187 cd $(srcdir) && rm dox/html/* && doxygen
188
189# for maintainers only
190doxygen-upload:
191 rsync -avzv $(srcdir)/dox/html/ --delete \
192 samba.org:/home/httpd/html/rsync/doxygen/head/