diff -r 0c450efc5e3f -r 06521debb8ed Makefile.in --- a/Makefile.in Sun Nov 16 21:55:46 2008 +0000 +++ b/Makefile.in Sun Nov 16 22:19:57 2008 +0000 @@ -39,7 +39,7 @@ build: $(patsubst %,build-%,$(TARGETS)) -install: local-test build $(patsubst %,install-%,$(TARGETS)) +install: real-install clean: $(patsubst %,clean-%,$(TARGETS)) @@ -47,7 +47,7 @@ @echo " RM 'Makefile'" @rm -f Makefile -uninstall: local-test $(patsubst %,uninstall-%,$(TARGETS)) +uninstall: real-uninstall ############################################################################### # Specific make rules @@ -56,8 +56,6 @@ # Build rules build-bin: ct-ng - @echo " CHMOD '$<'" - @chmod a+x $< build-lib: @@ -100,16 +98,22 @@ #-------------------------------------- # Check for --local setup -# If using locally, don't install -local-test: - @if [ "$(LOCAL)" = "1" ]; then \ - echo "You're using local copy as runtime. You can't (un)install."; \ - false; \ - fi +ifeq ($(strip $(LOCAL)),1) + +real-install: build + @echo " CHMOD 'ct-ng'" + @chmod a+x ct-ng + +real-uninstall: + @true + +else #-------------------------------------- # Install rules +real-install: build $(patsubst %,install-%,$(TARGETS)) + install-bin: $(DESTDIR)$(BINDIR) @echo " INST 'ct-ng'" @install -m 755 ct-ng "$(DESTDIR)$(BINDIR)/ct-ng" @@ -120,7 +124,7 @@ # is the goal of the install-lib rule to install the lib/ directory... install-lib: uninstall-lib $(DESTDIR)$(LIBDIR) install-lib-main install-lib-samples -install-lib-main: $(LIBDIR) +install-lib-main: $(DESTDIR)$(LIBDIR) @for src_dir in config kconfig patches scripts tools; do \ echo " INST '$${src_dir}/'"; \ tar cf - --exclude=.svn $${src_dir} |(cd "$(DESTDIR)$(LIBDIR)"; tar xf -); \ @@ -157,6 +161,8 @@ #-------------------------------------- # Uninstall rules +real-uninstall: $(patsubst %,uninstall-%,$(TARGETS)) + uninstall-bin: @echo " RM '$(DESTDIR)$(BINDIR)/ct-ng'" @rm -f "$(DESTDIR)$(BINDIR)/ct-ng" @@ -172,3 +178,5 @@ uninstall-man: @echo " RM '$(DESTDIR)$(MANDIR)/ct-ng.1.gz'" @rm -f "$(DESTDIR)$(MANDIR)/ct-ng.1"{,.gz} + +endif # Not --local