Add a little implementation of ls(1) so that we can look at all and
[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@
6a48ca56 12LDFLAGS=@LDFLAGS@
95a38e86 13
c627d613
AT
14INSTALLCMD=@INSTALL@
15
d0390cd3 16srcdir=@srcdir@
4040be4d 17VPATH=$(srcdir)
c627d613
AT
18SHELL=/bin/sh
19
c627d613
AT
20.SUFFIXES:
21.SUFFIXES: .c .o
22
c485a357 23LIBOBJ=lib/fnmatch.o lib/compat.o lib/snprintf.o lib/mdfour.o
5914bf15
PM
24ZLIBOBJ=zlib/deflate.o zlib/infblock.o zlib/infcodes.o zlib/inffast.o \
25 zlib/inflate.o zlib/inftrees.o zlib/infutil.o zlib/trees.o \
8de330a3 26 zlib/zutil.o zlib/adler32.o
3d19b4c8 27OBJS1=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
6902ed17 28OBJS2=options.o flist.o io.o compat.o hlink.o token.o uidlist.o socket.o fileio.o batch.o
bcb7e502 29DAEMON_OBJ = params.o loadparm.o clientserver.o access.o connection.o authenticate.o
1ac15cd8
MP
30popt_OBJS=popt/findme.o popt/popt.o popt/poptconfig.o \
31 popt/popthelp.o popt/poptparse.o
32OBJS=$(OBJS1) $(OBJS2) $(DAEMON_OBJ) $(LIBOBJ) $(ZLIBOBJ) @BUILD_POPT@
c627d613 33
366bd905 34# note that the -I. is needed to handle config.h when using VPATH
c627d613 35.c.o:
692da0b5
DD
36@OBJ_SAVE@
37 $(CC) -I. -I$(srcdir) $(CFLAGS) -c $< @CC_SHOBJ_FLAG@
38@OBJ_RESTORE@
c627d613 39
a87b3b2a
AT
40all: rsync
41
42man: rsync.1 rsyncd.conf.5
c627d613
AT
43
44install: all
4040be4d
DD
45 -mkdir -p ${bindir}
46 ${INSTALLCMD} -m 755 rsync ${bindir}
47 -mkdir -p ${mandir}/man1
48 -mkdir -p ${mandir}/man5
49 ${INSTALLCMD} -m 644 $(srcdir)/rsync.1 ${mandir}/man1
50 ${INSTALLCMD} -m 644 $(srcdir)/rsyncd.conf.5 ${mandir}/man5
51
52install-strip:
53 $(MAKE) INSTALLCMD='$(INSTALLCMD) -s' install
c627d613 54
95a38e86 55rsync: $(OBJS)
4ff3d9d6
MP
56 $(CC) $(CFLAGS) $(LDFLAGS) -o rsync $(OBJS) $(LIBS)
57
58Makefile: Makefile.in configure config.status
82ed9106 59 echo "WARNING: You need to run ./config.status --recheck"
4ff3d9d6 60
f62c17e3 61# don't actually run autoconf, just issue a warning
4ff3d9d6 62configure: configure.in
f62c17e3 63 echo "WARNING: you need to rerun autoconf"
c627d613 64
41059f75 65rsync.1: rsync.yo
a87b3b2a 66 yodl2man -o rsync.1 rsync.yo
41059f75
AT
67
68rsyncd.conf.5: rsyncd.conf.yo
a87b3b2a 69 yodl2man -o rsyncd.conf.5 rsyncd.conf.yo
41059f75 70
c627d613 71proto:
3060d4aa 72 cat *.c lib/compat.c | awk -f mkproto.awk > proto.h
c627d613
AT
73
74clean:
8de330a3 75 rm -f *~ $(OBJS) rsync
42be5918 76 rm -rf ./testtmp
c627d613 77
af21c12f
DD
78distclean: clean
79 rm -f config.h config.cache config.status Makefile
80
6e4fb64e
AT
81
82# this target is really just for my use. It only works on a limited
83# range of machines and is used to produce a list of potentially
84# dead (ie. unused) functions in the code. (tridge)
85finddead:
86 nm *.o */*.o |grep 'U ' | awk '{print $$2}' | sort -u > nmused.txt
87 nm *.o */*.o |grep 'T ' | awk '{print $$3}' | sort -u > nmfns.txt
88 comm -13 nmused.txt nmfns.txt
a4772a4d
MP
89
90# 'check' is the GNU name, 'test' is the name for everybody else :-)
91.PHONY: check test
92
93test: check
94
e7d29902
MP
95
96# There seems to be no standard way to specify some variables as
97# exported from a Makefile apart from listing them like this.
98
99# TODO: These targets both ought to depend on a set of test programs
100# to build, if any.
101
3a4c683f
MP
102# This depends on building rsync; if we need any helper programs it
103# should depend on them too.
104
42be5918
MP
105# We try to run the scripts with POSIX mode on, in the hope that will
106# catch Bash-isms earlier even if we're running on GNU. Of course, we
107# might lose in the future where POSIX diverges from old sh.
108
3a4c683f 109check: all
a4b4af88 110 POSIXLY_CORRECT=1 rsync_bin=`pwd`/rsync srcdir="$(srcdir)" $(srcdir)/runtests.sh
e7d29902 111
3a4c683f
MP
112# This does *not* depend on building or installing: you can use it to
113# check a version installed from a binary or some other source tree,
114# if you want.
115
e7d29902 116installcheck:
42be5918 117 POSIXLY_CORRECT=1 rsync_bin="$(bindir)/rsync" srcdir="$(srcdir)" $(srcdir)/runtests.sh
e7d29902 118