[crisos] [130] [darwinfox] Improve makefile usability

[ Thread Index | Date Index | More lists.tuxfamily.org/crisos Archives ]


Revision: 130
Author:   claudyus
Date:     2009-05-01 11:58:42 +0200 (Fri, 01 May 2009)

Log Message:
-----------
[darwinfox] Improve makefile usability 

Modified Paths:
--------------
    target/darwinfox/Makefile


Modified: target/darwinfox/Makefile
===================================================================
--- target/darwinfox/Makefile	2009-04-27 16:43:14 UTC (rev 129)
+++ target/darwinfox/Makefile	2009-05-01 09:58:42 UTC (rev 130)
@@ -16,7 +16,8 @@
 	@echo patches from CrisOs website.
 	@echo 
 	@echo First at all read the README
-	make -C openwrt
+	@echo
+	@test -e .patched && make -C openwrt || echo mmmh you don\'t read README! && read && less README
 
 
 init:
@@ -27,31 +28,31 @@
 
 install_feeds:
 	./openwrt/scripts/feeds install -a
+	touch .feeded
 
 patch: 
-	#FIXME At the moment this is an extreme stupid way to manage patches.
-	# Any suggestion is welcome!
-	
+	test -e .patched && make revert || true
 	#finally apply the patch
 	./helper/patch ./patches ./openwrt
 	sed -i 's/LINUX_VERSION:=2.6.29.1/LINUX_VERSION:=2.6.25.20/g' \
 		openwrt/target/linux/etrax/Makefile
+	touch .patched
 
 revert:
 	#remove un-versioned files from build dir
 	rm -dfr `svn status openwrt/ | grep '^[?]' - | cut -c 8-`
 	#now i need to revert all change to openwrt files
 	svn revert -R openwrt/
+	rm -f .patched
 
 downgrade:
 	#donwgrade target 
 
-
 clear: revert update
 
-update: revert
-	#uncomment this line to update also packages
-	#./openwrt/scripts/feeds update -a
+update:
+	test -e .feeded && ./openwrt/scripts/feeds update -a
+	make revert
 	svn up ./openwrt/
 	make downgrade
 	@echo You should now run \"make patch\"


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/