summaryrefslogtreecommitdiff
path: root/Makefile.in
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in24
1 files changed, 16 insertions, 8 deletions
diff --git a/Makefile.in b/Makefile.in
index 4940eff..54fe82c 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -12,14 +12,15 @@ LIBDIR := @@LIBDIR@@
DOCDIR := @@DOCDIR@@
MANDIR := @@MANDIR@@
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
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
@@ -66,13 +67,20 @@ clean-doc:
#--------------------------------------
# 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"
@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 \
echo " INST $${src_dir}/"; \
tar cf - --exclude=.svn $${src_dir} |(cd $(LIBDIR); tar xf -); \
@@ -85,20 +93,20 @@ 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-test $(LIBDIR) install-lib-main
@echo " INST samples/"
@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: install-man $(DOCDIR)
+install-doc: install-local-test $(DOCDIR)
@for doc_file in CREDITS docs/overview.txt; do \
echo " INST $${doc_file}"; \
install -m 644 "$${doc_file}" $(DOCDIR); \
done
-install-man: $(MANDIR)
+install-man: install-local-test $(MANDIR)
@echo " INST ct-ng.1"
@install -m 644 docs/ct-ng.1 $(MANDIR)