mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2024-12-21 05:43:09 +00:00
Re-instate the --local configure switch to not install and use the local crosstool-NG copy.
This commit is contained in:
parent
787be08150
commit
f38b71646a
24
Makefile.in
24
Makefile.in
@ -12,14 +12,15 @@ LIBDIR := @@LIBDIR@@
|
|||||||
DOCDIR := @@DOCDIR@@
|
DOCDIR := @@DOCDIR@@
|
||||||
MANDIR := @@MANDIR@@
|
MANDIR := @@MANDIR@@
|
||||||
DATE := @@DATE@@
|
DATE := @@DATE@@
|
||||||
MAKE := $(shell which make || type -p make || echo /usr/bin/make)
|
LOCAL := @@LOCAL@@
|
||||||
|
MAKE := $(shell which $(MAKE) || type -p $(MAKE) || echo /usr/bin/make)
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# Global make rules
|
# Global make rules
|
||||||
|
|
||||||
build: build-bin build-lib build-doc
|
build: build-bin build-lib build-doc
|
||||||
|
|
||||||
install: build install-bin install-lib install-doc
|
install: install-local-test build install-bin install-lib install-doc
|
||||||
|
|
||||||
clean: clean-bin clean-lib clean-doc
|
clean: clean-bin clean-lib clean-doc
|
||||||
|
|
||||||
@ -66,13 +67,20 @@ clean-doc:
|
|||||||
#--------------------------------------
|
#--------------------------------------
|
||||||
# Install rules
|
# Install rules
|
||||||
|
|
||||||
install-bin: $(BINDIR)
|
# If using localy, don't install
|
||||||
|
install-local-test:
|
||||||
|
@if [ "$(LOCAL)" = "1" ]; then \
|
||||||
|
echo "You're using local copy as runtime. You can't install."; \
|
||||||
|
false; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
install-bin: install-local-test $(BINDIR)
|
||||||
@echo " INST ct-ng"
|
@echo " INST ct-ng"
|
||||||
@install -m 755 ct-ng $(BINDIR)/ct-ng
|
@install -m 755 ct-ng $(BINDIR)/ct-ng
|
||||||
|
|
||||||
install-lib: $(LIBDIR) install-lib-main install-lib-samples
|
install-lib: install-local-test $(LIBDIR) install-lib-main install-lib-samples
|
||||||
|
|
||||||
install-lib-main: $(LIBDIR)
|
install-lib-main: install-local-test $(LIBDIR)
|
||||||
@for src_dir in config kconfig patches scripts tools; do \
|
@for src_dir in config kconfig patches scripts tools; do \
|
||||||
echo " INST $${src_dir}/"; \
|
echo " INST $${src_dir}/"; \
|
||||||
tar cf - --exclude=.svn $${src_dir} |(cd $(LIBDIR); tar xf -); \
|
tar cf - --exclude=.svn $${src_dir} |(cd $(LIBDIR); tar xf -); \
|
||||||
@ -85,20 +93,20 @@ install-lib-main: $(LIBDIR)
|
|||||||
|
|
||||||
# Samples need a little love:
|
# Samples need a little love:
|
||||||
# - change every occurence of CT_TOP_DIR to CT_LIB_DIR
|
# - change every occurence of CT_TOP_DIR to CT_LIB_DIR
|
||||||
install-lib-samples: $(LIBDIR) install-lib-main
|
install-lib-samples: install-local-test $(LIBDIR) install-lib-main
|
||||||
@echo " INST samples/"
|
@echo " INST samples/"
|
||||||
@tar cf - --exclude=.svn samples |(cd $(LIBDIR); tar xf -)
|
@tar cf - --exclude=.svn samples |(cd $(LIBDIR); tar xf -)
|
||||||
@for samp_file in $(LIBDIR)/samples/*/crosstool.config; do \
|
@for samp_file in $(LIBDIR)/samples/*/crosstool.config; do \
|
||||||
sed -r -i -e 's,\$$\{CT_TOP_DIR\},\$$\{CT_LIB_DIR\},g;' $${samp_file}; \
|
sed -r -i -e 's,\$$\{CT_TOP_DIR\},\$$\{CT_LIB_DIR\},g;' $${samp_file}; \
|
||||||
done
|
done
|
||||||
|
|
||||||
install-doc: install-man $(DOCDIR)
|
install-doc: install-local-test $(DOCDIR)
|
||||||
@for doc_file in CREDITS docs/overview.txt; do \
|
@for doc_file in CREDITS docs/overview.txt; do \
|
||||||
echo " INST $${doc_file}"; \
|
echo " INST $${doc_file}"; \
|
||||||
install -m 644 "$${doc_file}" $(DOCDIR); \
|
install -m 644 "$${doc_file}" $(DOCDIR); \
|
||||||
done
|
done
|
||||||
|
|
||||||
install-man: $(MANDIR)
|
install-man: install-local-test $(MANDIR)
|
||||||
@echo " INST ct-ng.1"
|
@echo " INST ct-ng.1"
|
||||||
@install -m 644 docs/ct-ng.1 $(MANDIR)
|
@install -m 644 docs/ct-ng.1 $(MANDIR)
|
||||||
|
|
||||||
|
11
configure
vendored
11
configure
vendored
@ -9,6 +9,7 @@ BINDIR_set=
|
|||||||
LIBDIR_set=
|
LIBDIR_set=
|
||||||
DOCDIR_set=
|
DOCDIR_set=
|
||||||
MANDIR_set=
|
MANDIR_set=
|
||||||
|
LOCAL_set=
|
||||||
|
|
||||||
get_optval(){
|
get_optval(){
|
||||||
local ret
|
local ret
|
||||||
@ -79,6 +80,7 @@ Defaults for the options are specified in brackets.
|
|||||||
Configuration:
|
Configuration:
|
||||||
-h, --help display this help and exit
|
-h, --help display this help and exit
|
||||||
--prefix=PREFIX install 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
|
By default, \`make install' will install all the files in
|
||||||
\`${PREFIX_DEFAULT}/bin', \`${PREFIX_DEFAULT}/lib' etc. You can specify
|
\`${PREFIX_DEFAULT}/bin', \`${PREFIX_DEFAULT}/lib' etc. You can specify
|
||||||
@ -102,12 +104,20 @@ while [ $# -ne 0 ]; do
|
|||||||
--libdir*) set_libdir "$1" "$2" && shift || shift 2;;
|
--libdir*) set_libdir "$1" "$2" && shift || shift 2;;
|
||||||
--docdir*) set_docdir "$1" "$2" && shift || shift 2;;
|
--docdir*) set_docdir "$1" "$2" && shift || shift 2;;
|
||||||
--mandir*) set_mandir "$1" "$2" && shift || shift 2;;
|
--mandir*) set_mandir "$1" "$2" && shift || shift 2;;
|
||||||
|
--local) LOCAL_set=1; shift;;
|
||||||
--help|-h) do_help; exit 0;;
|
--help|-h) do_help; exit 0;;
|
||||||
*) do_help; exit 1;;
|
*) do_help; exit 1;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
[ -z "${PREFIX}" ] && set_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;" \
|
sed -r -e "s,@@BINDIR@@,${BINDIR},g;" \
|
||||||
-e "s,@@LIBDIR@@,${LIBDIR},g;" \
|
-e "s,@@LIBDIR@@,${LIBDIR},g;" \
|
||||||
@ -115,6 +125,7 @@ sed -r -e "s,@@BINDIR@@,${BINDIR},g;" \
|
|||||||
-e "s,@@MANDIR@@,${MANDIR},g;" \
|
-e "s,@@MANDIR@@,${MANDIR},g;" \
|
||||||
-e "s,@@VERSION@@,${VERSION},g;" \
|
-e "s,@@VERSION@@,${VERSION},g;" \
|
||||||
-e "s,@@DATE@@,${DATE},g;" \
|
-e "s,@@DATE@@,${DATE},g;" \
|
||||||
|
-e "s,@@LOCAL@@,${LOCAL_set},g;" \
|
||||||
Makefile.in >Makefile
|
Makefile.in >Makefile
|
||||||
|
|
||||||
cat <<__EOF__
|
cat <<__EOF__
|
||||||
|
2
ct-ng.in
2
ct-ng.in
@ -3,7 +3,7 @@
|
|||||||
# Copyright 2006 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
|
# Copyright 2006 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
|
||||||
|
|
||||||
# Don't print directory as we descend into them
|
# Don't print directory as we descend into them
|
||||||
MAKEFLAGS += --no-print-directory
|
MAKEFLAGS += --no-print-directory --no-builtin-rules
|
||||||
|
|
||||||
# Remember the name of the Makefile
|
# Remember the name of the Makefile
|
||||||
CT_MAKEFILE := $(lastword $(MAKEFILE_LIST))
|
CT_MAKEFILE := $(lastword $(MAKEFILE_LIST))
|
||||||
|
@ -82,7 +82,7 @@ help-config::
|
|||||||
|
|
||||||
# Cheesy build
|
# Cheesy build
|
||||||
|
|
||||||
SHIPPED = $(CT_LIB_DIR)/kconfig/zconf.tab.c $(CT_LIB_DIR)/kconfig/lex.zconf.c $(CT_LIB_DIR)/kconfig/zconf.hash.c
|
SHIPPED := $(CT_LIB_DIR)/kconfig/zconf.tab.c $(CT_LIB_DIR)/kconfig/lex.zconf.c $(CT_LIB_DIR)/kconfig/zconf.hash.c
|
||||||
|
|
||||||
%.c: %.c_shipped
|
%.c: %.c_shipped
|
||||||
@ln -s $(notdir $<) $@
|
@ln -s $(notdir $<) $@
|
||||||
@ -101,9 +101,7 @@ $(obj)/conf:: $(SHIPPED) $(CT_LIB_DIR)/kconfig/conf.c
|
|||||||
|
|
||||||
clean::
|
clean::
|
||||||
@rm -f $(CT_TOP_DIR)/kconfig/{,m}conf
|
@rm -f $(CT_TOP_DIR)/kconfig/{,m}conf
|
||||||
|
@rm -f $(SHIPPED)
|
||||||
@rmdir --ignore-fail-on-non-empty $(CT_TOP_DIR)/kconfig 2>/dev/null || true
|
@rmdir --ignore-fail-on-non-empty $(CT_TOP_DIR)/kconfig 2>/dev/null || true
|
||||||
@rm -f $(CT_TOP_DIR)/config
|
@rm -f $(CT_TOP_DIR)/config 2>/dev/null || true
|
||||||
@rm -rf $(CT_TOP_DIR)/config.gen
|
@rm -rf $(CT_TOP_DIR)/config.gen
|
||||||
|
|
||||||
distclean::
|
|
||||||
@rm -f $(CT_TOP_DIR)/config
|
|
||||||
|
Loading…
Reference in New Issue
Block a user