Makefile.in
changeset 185 ade232db1313
parent 184 62a30ab8ae56
child 194 efff45a9047f
     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