Possible patch for Irix Makefile problem

Paul_GreenVOS at vos.stratus.com Paul_GreenVOS at vos.stratus.com
Thu Jan 16 21:31:00 EST 2003


I am guessing that since the error is on the first instance of
the use of

     foo$(VAR): foo.o

construct, that the Irix makefile parser doesn't know how to
deal with this line.  Obviously they don't use GNU make....

So here is a patch to Makefile.in that simplifies the use of
variables.  This only uses constructs that should work in all
makes.  It should not break anything, and it might fix Irix.
But I don't have an Irix machine to test it on...in fact, I
haven't tested it at all.  (But I did stay in a Holiday Inn
once, and I carefully desk-checked it).

HTH.  Patch below sig.  Against current CVS version.

Thanks
PG
--
Paul Green                  | Mail: Paul.Green at stratus.com
Senior Technical Consultant | Voice: +1 978-461-7557   FAX: +1 978-461-3610
Stratus Technologies        | Video: PictureTel/AT&T by request.
Maynard, MA  01754          | Disclaimer: I speak for myself, not Stratus.

### START OF PATCH ###

diff -urp old/rsync/Makefile.in new/rsync/Makefile.in
--- old/rsync/Makefile.in	Thu Jan 16 16:06:00 2003
+++ new/rsync/Makefile.in	Thu Jan 16 16:14:29 2003
@@ -43,8 +43,13 @@ OBJS=$(OBJS1) $(OBJS2) $(OBJS3) $(DAEMON
 TLS_OBJ = tls.o syscall.o lib/permstring.o 
 
 # Programs we must have to run the test cases
-CHECK_PROGS = rsync$(EXEEXT) tls$(EXEEXT) getgroups$(EXEEXT) \
-	      trimslash$(EXEEXT) t_unsafe$(EXEEXT)
+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)
 
 # Objects for CHECK_PROGS to clean
 CHECK_OBJS=getgroups.o t_stub.o t_unsafe.o trimslash.o
@@ -55,13 +60,13 @@ CHECK_OBJS=getgroups.o t_stub.o t_unsafe
 	$(CC) -I. -I$(srcdir) $(CFLAGS) $(CPPFLAGS) -c $< @CC_SHOBJ_FLAG@
 @OBJ_RESTORE@
 
-all: rsync$(EXEEXT)
+all: $(RSYNC_EXE)
 
 man: rsync.1 rsyncd.conf.5
 
 install: all
 	-mkdir -p ${DESTDIR}${bindir}
-	${INSTALLCMD} ${STRIP} -m 755 rsync$(EXEEXT) ${DESTDIR}${bindir}
+	${INSTALLCMD} ${STRIP} -m 755 $(RSYNC_EXE) ${DESTDIR}${bindir}
 	-mkdir -p ${DESTDIR}${mandir}/man1
 	-mkdir -p ${DESTDIR}${mandir}/man5
 	${INSTALLMAN} -m 644 $(srcdir)/rsync.1 ${DESTDIR}${mandir}/man1
@@ -70,24 +75,24 @@ install: all
 install-strip:
 	$(MAKE) STRIP='-s' install
 
-rsync$(EXEEXT): $(OBJS)
+$(RSYNC_EXE): $(OBJS)
 	@echo "Please ignore warnings below about mktemp -- it is used in a safe way"
 	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
 
 $(OBJS): config.h
 
-tls$(EXEEXT): $(TLS_OBJ)
+$(TLS_EXE): $(TLS_OBJ)
 	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(TLS_OBJ) $(LIBS)
 
-getgroups$(EXEEXT): getgroups.o
+$(GETGROUPS_EXE): getgroups.o
 	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ getgroups.o $(LIBS)
 
 TRIMSLASH_OBJ = trimslash.o syscall.o
-trimslash$(EXEEXT): $(TRIMSLASH_OBJ)
+$(TRIMSLASH_EXE): $(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
-t_unsafe$(EXEEXT): $(T_UNSAFE_OBJ)
+$(T_UNSAFE_EXE): $(T_UNSAFE_OBJ)
 	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(T_UNSAFE_OBJ) $(LIBS)
 
 # I don't like these rules because CVS can skew the timestamps and
@@ -157,14 +162,14 @@ test: check
 # might lose in the future where POSIX diverges from old sh.
 
 check: all $(CHECK_PROGS)
-	POSIXLY_CORRECT=1 TOOLDIR=`pwd` rsync_bin=`pwd`/rsync$(EXEEXT) srcdir="$(srcdir)" $(srcdir)/runtests.sh
+	POSIXLY_CORRECT=1 TOOLDIR=`pwd` rsync_bin=`pwd`/$(RSYNC_EXE) srcdir="$(srcdir)" $(srcdir)/runtests.sh
 
 # 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$(EXEEXT)" srcdir="$(srcdir)" $(srcdir)/runtests.sh
+	POSIXLY_CORRECT=1 TOOLDIR=`pwd` rsync_bin="$(bindir)/$(RSYNC_EXE)" srcdir="$(srcdir)" $(srcdir)/runtests.sh
 
 # TODO: Add 'dist' target; need to know which files will be included
 
### END OF PATCH ###




More information about the rsync mailing list