Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Compiling without yodl (Re: localtraps)



On May 4, 10:28am, Peter Stephenson wrote:
} Subject: Re: localtraps
}
} Bart Schaefer wrote:
} > It gave an error because "test -f $target" failed, because the target
} > does not exist.  This is a result of a change I recently committed.

I take that back -- the last part about the change I committed, that is.
Vincent reported the error for the 4.2.x patches branch, but my change
was committed only on the head revision.

} > Tell me again why we should create and test for an empty file in the
} > event tht yodl doesn't exist?
} 
} No idea.  Probably the code originally tested for something completely
} different, e.g. there wasn't a redirection or there was a cp, or whatever.

May I suggest:

Index: Doc/Makefile.in
===================================================================
diff -c -r1.14 Makefile.in
--- Doc/Makefile.in	18 Feb 2005 17:05:15 -0000	1.14
+++ Doc/Makefile.in	4 May 2005 14:21:14 -0000
@@ -114,11 +114,10 @@
 	  */*) target=$@ ;; \
 	  *) target=$(sdir)/$@ ;; \
 	esac; \
-	case '$(YODL)' in :*) ;; *) \
+	case '$(YODL)' in :*) touch $$target ;; *) \
 	    echo $(YODL) -o $$target -I$(sdir) -w zman.yo version.yo $< ; \
 	    $(YODL) -I$(sdir) -w zman.yo version.yo $< | sed -e '1s/\\-/-/g' -e '/^\.'\''/d' > $$target \
 	;; esac; \
-	test -f $$target
 
 ps: us_ps a4_ps
 .PHONY: ps
@@ -146,17 +145,15 @@
 	  */*) target=$@ ;; \
 	  *) target=$(sdir)/$@ ;; \
 	esac; \
-	case '$(YODL)' in :*) ;; *) \
+	case '$(YODL)' in :*) touch $$target ;; *) \
 	    echo $(YODL) -o $$target -I$(sdir) -DZSHALL -w zman.yo version.yo zsh.yo; \
 	    $(YODL) -I$(sdir) -DZSHALL -w zman.yo version.yo zsh.yo | sed -e '1s/\\-/-/g' -e '/^\.'\''/d' > $$target \
 	;; esac; \
-	test -f $$target
 
 ../META-FAQ: META-FAQ.yo Zsh/metafaq.yo
-	case '$(YODL)' in :*) ;; *) \
+	case '$(YODL)' in :*) touch $(sdir_top)/META-FAQ ;; *) \
 	    $(YODL) -I$(sdir) META-FAQ.yo | sed -e '/NEXTLINE/N' -e '/DELLINE/d' -e '/^SECTHEAD$$/{N;s/^SECTHEAD.//;h;s/./-/g;H;g;}' -e 's/  *$$//' > $(sdir_top)/META-FAQ \
 	;; esac
-	test -f $(sdir_top)/META-FAQ
 
 $(YODLDOC): version.yo
 



Messages sorted by: Reverse Date, Date, Thread, Author