mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2024-12-30 01:28:53 +00:00
Fix running without installing.
Update README. Point help to the man page.
This commit is contained in:
parent
e9e6759672
commit
1bb07c805c
24
Makefile.in
24
Makefile.in
@ -8,10 +8,11 @@ all: build
|
||||
|
||||
VERSION:= @@VERSION@@
|
||||
BINDIR := @@BINDIR@@
|
||||
LIBDIR := @@LIBDIR@@/ct-ng-$(VERSION)
|
||||
DOCDIR := @@DOCDIR@@/ct-ng-$(VERSION)
|
||||
MANDIR := @@MANDIR@@/man1
|
||||
LIBDIR := @@LIBDIR@@
|
||||
DOCDIR := @@DOCDIR@@
|
||||
MANDIR := @@MANDIR@@
|
||||
DATE := @@DATE@@
|
||||
LOCAL := @@LOCAL@@
|
||||
MAKE := $(shell which make || type -p make || echo /usr/bin/make)
|
||||
|
||||
###############################################################################
|
||||
@ -65,12 +66,19 @@ clean-doc:
|
||||
#--------------------------------------
|
||||
# Install rules
|
||||
|
||||
install-bin: $(BINDIR)
|
||||
# If using localy, don't install
|
||||
install-local:
|
||||
@if [ "$(LOCAL)" = "1" ]; then \
|
||||
echo "You're using local copy as runtime. You can't install."; \
|
||||
false; \
|
||||
fi
|
||||
|
||||
install-bin: install-local $(BINDIR)
|
||||
@install -m 755 ct-ng $(BINDIR)/ct-ng
|
||||
|
||||
install-lib: $(LIBDIR) install-lib-main install-lib-samples
|
||||
install-lib: install-local $(LIBDIR) install-lib-main install-lib-samples
|
||||
|
||||
install-lib-main: $(LIBDIR)
|
||||
install-lib-main: install-local $(LIBDIR)
|
||||
@for src_dir in config kconfig patches scripts tools; do \
|
||||
tar cf - --exclude=.svn $${src_dir} |(cd $(LIBDIR); tar xf -); \
|
||||
done
|
||||
@ -80,13 +88,13 @@ install-lib-main: $(LIBDIR)
|
||||
|
||||
# Samples need a little love:
|
||||
# - change every occurence of CT_TOP_DIR to CT_LIB_DIR
|
||||
install-lib-samples: $(LIBDIR) install-lib-main
|
||||
install-lib-samples: install-local $(LIBDIR) install-lib-main
|
||||
@tar cf - --exclude=.svn samples |(cd $(LIBDIR); tar xf -)
|
||||
@for samp_file in $(LIBDIR)/samples/*/crosstool.config; do \
|
||||
sed -r -i -e 's,\$$\{CT_TOP_DIR\},\$$\{CT_LIB_DIR\},g;' $${samp_file}; \
|
||||
done
|
||||
|
||||
install-doc: $(DOCDIR) $(MANDIR)
|
||||
install-doc: install-local $(DOCDIR) $(MANDIR)
|
||||
@for doc_file in LICENSES licenses.d COPYING CREDITS docs/overview.txt; do \
|
||||
install -m 644 docs/overview.txt $(DOCDIR); \
|
||||
done
|
||||
|
10
README
10
README
@ -1,13 +1,15 @@
|
||||
This is the README for crosstool-NG
|
||||
|
||||
To get you started, just enter:
|
||||
make help
|
||||
./configure --help
|
||||
|
||||
You can find a (terse and WIP) documentation in docs/.
|
||||
You can find a (terse and WIP) documentation in docs/overview.txt.
|
||||
|
||||
You can also point your browser to
|
||||
http://ymorin.is-a-geek.org/dokuwiki/projects/crosstool
|
||||
|
||||
If you need to send a bug report or a patch, please mail:
|
||||
If you need to send a bug report or a patch, please send a mail with subject
|
||||
prefixed with "[CT_NG]" to:
|
||||
yann.morin.1998 (at) anciens.enib.fr
|
||||
with subject prefixed with "[CT_NG]"
|
||||
|
||||
Aloha!
|
||||
|
37
configure
vendored
37
configure
vendored
@ -4,15 +4,12 @@ VERSION=$(cat version)
|
||||
DATE=$(date +%Y%m%d)
|
||||
|
||||
PREFIX_DEFAULT=/usr/local
|
||||
BINDIR_DEFAULT="${PREFIX}/bin"
|
||||
LIBDIR_DEFAULT="${PREFIX}/lib"
|
||||
DOCDIR_DEFAULT="${PREFIX}/share/doc"
|
||||
MANDIR_DEFAULT="${PREFIX}/share/man"
|
||||
|
||||
BINDIR_set=
|
||||
LIBDIR_set=
|
||||
DOCDIR_set=
|
||||
MANDIR_set=
|
||||
LOCAL_set=
|
||||
|
||||
get_optval(){
|
||||
local ret
|
||||
@ -34,9 +31,9 @@ set_prefix() {
|
||||
PREFIX=$(get_optval "$1" "$2")
|
||||
ret=$?
|
||||
[ -z "${BINDIR_set}" ] && BINDIR="${PREFIX}/bin"
|
||||
[ -z "${LIBDIR_set}" ] && LIBDIR="${PREFIX}/lib"
|
||||
[ -z "${DOCDIR_set}" ] && DOCDIR="${PREFIX}/share/doc"
|
||||
[ -z "${MANDIR_set}" ] && MANDIR="${PREFIX}/share/man"
|
||||
[ -z "${LIBDIR_set}" ] && LIBDIR="${PREFIX}/lib/ct-ng-${VERSION}"
|
||||
[ -z "${DOCDIR_set}" ] && DOCDIR="${PREFIX}/share/doc/ct-ng-${VERSION}"
|
||||
[ -z "${MANDIR_set}" ] && MANDIR="${PREFIX}/share/man/man1"
|
||||
return ${ret}
|
||||
}
|
||||
|
||||
@ -82,8 +79,8 @@ Defaults for the options are specified in brackets.
|
||||
|
||||
Configuration:
|
||||
-h, --help display this help and exit
|
||||
--prefix=PREFIX install architecture-independent files in PREFIX
|
||||
[${PREFIX_DEFAULT}]
|
||||
--prefix=PREFIX install files in PREFIX [${PREFIX_DEFAULT}]
|
||||
--local don't install, and use current directory
|
||||
|
||||
By default, \`make install' will install all the files in
|
||||
\`${PREFIX_DEFAULT}/bin', \`${PREFIX_DEFAULT}/lib' etc. You can specify
|
||||
@ -107,12 +104,20 @@ while [ $# -ne 0 ]; do
|
||||
--libdir*) set_libdir "$1" "$2" && shift || shift 2;;
|
||||
--docdir*) set_docdir "$1" "$2" && shift || shift 2;;
|
||||
--mandir*) set_mandir "$1" "$2" && shift || shift 2;;
|
||||
--local) LOCAL_set=1; shift;;
|
||||
--help|-h) do_help; exit 0;;
|
||||
*) do_help; exit 1;;
|
||||
esac
|
||||
done
|
||||
|
||||
[ -z "${PREFIX}" ] && set_prefix --prefix "${PREFIX_DEFAULT}"
|
||||
[ -z "${PREFIX}" ] && set_prefix "" "${PREFIX_DEFAULT}"
|
||||
if [ "${LOCAL_set}" = "1" ]; then
|
||||
set_prefix "" $(pwd)
|
||||
set_bindir "" $(pwd)
|
||||
set_libdir "" $(pwd)
|
||||
set_docdir "" $(pwd)/docs
|
||||
set_mandir "" $(pwd)/docs
|
||||
fi
|
||||
|
||||
sed -r -e "s,@@BINDIR@@,${BINDIR},g;" \
|
||||
-e "s,@@LIBDIR@@,${LIBDIR},g;" \
|
||||
@ -120,4 +125,14 @@ sed -r -e "s,@@BINDIR@@,${BINDIR},g;" \
|
||||
-e "s,@@MANDIR@@,${MANDIR},g;" \
|
||||
-e "s,@@VERSION@@,${VERSION},g;" \
|
||||
-e "s,@@DATE@@,${DATE},g;" \
|
||||
Makefile.in >Makefile
|
||||
-e "s,@@LOCAL@@,${LOCAL_set},g;" \
|
||||
Makefile.in >Makefile
|
||||
|
||||
cat <<__EOF__
|
||||
ct-ng configured as follows:
|
||||
PREFIX="${PREFIX}"
|
||||
BINDIR="${BINDIR}"
|
||||
LIBDIR="${LIBDIR}"
|
||||
DOCDIR="${DOCDIR}"
|
||||
MANDIR="${MANDIR}"
|
||||
__EOF__
|
||||
|
Loading…
Reference in New Issue
Block a user