[or-cvs] r16650: {torvm} Build script cleanup and fixes for failures during svn impor (in torvm/trunk: . build/win32)

coderman at seul.org coderman at seul.org
Mon Aug 25 06:21:34 UTC 2008


Author: coderman
Date: 2008-08-25 02:21:34 -0400 (Mon, 25 Aug 2008)
New Revision: 16650

Modified:
   torvm/trunk/Makefile
   torvm/trunk/build/win32/Makefile
Log:
Build script cleanup and fixes for failures during svn import or patching; correct ISODIR assignment when using default.

Modified: torvm/trunk/Makefile
===================================================================
--- torvm/trunk/Makefile	2008-08-25 05:56:46 UTC (rev 16649)
+++ torvm/trunk/Makefile	2008-08-25 06:21:34 UTC (rev 16650)
@@ -86,6 +86,7 @@
 		svn co -r $(CVER) https://svn.openwrt.org/openwrt/trunk/ kamikaze ; \
 		if (( $$? != 0 )); then \
 			echo "ERROR: Unable to download a copy of the OpenWRT subversion tree." >&2; \
+			rm -rf kamikaze; \
 			exit 1; \
 		fi; \
 	fi
@@ -96,12 +97,19 @@
 		cd build/kamikaze; \
 		svn export ../../import/kamikaze $(TGTNAME); \
 		if (( $$? != 0 )); then \
-			 echo "ERROR: Unable to export working copy of local OpenWRT tree." >&2; \
-			 exit 1; \
+			echo "ERROR: Unable to export working copy of local OpenWRT tree." >&2; \
+			rm -rf $(TGTNAME); \
+			exit 1; \
 		fi; \
 		cd $(TGTNAME); \
 		for PFILE in $$(ls ../patches/); do \
 			patch -p1 < ../patches/$$PFILE; \
+			if (( $$? != 0 )); then \
+				echo "ERROR: Unable to apply patch $$PFILE." >&2; \
+				cd ..; \
+				rm -rf $(TGTNAME); \
+				exit 1; \
+			fi; \
 		done; \
 		if [ -d $(DLDIR) ]; then \
 			ln -s $(DLDIR) ./dl; \
@@ -125,11 +133,10 @@
 		exit 1; \
 	fi
 
-buildw32src:
+buildw32src: buildkern
 	@cd build/win32; \
 	chown -R $(BUSER):$(BGROUP) . ; \
-	echo "WDLDIR=$(WDLDIR)"; \
-	time su $(BUSER) -c "( echo WDLDIR=$(WDLDIR) && $(MAKE) WDLDIR=$(WDLDIR) )"; \
+	time su $(BUSER) -c "( $(MAKE) WDLDIR=$(WDLDIR) )"; \
 	if (( $$? != 0 )); then \
 		echo "ERROR: Unable to create win32 build ISO image." >&2; \
 		exit 1; \

Modified: torvm/trunk/build/win32/Makefile
===================================================================
--- torvm/trunk/build/win32/Makefile	2008-08-25 05:56:46 UTC (rev 16649)
+++ torvm/trunk/build/win32/Makefile	2008-08-25 06:21:34 UTC (rev 16650)
@@ -7,8 +7,9 @@
 
 ifeq (,$(ISODIR))
 	ISODIR=iso
+else
+	override ISODIR:=$(realpath $(ISODIR))
 endif
-override ISODIR:=$(realpath $(ISODIR))
 
 # various utilities are downloaded and packaged into an ISO image
 # with an autorun.inf that launches a build of all the win32 parts.



More information about the tor-commits mailing list