Fix running without installing.
Update README.
Point help to the man page.
1.1 --- a/Makefile.in Sun Jul 01 20:56:25 2007 +0000
1.2 +++ b/Makefile.in Sun Jul 01 21:21:11 2007 +0000
1.3 @@ -8,10 +8,11 @@
1.4
1.5 VERSION:= @@VERSION@@
1.6 BINDIR := @@BINDIR@@
1.7 -LIBDIR := @@LIBDIR@@/ct-ng-$(VERSION)
1.8 -DOCDIR := @@DOCDIR@@/ct-ng-$(VERSION)
1.9 -MANDIR := @@MANDIR@@/man1
1.10 +LIBDIR := @@LIBDIR@@
1.11 +DOCDIR := @@DOCDIR@@
1.12 +MANDIR := @@MANDIR@@
1.13 DATE := @@DATE@@
1.14 +LOCAL := @@LOCAL@@
1.15 MAKE := $(shell which make || type -p make || echo /usr/bin/make)
1.16
1.17 ###############################################################################
1.18 @@ -65,12 +66,19 @@
1.19 #--------------------------------------
1.20 # Install rules
1.21
1.22 -install-bin: $(BINDIR)
1.23 +# If using localy, don't install
1.24 +install-local:
1.25 + @if [ "$(LOCAL)" = "1" ]; then \
1.26 + echo "You're using local copy as runtime. You can't install."; \
1.27 + false; \
1.28 + fi
1.29 +
1.30 +install-bin: install-local $(BINDIR)
1.31 @install -m 755 ct-ng $(BINDIR)/ct-ng
1.32
1.33 -install-lib: $(LIBDIR) install-lib-main install-lib-samples
1.34 +install-lib: install-local $(LIBDIR) install-lib-main install-lib-samples
1.35
1.36 -install-lib-main: $(LIBDIR)
1.37 +install-lib-main: install-local $(LIBDIR)
1.38 @for src_dir in config kconfig patches scripts tools; do \
1.39 tar cf - --exclude=.svn $${src_dir} |(cd $(LIBDIR); tar xf -); \
1.40 done
1.41 @@ -80,13 +88,13 @@
1.42
1.43 # Samples need a little love:
1.44 # - change every occurence of CT_TOP_DIR to CT_LIB_DIR
1.45 -install-lib-samples: $(LIBDIR) install-lib-main
1.46 +install-lib-samples: install-local $(LIBDIR) install-lib-main
1.47 @tar cf - --exclude=.svn samples |(cd $(LIBDIR); tar xf -)
1.48 @for samp_file in $(LIBDIR)/samples/*/crosstool.config; do \
1.49 sed -r -i -e 's,\$$\{CT_TOP_DIR\},\$$\{CT_LIB_DIR\},g;' $${samp_file}; \
1.50 done
1.51
1.52 -install-doc: $(DOCDIR) $(MANDIR)
1.53 +install-doc: install-local $(DOCDIR) $(MANDIR)
1.54 @for doc_file in LICENSES licenses.d COPYING CREDITS docs/overview.txt; do \
1.55 install -m 644 docs/overview.txt $(DOCDIR); \
1.56 done
2.1 --- a/README Sun Jul 01 20:56:25 2007 +0000
2.2 +++ b/README Sun Jul 01 21:21:11 2007 +0000
2.3 @@ -1,13 +1,15 @@
2.4 This is the README for crosstool-NG
2.5
2.6 To get you started, just enter:
2.7 - make help
2.8 + ./configure --help
2.9
2.10 -You can find a (terse and WIP) documentation in docs/.
2.11 +You can find a (terse and WIP) documentation in docs/overview.txt.
2.12
2.13 You can also point your browser to
2.14 http://ymorin.is-a-geek.org/dokuwiki/projects/crosstool
2.15
2.16 -If you need to send a bug report or a patch, please mail:
2.17 +If you need to send a bug report or a patch, please send a mail with subject
2.18 +prefixed with "[CT_NG]" to:
2.19 yann.morin.1998 (at) anciens.enib.fr
2.20 -with subject prefixed with "[CT_NG]"
2.21 +
2.22 +Aloha!
3.1 --- a/configure Sun Jul 01 20:56:25 2007 +0000
3.2 +++ b/configure Sun Jul 01 21:21:11 2007 +0000
3.3 @@ -4,15 +4,12 @@
3.4 DATE=$(date +%Y%m%d)
3.5
3.6 PREFIX_DEFAULT=/usr/local
3.7 -BINDIR_DEFAULT="${PREFIX}/bin"
3.8 -LIBDIR_DEFAULT="${PREFIX}/lib"
3.9 -DOCDIR_DEFAULT="${PREFIX}/share/doc"
3.10 -MANDIR_DEFAULT="${PREFIX}/share/man"
3.11
3.12 BINDIR_set=
3.13 LIBDIR_set=
3.14 DOCDIR_set=
3.15 MANDIR_set=
3.16 +LOCAL_set=
3.17
3.18 get_optval(){
3.19 local ret
3.20 @@ -34,9 +31,9 @@
3.21 PREFIX=$(get_optval "$1" "$2")
3.22 ret=$?
3.23 [ -z "${BINDIR_set}" ] && BINDIR="${PREFIX}/bin"
3.24 - [ -z "${LIBDIR_set}" ] && LIBDIR="${PREFIX}/lib"
3.25 - [ -z "${DOCDIR_set}" ] && DOCDIR="${PREFIX}/share/doc"
3.26 - [ -z "${MANDIR_set}" ] && MANDIR="${PREFIX}/share/man"
3.27 + [ -z "${LIBDIR_set}" ] && LIBDIR="${PREFIX}/lib/ct-ng-${VERSION}"
3.28 + [ -z "${DOCDIR_set}" ] && DOCDIR="${PREFIX}/share/doc/ct-ng-${VERSION}"
3.29 + [ -z "${MANDIR_set}" ] && MANDIR="${PREFIX}/share/man/man1"
3.30 return ${ret}
3.31 }
3.32
3.33 @@ -82,8 +79,8 @@
3.34
3.35 Configuration:
3.36 -h, --help display this help and exit
3.37 - --prefix=PREFIX install architecture-independent files in PREFIX
3.38 - [${PREFIX_DEFAULT}]
3.39 + --prefix=PREFIX install files in PREFIX [${PREFIX_DEFAULT}]
3.40 + --local don't install, and use current directory
3.41
3.42 By default, \`make install' will install all the files in
3.43 \`${PREFIX_DEFAULT}/bin', \`${PREFIX_DEFAULT}/lib' etc. You can specify
3.44 @@ -107,12 +104,20 @@
3.45 --libdir*) set_libdir "$1" "$2" && shift || shift 2;;
3.46 --docdir*) set_docdir "$1" "$2" && shift || shift 2;;
3.47 --mandir*) set_mandir "$1" "$2" && shift || shift 2;;
3.48 + --local) LOCAL_set=1; shift;;
3.49 --help|-h) do_help; exit 0;;
3.50 *) do_help; exit 1;;
3.51 esac
3.52 done
3.53
3.54 -[ -z "${PREFIX}" ] && set_prefix --prefix "${PREFIX_DEFAULT}"
3.55 +[ -z "${PREFIX}" ] && set_prefix "" "${PREFIX_DEFAULT}"
3.56 +if [ "${LOCAL_set}" = "1" ]; then
3.57 + set_prefix "" $(pwd)
3.58 + set_bindir "" $(pwd)
3.59 + set_libdir "" $(pwd)
3.60 + set_docdir "" $(pwd)/docs
3.61 + set_mandir "" $(pwd)/docs
3.62 +fi
3.63
3.64 sed -r -e "s,@@BINDIR@@,${BINDIR},g;" \
3.65 -e "s,@@LIBDIR@@,${LIBDIR},g;" \
3.66 @@ -120,4 +125,14 @@
3.67 -e "s,@@MANDIR@@,${MANDIR},g;" \
3.68 -e "s,@@VERSION@@,${VERSION},g;" \
3.69 -e "s,@@DATE@@,${DATE},g;" \
3.70 - Makefile.in >Makefile
3.71 + -e "s,@@LOCAL@@,${LOCAL_set},g;" \
3.72 + Makefile.in >Makefile
3.73 +
3.74 +cat <<__EOF__
3.75 +ct-ng configured as follows:
3.76 + PREFIX="${PREFIX}"
3.77 + BINDIR="${BINDIR}"
3.78 + LIBDIR="${LIBDIR}"
3.79 + DOCDIR="${DOCDIR}"
3.80 + MANDIR="${MANDIR}"
3.81 +__EOF__
4.1 --- a/ct-ng.in Sun Jul 01 20:56:25 2007 +0000
4.2 +++ b/ct-ng.in Sun Jul 01 21:21:11 2007 +0000
4.3 @@ -55,6 +55,7 @@
4.4 @echo
4.5 @echo 'Execute "$(CT_NG) config" or "$(CT_NG) menuconfig" to configure ct-ng'
4.6 @echo 'Execute "$(CT_NG)" or "$(CT_NG) all" to build all targets marked with [*]'
4.7 + @echo 'See "man 1 ct-ng" for some help as well'
4.8
4.9 # End help system
4.10