Set the execute bit on generated script at build time, not install time.
Do not advertise "make install" when ./configure-d with "--local".
-------- diffstat follows --------
/trunk/configure | 8 5 3 0 +++++---
/trunk/Makefile.in | 10 3 7 0 +++-------
2 files changed, 8 insertions(+), 10 deletions(-)
1.1 --- a/Makefile.in Sun Apr 19 17:06:49 2009 +0000
1.2 +++ b/Makefile.in Mon Apr 20 19:57:16 2009 +0000
1.3 @@ -104,6 +104,7 @@
1.4 # Build rules
1.5
1.6 build-bin: ct-ng scripts/crosstool-NG.sh scripts/saveSample.sh
1.7 + @chmod 755 $^
1.8
1.9 build-lib: paths.mk
1.10
1.11 @@ -168,15 +169,10 @@
1.12 #--------------------------------------
1.13 # Check for --local setup
1.14
1.15 -ifeq ($(strip $(LOCAL)),1)
1.16 +ifeq ($(strip $(LOCAL)),y)
1.17
1.18 real-install:
1.19 - @echo " CHMOD 'ct-ng'"
1.20 - @chmod a+x ct-ng
1.21 - @echo " CHMOD 'scripts/crosstool-NG.sh'"
1.22 - @chmod a+x scripts/crosstool-NG.sh
1.23 - @echo " CHMOD 'scripts/saveSample.sh'"
1.24 - @chmod a+x scripts/saveSample.sh
1.25 + @true
1.26
1.27 real-uninstall:
1.28 @true
2.1 --- a/configure Sun Apr 19 17:06:49 2009 +0000
2.2 +++ b/configure Mon Apr 20 19:57:16 2009 +0000
2.3 @@ -246,7 +246,7 @@
2.4
2.5 while [ $# -ne 0 ]; do
2.6 case "$1" in
2.7 - --local) LOCAL_set=1; shift;;
2.8 + --local) LOCAL_set="y"; shift;;
2.9 --prefix*) set_prefix "$1" "$2" && shift || shift 2;;
2.10 --bindir*) set_bindir "$1" "$2" && shift || shift 2;;
2.11 --libdir*) set_libdir "$1" "$2" && shift || shift 2;;
2.12 @@ -262,7 +262,7 @@
2.13 [ -z "${PREFIX}" ] && set_prefix "" "${PREFIX_DEFAULT}"
2.14
2.15 # Special case when installing locally
2.16 -if [ "${LOCAL_set}" = "1" ]; then
2.17 +if [ "${LOCAL_set}" = "y" ]; then
2.18 set_prefix "" "$( pwd )"
2.19 set_bindir "" "$( pwd )"
2.20 set_libdir "" "$( pwd )"
2.21 @@ -419,5 +419,7 @@
2.22
2.23 Now run:
2.24 make
2.25 - make install
2.26 __EOF__
2.27 +if [ "${LOCAL_set}" = "y" ]; then
2.28 + printf " make install\n"
2.29 +fi