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