Make idev, hlink and file_struct + strings use allocation
[rsync/rsync.git] / Makefile.in
index 87d0c8a..03c7983 100644 (file)
@@ -25,8 +25,9 @@ VERSION=@VERSION@
 .SUFFIXES:
 .SUFFIXES: .c .o
 
 .SUFFIXES:
 .SUFFIXES: .c .o
 
-LIBOBJ=lib/fnmatch.o lib/compat.o lib/snprintf.o lib/mdfour.o \
-       lib/permstring.o @LIBOBJS@
+HEADERS=byteorder.h config.h errcode.h proto.h rsync.h
+LIBOBJ=lib/wildmatch.o lib/compat.o lib/snprintf.o lib/mdfour.o \
+       lib/permstring.o lib/pool_alloc.o @LIBOBJS@
 ZLIBOBJ=zlib/deflate.o zlib/infblock.o zlib/infcodes.o zlib/inffast.o \
        zlib/inflate.o zlib/inftrees.o zlib/infutil.o zlib/trees.o \
        zlib/zutil.o zlib/adler32.o
 ZLIBOBJ=zlib/deflate.o zlib/infblock.o zlib/infcodes.o zlib/inffast.o \
        zlib/inflate.o zlib/inftrees.o zlib/infutil.o zlib/trees.o \
        zlib/zutil.o zlib/adler32.o
@@ -43,16 +44,11 @@ OBJS=$(OBJS1) $(OBJS2) $(OBJS3) $(DAEMON_OBJ) $(LIBOBJ) $(ZLIBOBJ) @BUILD_POPT@
 TLS_OBJ = tls.o syscall.o lib/permstring.o
 
 # Programs we must have to run the test cases
 TLS_OBJ = tls.o syscall.o lib/permstring.o
 
 # Programs we must have to run the test cases
-RSYNC_EXE=rsync$(EXEEXT)
-TLS_EXE=tls$(EXEEXT)
-GETGROUPS_EXE=getgroups$(EXEEXT)
-TRIMSLASH_EXE=trimslash$(EXEEXT)
-T_UNSAFE_EXE=t_unsafe$(EXEEXT)
-CHECK_PROGS=$(RSYNC_EXE) $(TLS_EXE) $(GETGROUPS_EXE) \
-       $(TRIMSLASH_EXE) $(T_UNSAFE_EXE)
+CHECK_PROGS = rsync$(EXEEXT) tls$(EXEEXT) getgroups$(EXEEXT) \
+       trimslash$(EXEEXT) t_unsafe$(EXEEXT) wildtest$(EXEEXT)
 
 # Objects for CHECK_PROGS to clean
 
 # Objects for CHECK_PROGS to clean
-CHECK_OBJS=getgroups.o t_stub.o t_unsafe.o trimslash.o
+CHECK_OBJS=getgroups.o t_stub.o t_unsafe.o trimslash.o wildtest.o
 
 # note that the -I. is needed to handle config.h when using VPATH
 .c.o:
 
 # note that the -I. is needed to handle config.h when using VPATH
 .c.o:
@@ -60,13 +56,13 @@ CHECK_OBJS=getgroups.o t_stub.o t_unsafe.o trimslash.o
        $(CC) -I. -I$(srcdir) $(CFLAGS) $(CPPFLAGS) -c $< @CC_SHOBJ_FLAG@
 @OBJ_RESTORE@
 
        $(CC) -I. -I$(srcdir) $(CFLAGS) $(CPPFLAGS) -c $< @CC_SHOBJ_FLAG@
 @OBJ_RESTORE@
 
-all: $(RSYNC_EXE)
+all: rsync$(EXEEXT)
 
 man: rsync.1 rsyncd.conf.5
 
 install: all
        -mkdir -p ${DESTDIR}${bindir}
 
 man: rsync.1 rsyncd.conf.5
 
 install: all
        -mkdir -p ${DESTDIR}${bindir}
-       ${INSTALLCMD} ${STRIP} -m 755 $(RSYNC_EXE) ${DESTDIR}${bindir}
+       ${INSTALLCMD} ${STRIP} -m 755 rsync$(EXEEXT) ${DESTDIR}${bindir}
        -mkdir -p ${DESTDIR}${mandir}/man1
        -mkdir -p ${DESTDIR}${mandir}/man5
        ${INSTALLMAN} -m 644 $(srcdir)/rsync.1 ${DESTDIR}${mandir}/man1
        -mkdir -p ${DESTDIR}${mandir}/man1
        -mkdir -p ${DESTDIR}${mandir}/man5
        ${INSTALLMAN} -m 644 $(srcdir)/rsync.1 ${DESTDIR}${mandir}/man1
@@ -75,23 +71,23 @@ install: all
 install-strip:
        $(MAKE) STRIP='-s' install
 
 install-strip:
        $(MAKE) STRIP='-s' install
 
-$(RSYNC_EXE): $(OBJS)
+rsync$(EXEEXT): $(OBJS)
        $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
 
        $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
 
-$(OBJS): config.h
+$(OBJS): $(HEADERS)
 
 
-$(TLS_EXE): $(TLS_OBJ)
+tls$(EXEEXT): $(TLS_OBJ)
        $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(TLS_OBJ) $(LIBS)
 
        $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(TLS_OBJ) $(LIBS)
 
-$(GETGROUPS_EXE): getgroups.o
+getgroups$(EXEEXT): getgroups.o
        $(CC) $(CFLAGS) $(LDFLAGS) -o $@ getgroups.o $(LIBS)
 
 TRIMSLASH_OBJ = trimslash.o syscall.o
        $(CC) $(CFLAGS) $(LDFLAGS) -o $@ getgroups.o $(LIBS)
 
 TRIMSLASH_OBJ = trimslash.o syscall.o
-$(TRIMSLASH_EXE): $(TRIMSLASH_OBJ)
+trimslash$(EXEEXT): $(TRIMSLASH_OBJ)
        $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(TRIMSLASH_OBJ) $(LIBS)
 
 T_UNSAFE_OBJ = t_unsafe.o syscall.o util.o t_stub.o lib/compat.o lib/snprintf.o
        $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(TRIMSLASH_OBJ) $(LIBS)
 
 T_UNSAFE_OBJ = t_unsafe.o syscall.o util.o t_stub.o lib/compat.o lib/snprintf.o
-$(T_UNSAFE_EXE): $(T_UNSAFE_OBJ)
+t_unsafe$(EXEEXT): $(T_UNSAFE_OBJ)
        $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(T_UNSAFE_OBJ) $(LIBS)
 
 # I don't like these rules because CVS can skew the timestamps and
        $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(T_UNSAFE_OBJ) $(LIBS)
 
 # I don't like these rules because CVS can skew the timestamps and
@@ -161,14 +157,18 @@ test: check
 # might lose in the future where POSIX diverges from old sh.
 
 check: all $(CHECK_PROGS)
 # might lose in the future where POSIX diverges from old sh.
 
 check: all $(CHECK_PROGS)
-       POSIXLY_CORRECT=1 TOOLDIR=`pwd` rsync_bin=`pwd`/$(RSYNC_EXE) srcdir="$(srcdir)" $(srcdir)/runtests.sh
+       POSIXLY_CORRECT=1 TOOLDIR=`pwd` rsync_bin=`pwd`/rsync$(EXEEXT) srcdir="$(srcdir)" $(srcdir)/runtests.sh
+
+wildtest.o: wildtest.c lib/wildmatch.c rsync.h
+wildtest$(EXEEXT): wildtest.o
+       $(CC) $(CFLAGS) $(LDFLAGS) -o $@ wildtest.o @BUILD_POPT@ $(LIBS)
 
 # This does *not* depend on building or installing: you can use it to
 # check a version installed from a binary or some other source tree,
 # if you want.
 
 installcheck: $(CHECK_PROGS)
 
 # This does *not* depend on building or installing: you can use it to
 # check a version installed from a binary or some other source tree,
 # if you want.
 
 installcheck: $(CHECK_PROGS)
-       POSIXLY_CORRECT=1 TOOLDIR=`pwd` rsync_bin="$(bindir)/$(RSYNC_EXE)" srcdir="$(srcdir)" $(srcdir)/runtests.sh
+       POSIXLY_CORRECT=1 TOOLDIR=`pwd` rsync_bin="$(bindir)/rsync$(EXEEXT)" srcdir="$(srcdir)" $(srcdir)/runtests.sh
 
 # TODO: Add 'dist' target; need to know which files will be included
 
 
 # TODO: Add 'dist' target; need to know which files will be included