changeset 96:9fb343307b6b

Fix some 'test' failures when running 'make install'. When shell variables are unexpectedly empty, 'test' gets the wrong number of arguments and becomes unhappy. Logical AND should not be done with 'test EXPR1 -a EXPR2' in such cases, because 'test' logic does not short-circuit. Replace with 'test EXPR1 && test EXPR2'. Shell logic does short-circuit, and if the first test invocation fails, the second will never occur, and will never encounter missing arguments.
author John "Elwin" Edwards
date Tue, 27 Aug 2013 22:54:28 -0700
parents 88ab59f06dfc
children d4bf99f82ea0
files rogue4/Makefile.in rogue5/Makefile.in
diffstat 2 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/rogue4/Makefile.in	Tue Aug 27 22:25:40 2013 -0700
+++ b/rogue4/Makefile.in	Tue Aug 27 22:54:28 2013 -0700
@@ -117,9 +117,9 @@
 	-$(TOUCH) test
 	-if test ! -f $(DESTDIR)$(SCOREFILE) ; \
 	 then $(INSTALL) -m 0664 test $(DESTDIR)$(SCOREFILE) ; fi
-	-if test "x$(LOGFILE)" != "x" -a ! -f $(DESTDIR)$(LOGFILE) ; then \
+	-if test "x$(LOGFILE)" != "x" && test ! -f $(DESTDIR)$(LOGFILE) ; then \
 	$(INSTALL) -m 0664 test $(DESTDIR)$(LOGFILE) ; fi
-	-if test "x$(SAVEDIR)" != "x" -a ! -d $(DESTDIR)$(SAVEDIR) ; then \
+	-if test "x$(SAVEDIR)" != "x" && test ! -d $(DESTDIR)$(SAVEDIR) ; then \
 	$(MKDIR) -p $(DESTDIR)$(SAVEDIR) ; fi
 	-$(INSTALL) -m 0755 $(PROGRAM) $(DESTDIR)$(bindir)/$(PROGRAM)
 	-if test "x$(GROUPOWNER)" != "x" ; then \
@@ -140,7 +140,7 @@
 	    then $(MKDIR) -p $(DESTDIR)$(docdir) ; fi
 	-$(INSTALL) -m 0644 LICENSE.TXT $(DESTDIR)$(docdir)/LICENSE.TXT
 	-$(INSTALL) -m 0644 rogue.me $(DESTDIR)$(docdir)/$(PROGRAM).me
-	-if test "x$(LOCKFILE)" != "x" -a ! -f $(DESTDIR)$(LOCKFILE)  ; then \
+	-if test "x$(LOCKFILE)" != "x" && test ! -f $(DESTDIR)$(LOCKFILE) ; then \
 	    $(INSTALL) -m 0666 test $(DESTDIR)$(LOCKFILE)  ; \
 	    $(RM) $(DESTDIR)$(LOCKFILE) ; \
 	 fi
--- a/rogue5/Makefile.in	Tue Aug 27 22:25:40 2013 -0700
+++ b/rogue5/Makefile.in	Tue Aug 27 22:54:28 2013 -0700
@@ -199,9 +199,9 @@
 install: $(PROGRAM)
 	-$(TOUCH) test
 	-if test ! -f $(DESTDIR)$(SCOREFILE) ; then $(INSTALL) -m 0664 test $(DESTDIR)$(SCOREFILE) ; fi
-	-if test "x$(LOGFILE)" != "x" -a ! -f $(DESTDIR)$(LOGFILE) ; then \
+	-if test "x$(LOGFILE)" != "x" && test ! -f $(DESTDIR)$(LOGFILE) ; then \
 	$(INSTALL) -m 0664 test $(DESTDIR)$(LOGFILE) ; fi
-	-if test "x$(SAVEDIR)" != "x" -a ! -d $(DESTDIR)$(SAVEDIR) ; then \
+	-if test "x$(SAVEDIR)" != "x" && test ! -d $(DESTDIR)$(SAVEDIR) ; then \
 	$(MKDIR) -p $(DESTDIR)$(SAVEDIR) ; fi
 	-$(INSTALL) -m 0755 $(PROGRAM) $(DESTDIR)$(bindir)/$(PROGRAM)
 	-if test "x$(GROUPOWNER)" != "x" ; then \
@@ -221,7 +221,7 @@
 	-$(INSTALL) -m 0644 rogue.cat $(DESTDIR)$(docdir)/$(PROGRAM).cat
 	-$(INSTALL) -m 0644 LICENSE.TXT $(DESTDIR)$(docdir)/LICENSE.TXT
 	-$(INSTALL) -m 0644 rogue.me $(DESTDIR)$(docdir)/$(PROGRAM).me
-	-if test "x$(LOCKFILE)" != "x" -a ! -f $(DESTDIR)$(LOCKFILE)  ; then \
+	-if test "x$(LOCKFILE)" != "x" && test ! -f $(DESTDIR)$(LOCKFILE) ; then \
             $(INSTALL) -m 0666 test $(DESTDIR)$(LOCKFILE)  ; \
             $(RM) $(DESTDIR)$(LOCKFILE) ; \
          fi