Makefile.in
changeset 1048 06521debb8ed
parent 1047 0c450efc5e3f
child 1101 29ebc048d33f
     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