diff options
Diffstat (limited to 'Makefile.in')
-rw-r--r-- | Makefile.in | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/Makefile.in b/Makefile.in index 1b19b2a..598b02c 100644 --- a/Makefile.in +++ b/Makefile.in @@ -39,7 +39,7 @@ TARGETS := bin lib doc man build: $(patsubst %,build-%,$(TARGETS)) -install: local-test build $(patsubst %,install-%,$(TARGETS)) +install: real-install clean: $(patsubst %,clean-%,$(TARGETS)) @@ -47,7 +47,7 @@ distclean: clean @echo " RM 'Makefile'" @rm -f Makefile -uninstall: local-test $(patsubst %,uninstall-%,$(TARGETS)) +uninstall: real-uninstall ############################################################################### # Specific make rules @@ -56,8 +56,6 @@ uninstall: local-test $(patsubst %,uninstall-%,$(TARGETS)) # Build rules build-bin: ct-ng - @echo " CHMOD '$<'" - @chmod a+x $< build-lib: @@ -100,16 +98,22 @@ clean-man: #-------------------------------------- # 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 @@ install-bin: $(DESTDIR)$(BINDIR) # 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 @@ $(sort $(DESTDIR)$(BINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(DOCDIR) $(DESTDIR)$(M #-------------------------------------- # 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-doc: uninstall-man: @echo " RM '$(DESTDIR)$(MANDIR)/ct-ng.1.gz'" @rm -f "$(DESTDIR)$(MANDIR)/ct-ng.1"{,.gz} + +endif # Not --local |