SF.net SVN: geany:[3662] trunk/scripts/wafinit.sh

eht16 at users.sourceforge.net eht16 at xxxxx
Fri Mar 27 15:39:37 UTC 2009


Revision: 3662
          http://geany.svn.sourceforge.net/geany/?rev=3662&view=rev
Author:   eht16
Date:     2009-03-27 15:39:36 +0000 (Fri, 27 Mar 2009)

Log Message:
-----------
Simplify the code more.
Fix the [un]install targets.

Modified Paths:
--------------
    trunk/scripts/wafinit.sh

Modified: trunk/scripts/wafinit.sh
===================================================================
--- trunk/scripts/wafinit.sh	2009-03-27 15:36:10 UTC (rev 3661)
+++ trunk/scripts/wafinit.sh	2009-03-27 15:39:36 UTC (rev 3662)
@@ -16,13 +16,21 @@
 all: build
 
 build:
-	@$WAF build \$@
+	@$WAF build
 
 install:
-	@$WAF install \$@
+	@if test -n "\$(DESTDIR)"; then \\
+		./waf install --destdir="\$(DESTDIR)"; \\
+	else \\
+		./waf install; \\
+	fi;
 
 uninstall:
-	@$WAF uninstall
+	@if test -n "\$(DESTDIR)"; then \\
+		$WAF uninstall --destdir="\$(DESTDIR)"; \\
+	else \\
+		$WAF uninstall; \\
+	fi;
 
 clean:
 	@$WAF clean
@@ -38,50 +46,24 @@
 	@$WAF --apidoc
 
 configure:
-	@$WAF configure \$@
+	@$WAF configure
 
 EOF
 
-# src/Makefile
-cat > src/Makefile << EOF
-
+template="
 all: build
 
 build:
-	cd .. && $WAF build \$@
+	cd .. && $WAF build
 
-EOF
+"
 
-# tagmanager/Makefile
-cat > tagmanager/Makefile << EOF
+echo "$template" > src/Makefile
+echo "$template" > tagmanager/Makefile
+echo "$template" > scintilla/Makefile
+echo "$template" > plugins/Makefile
 
-all: build
 
-build:
-	cd .. && $WAF build \$@
-
-EOF
-
-# scintilla/Makefile
-cat > scintilla/Makefile << EOF
-
-all: build
-
-build:
-	cd .. && $WAF build \$@
-
-EOF
-
-# plugins/Makefile
-cat > plugins/Makefile << EOF
-
-all: build
-
-build:
-	cd .. && $WAF build \$@
-
-EOF
-
 # configure
 cat > configure << EOF
 #!/bin/sh


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list