X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=Makefile.real;h=ef4b51c4274cf9c54be47a1f1955225ab83b67dd;hp=8ededf6aff8300608a5939429779ecd7b1753626;hb=9f3fe55418589acab8dfb809e787f15a46f7d174;hpb=7eaf2faf618705c97c77750371e177108aaa5897 diff --git a/Makefile.real b/Makefile.real index 8ededf6a..ef4b51c4 100644 --- a/Makefile.real +++ b/Makefile.real @@ -9,7 +9,6 @@ endif vardir := /var/paraslash mandir := $(datarootdir)/man/man1 -STRIP := $(CROSS_COMPILE)strip MKDIR_P := mkdir -p prefixed_executables := $(addprefix para_, $(executables)) @@ -63,8 +62,9 @@ tarball_pfx := $(PACKAGE_TARNAME)-$(GIT_VERSION) tarball_delete := $(addprefix $(tarball_pfx)/, web .gitignore) tarball := $(tarball_pfx).tar.bz2 -.PHONY: all clean clean2 distclean maintainer-clean install man tarball all: $(prefixed_executables) $(man_pages) +.PHONY: all mostlyclean clean distclean maintainer-clean install \ + install-strip man tarball man: $(man_pages) tarball: $(tarball) @@ -337,29 +337,34 @@ $(prefixed_executables): @[ -z "$(Q)" ] || echo 'LD $@' $(Q) $(CC) $^ -o $@ $(LDFLAGS) -clean: - @[ -z "$(Q)" ] || echo 'CLEAN' +mostlyclean: + @[ -z "$(Q)" ] || echo 'MOSTLYCLEAN' $(Q) rm -f para_* $(Q) rm -rf $(object_dir) - -clean2: clean - @[ -z "$(Q)" ] || echo 'CLEAN2' +clean: mostlyclean + @[ -z "$(Q)" ] || echo 'CLEAN' $(Q) rm -rf $(build_dir) -distclean: clean2 test-clean +distclean: clean @[ -z "$(Q)" ] || echo 'DISTCLEAN' $(Q) rm -f Makefile autoscan.log config.status config.log - $(Q) rm -f GPATH GRTAGS GSYMS GTAGS - + $(Q) rm -f config.h configure config.h.in maintainer-clean: distclean @[ -z "$(Q)" ] || echo 'MAINTAINER-CLEAN' - $(Q) rm -f *.tar.bz2 config.h configure config.h.in - -install: all man - $(MKDIR_P) $(bindir) $(mandir) - $(INSTALL) -s --strip-program $(STRIP) -m 755 \ - $(prefixed_executables) $(bindir) - $(INSTALL) -m 644 $(man_pages) $(mandir) - $(MKDIR_P) $(vardir) >/dev/null 2>&1 || true # not fatal, so don't complain + $(Q) rm -f *.tar.bz2 + $(Q) rm -f GPATH GRTAGS GSYMS GTAGS + +INSTALL ?= install +INSTALL_PROGRAM ?= $(INSTALL) +INSTALL_DATA ?= $(INSTALL) -m 644 +ifneq ($(findstring strip, $(MAKECMDGOALS)),) + strip_option := -s +endif + +install install-strip: all man + $(MKDIR_P) $(DESTDIR)$(bindir) $(DESTDIR)$(mandir) + $(INSTALL) $(strip_option) $(prefixed_executables) $(DESTDIR)$(bindir) + $(INSTALL_DATA) $(man_pages) $(DESTDIR)$(mandir) + $(MKDIR_P) $(DESTDIR)$(vardir) >/dev/null 2>&1 || true # not fatal, so don't complain $(tarball): $(Q) rm -rf $(tarball) $(tarball_pfx)