changeset 2631:bad2a3ed61a9 octave-forge

Remove infinite loop on build failure. Don't fail if fntest.log is missing
author adb014
date Sun, 08 Oct 2006 21:05:23 +0000
parents 999a1ff22d5a
children 65b7210f8827
files packages/Makefile
diffstat 1 files changed, 9 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/packages/Makefile	Sun Oct 08 20:41:53 2006 +0000
+++ b/packages/Makefile	Sun Oct 08 21:05:23 2006 +0000
@@ -41,7 +41,7 @@
 srpms: $(patsubst %, srpm/%, $(PACKAGES)) $(patsubst %, metarpm/%, $(PKGDIRS))
 
 cleanlog:
-	@rm $(TESTLOG)
+	@rm -f $(TESTLOG)
 
 install:
 	@echo "***  INSTALLING ALL PACKAGES  ***"; \
@@ -54,16 +54,16 @@
 	octave -H -q --eval "$$cmd;"
 
 # No spaces in eval argument please!!
-checkpkg/%: cleancheck mkpkg/%
+checkpkg/%: cleancheck/% mkpkg/%
 	@echo "Running test code for $(opkg) and its dependencies" ; \
 	cd sandbox; \
 	$(TOPDIR)/admin/mktests.sh code; \
 	$(RUN_OCTAVE) --eval "pkg('load','all');fntests" ; \
-	if [ ! -e ../fntests.log ]; then touch ../fntests.log; fi ; \
+	if [ ! -e $(TESTLOG) ]; then touch $(TESTLOG); fi ; \
 	cat fntests.log >> $(TESTLOG); \
 	cd ..
 
-icheckpkg/%: clencheck mkpkg/%
+icheckpkg/%: cleancheck/% mkpkg/%
 	@echo "Running demo code for $(opkg) and its dependencies" ; \
 	cd sandbox; \
 	echo 'disp("starting demos...")' > fndemos.m; \
@@ -71,7 +71,7 @@
 	  echo "demo('$$file');" >> fndemos.m ; done
 	$(RUN_OCTAVE) -q fndemos.m
 
-cleancheck:
+cleancheck/%:
 	@if [ -d sandbox/ ]; then rm -rf sandbox; fi ; \
 	mkdir sandbox; \
 	cd sandbox; \
@@ -92,13 +92,16 @@
 	  deps=`cat baddeps | grep " needs " | sed -e 's/^.*needs\s\+\(\S*\).*$$/\1/'`; \
 	  ops=`cat  baddeps | grep " needs " | sed -e 's/^.*needs\s\+\S*\s\+\(\S*\).*$$/\1/'`; \
 	  vers=`cat  baddeps | grep " needs " | sed -e 's/^.*\s\+\(\S*\)\s*$$/\1/'`; \
+	  if [ -z $$deps ] && [ -z $$ops ] && [ -z $$vers ]; then \
+	    echo "Failed to build $(opkg)!!!"; \
+	    break; \
+	  fi; \
 	  for _dep in $$deps; do \
 	    for _dir in $(PKGDIRS); do \
 	      if [ -d ../$$_dir ]; then \
 		_fdep=`find ../$$_dir -name "$$_dep*"`; \
 		if [ -n "$$_fdep" ]; then \
 		  pkgs="'$$_fdep',$$pkgs"; \
-		  cd code; tar xzf ../$$_fdep; cd ..; \
 		  break 2; \
 		fi; \
 	      fi; \