changeset 8694:6e0d425862fa

src/Makefile.in (oct-gperf.h): avoid pipeline
author John W. Eaton <jwe@octave.org>
date Fri, 06 Feb 2009 12:51:29 -0500
parents e5ffb52c9c61
children 344d6d6fc6aa
files src/ChangeLog src/Makefile.in
diffstat 2 files changed, 13 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Fri Feb 06 13:45:48 2009 +0100
+++ b/src/ChangeLog	Fri Feb 06 12:51:29 2009 -0500
@@ -1,3 +1,8 @@
+2009-02-06  John W. Eaton  <jwe@octave.org>
+
+	* Makefile.in (oct-gperf.h): Don't use pipeline to process gperf
+	output.
+
 2009-02-05  John W. Eaton  <jwe@octave.org>
 
 	* symtab.cc (symbol_table::fcn_info::cn_info_rep::xfind):
--- a/src/Makefile.in	Fri Feb 06 13:45:48 2009 +0100
+++ b/src/Makefile.in	Fri Feb 06 12:51:29 2009 -0500
@@ -639,12 +639,15 @@
 	fi
 	@mv $@-t $@
 
+## Don't use a pipeline to process gperf output since if gperf
+## is missing but sed is not, the exit status of the pipeline
+## will still be success and we will end up creating an empty
+## oct-gperf.h file.
 oct-gperf.h: octave.gperf
-	@echo "making $@ from $<"
-	@$(GPERF) -t -C -D -G -L C++ -Z octave_kw_hash $< | \
-	  $(SED) 's,lookup\[,gperf_lookup[,' > $@-t \
-	  || (rm -f $@-t; exit 1)
-	@mv $@-t $@
+	$(GPERF) -t -C -D -G -L C++ -Z octave_kw_hash $< > $@-t1
+	$(SED) 's,lookup\[,gperf_lookup[,' < $@-t1 > $@-t2
+	mv $@-t2 $@
+	rm -f $@-t1
 
 display.o: CPPFLAGS += $(X11_FLAGS)