Get rid of the local-test in Makefile.
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun Nov 16 22:19:57 2008 +0000 (2008-11-16)
changeset 104806521debb8ed
parent 1047 0c450efc5e3f
child 1049 50e04e05cfa1
Get rid of the local-test in Makefile.

/trunk/Makefile.in | 30 19 11 0 +++++++++++++++++++-----------
/trunk/docs/overview.txt | 25 13 12 0 +++++++++++++------------
2 files changed, 32 insertions(+), 23 deletions(-)
Makefile.in
docs/overview.txt
     1.1 --- a/Makefile.in	Sun Nov 16 21:55:46 2008 +0000
     1.2 +++ b/Makefile.in	Sun Nov 16 22:19:57 2008 +0000
     1.3 @@ -39,7 +39,7 @@
     1.4  
     1.5  build: $(patsubst %,build-%,$(TARGETS))
     1.6  
     1.7 -install: local-test build $(patsubst %,install-%,$(TARGETS))
     1.8 +install: real-install
     1.9  
    1.10  clean: $(patsubst %,clean-%,$(TARGETS))
    1.11  
    1.12 @@ -47,7 +47,7 @@
    1.13  	@echo "  RM     'Makefile'"
    1.14  	@rm -f Makefile
    1.15  
    1.16 -uninstall: local-test $(patsubst %,uninstall-%,$(TARGETS))
    1.17 +uninstall: real-uninstall
    1.18  
    1.19  ###############################################################################
    1.20  # Specific make rules
    1.21 @@ -56,8 +56,6 @@
    1.22  # Build rules
    1.23  
    1.24  build-bin: ct-ng
    1.25 -	@echo "  CHMOD  '$<'"
    1.26 -	@chmod a+x $<
    1.27  
    1.28  build-lib:
    1.29  
    1.30 @@ -100,16 +98,22 @@
    1.31  #--------------------------------------
    1.32  # Check for --local setup
    1.33  
    1.34 -# If using locally, don't install
    1.35 -local-test:
    1.36 -	@if [ "$(LOCAL)" = "1" ]; then                                          \
    1.37 -	     echo "You're using local copy as runtime. You can't (un)install."; \
    1.38 -	     false;                                                             \
    1.39 -	 fi
    1.40 +ifeq ($(strip $(LOCAL)),1)
    1.41 +
    1.42 +real-install: build
    1.43 +	@echo "  CHMOD  'ct-ng'"
    1.44 +	@chmod a+x ct-ng
    1.45 +
    1.46 +real-uninstall:
    1.47 +	@true
    1.48 +
    1.49 +else
    1.50  
    1.51  #--------------------------------------
    1.52  # Install rules
    1.53  
    1.54 +real-install: build $(patsubst %,install-%,$(TARGETS))
    1.55 +
    1.56  install-bin: $(DESTDIR)$(BINDIR)
    1.57  	@echo "  INST   'ct-ng'"
    1.58  	@install -m 755 ct-ng "$(DESTDIR)$(BINDIR)/ct-ng"
    1.59 @@ -120,7 +124,7 @@
    1.60  # is the goal of the install-lib rule to install the lib/ directory...
    1.61  install-lib: uninstall-lib $(DESTDIR)$(LIBDIR) install-lib-main install-lib-samples
    1.62  
    1.63 -install-lib-main: $(LIBDIR)
    1.64 +install-lib-main: $(DESTDIR)$(LIBDIR)
    1.65  	@for src_dir in config kconfig patches scripts tools; do                        \
    1.66  	     echo "  INST   '$${src_dir}/'";                                            \
    1.67  	     tar cf - --exclude=.svn $${src_dir} |(cd "$(DESTDIR)$(LIBDIR)"; tar xf -); \
    1.68 @@ -157,6 +161,8 @@
    1.69  #--------------------------------------
    1.70  # Uninstall rules
    1.71  
    1.72 +real-uninstall: $(patsubst %,uninstall-%,$(TARGETS))
    1.73 +
    1.74  uninstall-bin:
    1.75  	@echo "  RM     '$(DESTDIR)$(BINDIR)/ct-ng'"
    1.76  	@rm -f "$(DESTDIR)$(BINDIR)/ct-ng"
    1.77 @@ -172,3 +178,5 @@
    1.78  uninstall-man:
    1.79  	@echo "  RM     '$(DESTDIR)$(MANDIR)/ct-ng.1.gz'"
    1.80  	@rm -f "$(DESTDIR)$(MANDIR)/ct-ng.1"{,.gz}
    1.81 +
    1.82 +endif # Not --local
     2.1 --- a/docs/overview.txt	Sun Nov 16 21:55:46 2008 +0000
     2.2 +++ b/docs/overview.txt	Sun Nov 16 22:19:57 2008 +0000
     2.3 @@ -14,9 +14,9 @@
     2.4  Installing crosstool-NG
     2.5    Install method
     2.6    The hacker's way
     2.7 +  Preparing for packaging
     2.8    Shell completion
     2.9    Contributed code
    2.10 -  Preparing for packaging
    2.11  Configuring crosstool-NG
    2.12    Interesting config options
    2.13    Re-building an existing toolchain
    2.14 @@ -145,6 +145,7 @@
    2.15  simple:
    2.16    ./configure --local
    2.17    make
    2.18 +  make install
    2.19  
    2.20  Now, *do not* remove crosstool-NG sources. They are needed to run crosstool-NG!
    2.21  Stay in the directory holding the sources, and run:
    2.22 @@ -158,6 +159,17 @@
    2.23  
    2.24  and mailing me the result! :-P
    2.25  
    2.26 +Preparing for packaging |
    2.27 +------------------------+
    2.28 +
    2.29 +If you plan on packaging crosstool-NG, you surely don't want to install it
    2.30 +in your root file system. The install procedure of crosstool-NG honors the
    2.31 +DESTDIR variable:
    2.32 +
    2.33 +  ./configure --prefix=/usr
    2.34 +  make
    2.35 +  make DESDTDIR=/packaging/place install
    2.36 +
    2.37  Shell completion |
    2.38  -----------------+
    2.39  
    2.40 @@ -192,17 +204,6 @@
    2.41  version of crosstool-ng, or that it will work at all. Use contributions at
    2.42  your own risk.
    2.43  
    2.44 -Preparing for packaging |
    2.45 -------------------------+
    2.46 -
    2.47 -If you plan on packaging crosstool-NG, you surely don't want to install it
    2.48 -in your root file system. The install procedure of crosstool-NG honors the
    2.49 -DESTDIR variable:
    2.50 -
    2.51 -  ./configure --prefix=/usr
    2.52 -  make
    2.53 -  make DESDTDIR=/packaging/place install
    2.54 -
    2.55  ____________________________
    2.56                             /
    2.57  Configuring crosstool-NG  /