{"thread":{"id":"2897","subject":"[PATCH] qgit: remove Makefile from unpack_local_scons.sh","startedAt":"2005-12-21T17:10:57Z","lastAt":"2005-12-21T17:10:57Z","messageCount":1,"participants":["Pavel Roskin"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"13871","messageId":"1135185057.5602.31.camel@dv","threadId":"2897","inReplyTo":null,"subject":"[PATCH] qgit: remove Makefile from unpack_local_scons.sh","fromName":"Pavel Roskin","fromEmail":"proski@gnu.org","sentAt":"2005-12-21T17:10:57Z","receivedAt":"2005-12-21T17:10:57Z","isPatch":true,"sender":{"key":"proski@gnu.org","avatar":null},"body":"unpack_local_scons.sh would install a modified version of Makefile.\nHowever, the existing Makefile can be changed to detect and use local\nscons automatically.\n\nSigned-off-by: Pavel Roskin <proski@gnu.org>\n\ndiff --git a/Makefile b/Makefile\nindex 5fc9678..193153a 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -1,7 +1,11 @@\n ## Makefile automatically generated by unpack_local_scons.sh\n \n-### To use scons when installed globally use\n-SCONS=scons\n+### Use local scons if available\n+ifneq (,$(wildcard scons))\n+SCONS = ./scons\n+else\n+SCONS = scons\n+endif\n ### To run the local version instead, define\n #SCONS=python scons.py\n \ndiff --git a/unpack_local_scons.sh b/unpack_local_scons.sh\nindex a1266fc..445cab2 100755\n--- a/unpack_local_scons.sh\n+++ b/unpack_local_scons.sh\n@@ -13,46 +13,6 @@ NORMAL=\"\\033[0m\"\n # if kde is there a recent tar should be too\n tar xjvf scons-mini.tar.bz2\n \n-cat > Makefile << EOF\n-## Makefile automatically generated by unpack_local_scons.sh\n-\n-### To use scons when installed globally use\n-#SCONS=scons\n-### To run the local version instead, define\n-SCONS=./scons\n-\n-# scons            : compile\n-# scons -c         : clean\n-# scons install    : install\n-# scons -c install : uninstall and clean\n-\n-# default target : use scons to build the programs\n-all:\n-\t\\$(SCONS) -Q\n-\n-### There are several possibilities to help debugging :\n-# scons --debug=explain, scons --debug=tree ..\n-#\n-### To optimize the runtime, use\n-# scons --max-drift=1 --implicit-deps-unchanged\n-debug:\n-\t\\$(SCONS) -Q --debug=tree\n-\n-clean:\n-\t\\$(SCONS) -c\n-\n-install:\n-\t\\$(SCONS) install\n-\n-uninstall:\n-\t\\$(SCONS) -c install\n-\n-## this target creates a tarball of the project\n-dist:\n-\t\\$(SCONS) dist\n-EOF\n-\n-\n echo \"\"\n echo -e $GREEN\"A minimum scons distribution has been unpacked right here\"\n echo -e $GREEN\"you can now run : \"$NORMAL\n\n\n\n-- \nRegards,\nPavel Roskin\n"}]}