2007-07-02 19:40:54 +00:00
|
|
|
# Makefile.in for building crosstool-NG
|
2007-07-01 19:04:20 +00:00
|
|
|
# This file serves as source for the ./configure operation
|
|
|
|
|
2009-01-26 22:43:08 +00:00
|
|
|
# This series of test is here because GNU make 3.81 will *not* use MAKEFLAGS
|
|
|
|
# to set additional flags in the current Makfile ( see:
|
|
|
|
# http://savannah.gnu.org/bugs/?20501 ), although the make manual says it
|
|
|
|
# should ( see: http://www.gnu.org/software/make/manual/make.html#Options_002fRecursion )
|
|
|
|
# so we have to work it around by calling ourselves back if needed
|
|
|
|
|
|
|
|
# So why do we need not to use the built rules and variables? Because we
|
|
|
|
# need to generate scripts/crosstool-NG.sh from scripts/crosstool-NG.sh.in
|
|
|
|
# and there is a built-in implicit rule '%.sh:' that has neither a pre-requisite
|
|
|
|
# nor a command associated, and that built-in implicit rule takes precedence
|
|
|
|
# over our non-built-in implicit rule '%: %.in', below.
|
|
|
|
|
|
|
|
# CT_MAKEFLAGS will be used later, below...
|
|
|
|
|
|
|
|
# Do not print directories as we descend into them
|
|
|
|
ifeq ($(filter --no-print-directory,$(MAKEFLAGS)),)
|
|
|
|
CT_MAKEFLAGS += --no-print-directory
|
|
|
|
endif
|
|
|
|
|
|
|
|
# Use neither builtin rules, nor builtin variables
|
|
|
|
# Note: dual test, because if -R and -r are given on the command line
|
|
|
|
# (who knows?), MAKEFLAGS contains 'Rr' instead of '-Rr', while adding
|
|
|
|
# '-Rr' to MAKEFLAGS adds it literaly ( and does not add 'Rr' )
|
|
|
|
ifeq ($(filter Rr,$(MAKEFLAGS)),)
|
|
|
|
ifeq ($(filter -Rr,$(MAKEFLAGS)),)
|
|
|
|
CT_MAKEFLAGS += -Rr
|
|
|
|
endif # No -Rr
|
|
|
|
endif # No Rr
|
|
|
|
|
|
|
|
# Remove any suffix rules
|
|
|
|
.SUFFIXES:
|
2008-06-11 21:45:57 +00:00
|
|
|
|
2007-09-14 21:13:04 +00:00
|
|
|
all: Makefile build
|
|
|
|
|
2008-12-28 10:19:50 +00:00
|
|
|
###############################################################################
|
|
|
|
# Configuration variables
|
|
|
|
|
2011-11-07 21:28:40 +00:00
|
|
|
# Stuff found by ./configure
|
|
|
|
DATE := @DATE@
|
|
|
|
LOCAL := @enable_local@
|
|
|
|
PROG_SED := @program_transform_name@
|
|
|
|
PACKAGE_TARNAME := @PACKAGE_TARNAME@
|
|
|
|
VERSION := @PACKAGE_VERSION@
|
|
|
|
prefix := @prefix@
|
|
|
|
exec_prefix := @exec_prefix@
|
|
|
|
bindir := @bindir@
|
|
|
|
libdir := @libdir@@sublibdir@
|
|
|
|
docdir := @docdir@@subdocdir@
|
|
|
|
datarootdir := @datarootdir@
|
|
|
|
mandir := @mandir@
|
|
|
|
install := @INSTALL@
|
|
|
|
bash := @_BASH@
|
|
|
|
grep := @EGREP@
|
|
|
|
make := @MAKE@
|
|
|
|
sed := @SED@
|
|
|
|
libtool := @LIBTOOL@
|
|
|
|
libtoolize := @LIBTOOLIZE@
|
|
|
|
objcopy := @OBJCOPY@
|
|
|
|
objdump := @OBJDUMP@
|
|
|
|
readelf := @READELF@
|
|
|
|
patch := @PATCH@
|
2008-12-28 10:19:50 +00:00
|
|
|
|
2011-05-26 20:51:03 +00:00
|
|
|
# config options to push down to kconfig
|
2011-11-07 21:28:40 +00:00
|
|
|
KCONFIG:= @kconfig_options@
|
2011-05-26 20:51:03 +00:00
|
|
|
|
2010-07-15 20:34:31 +00:00
|
|
|
###############################################################################
|
|
|
|
# Non-configure variables
|
|
|
|
MAN_SECTION := 1
|
|
|
|
MAN_SUBDIR := /man$(MAN_SECTION)
|
|
|
|
|
2011-11-07 21:28:40 +00:00
|
|
|
PROG_NAME := $(shell echo 'ct-ng' |$(sed) -r -e '$(PROG_SED)' )
|
2011-08-19 20:53:48 +00:00
|
|
|
|
2008-11-16 21:55:46 +00:00
|
|
|
###############################################################################
|
|
|
|
# Sanity checks
|
|
|
|
|
2007-09-14 21:13:04 +00:00
|
|
|
# Check if Makefile is up to date:
|
|
|
|
Makefile: Makefile.in
|
|
|
|
@echo "$< did changed: you must re-run './configure'"
|
|
|
|
@false
|
2007-07-01 19:04:20 +00:00
|
|
|
|
2008-11-16 21:55:46 +00:00
|
|
|
# If installing with DESTDIR, check it's an absolute path
|
|
|
|
ifneq ($(strip $(DESTDIR)),)
|
|
|
|
ifneq ($(DESTDIR),$(abspath /$(DESTDIR)))
|
|
|
|
$(error DESTDIR is not an absolute PATH: '$(DESTDIR)')
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2007-07-01 19:04:20 +00:00
|
|
|
###############################################################################
|
|
|
|
# Global make rules
|
|
|
|
|
2009-01-26 22:43:08 +00:00
|
|
|
# If any extra MAKEFLAGS were added, re-run ourselves
|
|
|
|
# See top of file for an explanation of why this is needed...
|
|
|
|
ifneq ($(strip $(CT_MAKEFLAGS)),)
|
|
|
|
|
2011-06-04 15:43:49 +00:00
|
|
|
# Somehow, the new auto-completion for make in the recent distributions
|
|
|
|
# trigger a behavior where our Makefile calls itself recursively, in a
|
|
|
|
# never-ending loop (except on lack of ressources, swap, PIDs...)
|
|
|
|
# Avoid this situation by cutting the recursion short at the first
|
|
|
|
# level.
|
|
|
|
# This has the side effect of only showing the real targets, and hiding our
|
|
|
|
# internal ones. :-)
|
|
|
|
ifneq ($(MAKELEVEL),0)
|
|
|
|
$(error Recursion detected, bailing out...)
|
|
|
|
endif
|
|
|
|
|
2009-01-26 22:43:08 +00:00
|
|
|
MAKEFLAGS += $(CT_MAKEFLAGS)
|
2011-11-07 21:28:40 +00:00
|
|
|
build install clean distclean mrproper uninstall:
|
2009-01-26 22:43:08 +00:00
|
|
|
@$(MAKE) $@
|
|
|
|
|
|
|
|
else
|
|
|
|
# There were no additional MAKEFLAGS to add, do the job
|
|
|
|
|
2008-06-11 22:18:06 +00:00
|
|
|
TARGETS := bin lib doc man
|
2007-07-01 19:04:20 +00:00
|
|
|
|
2008-06-11 22:18:06 +00:00
|
|
|
build: $(patsubst %,build-%,$(TARGETS))
|
2007-07-01 19:04:20 +00:00
|
|
|
|
2008-12-16 18:12:34 +00:00
|
|
|
install: build real-install
|
2008-06-11 22:18:06 +00:00
|
|
|
|
|
|
|
clean: $(patsubst %,clean-%,$(TARGETS))
|
2007-07-01 19:04:20 +00:00
|
|
|
|
|
|
|
distclean: clean
|
2008-06-11 21:45:57 +00:00
|
|
|
@echo " RM 'Makefile'"
|
2007-07-01 19:04:20 +00:00
|
|
|
@rm -f Makefile
|
|
|
|
|
2011-11-07 21:28:40 +00:00
|
|
|
mrproper: distclean
|
|
|
|
@echo " RM 'autostuff'"
|
|
|
|
@ rm -rf autom4te.cache config.log config.status configure
|
|
|
|
|
2008-11-16 22:19:57 +00:00
|
|
|
uninstall: real-uninstall
|
2007-07-01 19:04:20 +00:00
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
# Specific make rules
|
|
|
|
|
|
|
|
#--------------------------------------
|
|
|
|
# Build rules
|
|
|
|
|
2011-08-19 20:53:48 +00:00
|
|
|
build-bin: $(PROG_NAME) scripts/crosstool-NG.sh scripts/saveSample.sh scripts/showTuple.sh
|
2009-04-20 19:57:16 +00:00
|
|
|
@chmod 755 $^
|
2007-07-01 19:04:20 +00:00
|
|
|
|
2011-05-26 20:51:03 +00:00
|
|
|
build-lib: paths.mk config/configure.in
|
2007-07-01 19:04:20 +00:00
|
|
|
|
2008-06-11 22:18:06 +00:00
|
|
|
build-doc:
|
|
|
|
|
2011-08-19 20:53:48 +00:00
|
|
|
build-man: docs/$(PROG_NAME).1.gz
|
2007-07-30 21:23:53 +00:00
|
|
|
|
2011-08-19 20:53:48 +00:00
|
|
|
docs/$(PROG_NAME).1.gz: docs/$(PROG_NAME).1
|
2008-06-11 21:45:57 +00:00
|
|
|
@echo " GZIP '$@'"
|
2007-08-07 17:10:07 +00:00
|
|
|
@gzip -c9 $< >$@
|
2007-07-01 19:04:20 +00:00
|
|
|
|
2011-08-17 21:05:01 +00:00
|
|
|
define sed_it
|
2008-06-11 21:45:57 +00:00
|
|
|
@echo " SED '$@'"
|
2011-11-07 21:28:40 +00:00
|
|
|
@$(sed) -r -e 's,@@CT_BINDIR@@,$(bindir),g;' \
|
|
|
|
-e 's,@@CT_LIBDIR@@,$(libdir),g;' \
|
|
|
|
-e 's,@@CT_DOCDIR@@,$(docdir),g;' \
|
|
|
|
-e 's,@@CT_MANDIR@@,$(mandir),g;' \
|
2011-08-17 21:05:01 +00:00
|
|
|
-e 's,@@CT_PROG_NAME@@,$(PROG_NAME),g;' \
|
|
|
|
-e 's,@@CT_VERSION@@,$(VERSION),g;' \
|
|
|
|
-e 's,@@CT_DATE@@,$(DATE),g;' \
|
|
|
|
-e 's,@@CT_make@@,$(make),g;' \
|
|
|
|
-e 's,@@CT_bash@@,$(bash),g;' \
|
|
|
|
$< >$@
|
|
|
|
endef
|
|
|
|
|
2011-08-19 20:43:01 +00:00
|
|
|
docs/$(PROG_NAME).1: docs/ct-ng.1.in Makefile
|
|
|
|
$(call sed_it)
|
|
|
|
|
2011-08-21 21:11:26 +00:00
|
|
|
$(PROG_NAME): ct-ng.in Makefile
|
2011-08-17 21:05:01 +00:00
|
|
|
$(call sed_it)
|
|
|
|
|
|
|
|
%: %.in Makefile
|
|
|
|
$(call sed_it)
|
2009-01-25 22:58:26 +00:00
|
|
|
|
|
|
|
# We create a script fragment that is parseable from inside a Makefile,
|
|
|
|
# but also from inside a shell script, hence the reason why we don't
|
2009-11-17 18:01:22 +00:00
|
|
|
# use := to set variables, although that will incur a (very small)
|
2009-01-25 22:58:26 +00:00
|
|
|
# penalty from the Makefile that includes it (due to re-evaluation at
|
|
|
|
# each call).
|
2011-05-26 20:51:03 +00:00
|
|
|
paths.mk: FORCE
|
2009-01-25 22:58:26 +00:00
|
|
|
@echo " GEN '$@'"
|
|
|
|
@(echo "export install=$(install)"; \
|
|
|
|
echo "export bash=$(bash)"; \
|
|
|
|
echo "export grep=$(grep)"; \
|
|
|
|
echo "export make=$(make)"; \
|
|
|
|
echo "export sed=$(sed)"; \
|
2010-05-17 12:11:08 +00:00
|
|
|
echo "export libtool=$(libtool)"; \
|
2011-08-22 07:40:31 +00:00
|
|
|
echo "export libtoolize=$(libtoolize)"; \
|
2010-05-17 12:11:08 +00:00
|
|
|
echo "export objcopy=$(objcopy)"; \
|
|
|
|
echo "export objdump=$(objdump)"; \
|
|
|
|
echo "export readelf=$(readelf)"; \
|
|
|
|
echo "export patch=$(patch)"; \
|
2009-01-25 22:58:26 +00:00
|
|
|
) >paths.mk
|
2007-07-01 19:04:20 +00:00
|
|
|
|
2011-05-26 20:51:03 +00:00
|
|
|
config/configure.in: FORCE
|
|
|
|
@echo " GEN '$@'"
|
|
|
|
@{ printf "# Generated file, do not edit\n"; \
|
|
|
|
printf "# Default values as found by ./configure\n"; \
|
|
|
|
for var in $(KCONFIG); do \
|
|
|
|
printf "\n"; \
|
|
|
|
printf "config CONFIGURE_$${var%%=*}\n"; \
|
|
|
|
if [ "$${var#*=}" = "y" ]; then \
|
2011-08-22 15:13:42 +00:00
|
|
|
printf " def_bool y\n"; \
|
|
|
|
else \
|
|
|
|
printf " bool\n"; \
|
2011-05-26 20:51:03 +00:00
|
|
|
fi; \
|
|
|
|
done; \
|
|
|
|
} >$@
|
|
|
|
|
|
|
|
FORCE:
|
|
|
|
|
2007-07-01 19:04:20 +00:00
|
|
|
#--------------------------------------
|
|
|
|
# Clean rules
|
|
|
|
|
|
|
|
clean-bin:
|
2011-08-19 20:53:48 +00:00
|
|
|
@echo " RM '$(PROG_NAME)'"
|
|
|
|
@rm -f $(PROG_NAME)
|
2009-05-13 21:32:48 +00:00
|
|
|
@echo " RM 'scripts/crosstool-NG.sh'"
|
2009-01-27 19:53:44 +00:00
|
|
|
@rm -f scripts/crosstool-NG.sh
|
2009-05-13 21:32:48 +00:00
|
|
|
@echo " RM 'scripts/saveSample.sh'"
|
2009-02-01 17:11:46 +00:00
|
|
|
@rm -f scripts/saveSample.sh
|
2009-05-13 21:32:48 +00:00
|
|
|
@echo " RM 'scripts/showTuple.sh'"
|
2009-05-13 18:10:47 +00:00
|
|
|
@rm -f scripts/showTuple.sh
|
2007-07-01 19:04:20 +00:00
|
|
|
|
|
|
|
clean-lib:
|
2009-01-25 22:59:55 +00:00
|
|
|
@echo " RM 'paths.mk'"
|
|
|
|
@rm -f paths.mk
|
2011-05-26 20:51:03 +00:00
|
|
|
@echo " RM 'config/configure.in'"
|
|
|
|
@rm -f config/configure.in
|
2007-07-01 19:04:20 +00:00
|
|
|
|
|
|
|
clean-doc:
|
2008-06-11 22:18:06 +00:00
|
|
|
|
|
|
|
clean-man:
|
2011-08-19 20:53:48 +00:00
|
|
|
@echo " RM 'docs/$(PROG_NAME).1'"
|
|
|
|
@rm -f docs/$(PROG_NAME).1
|
|
|
|
@echo " RM 'docs/$(PROG_NAME).1.gz'"
|
|
|
|
@rm -f docs/$(PROG_NAME).1.gz
|
2007-07-01 19:04:20 +00:00
|
|
|
|
|
|
|
#--------------------------------------
|
2008-06-11 21:45:57 +00:00
|
|
|
# Check for --local setup
|
2007-07-01 19:04:20 +00:00
|
|
|
|
2011-11-07 21:28:40 +00:00
|
|
|
ifeq ($(strip $(LOCAL)),yes)
|
2008-11-16 22:19:57 +00:00
|
|
|
|
2008-12-16 18:12:34 +00:00
|
|
|
real-install:
|
2009-04-20 19:57:16 +00:00
|
|
|
@true
|
2008-11-16 22:19:57 +00:00
|
|
|
|
|
|
|
real-uninstall:
|
|
|
|
@true
|
|
|
|
|
|
|
|
else
|
2007-07-22 17:44:27 +00:00
|
|
|
|
2008-06-11 21:45:57 +00:00
|
|
|
#--------------------------------------
|
|
|
|
# Install rules
|
|
|
|
|
2010-04-01 22:18:26 +00:00
|
|
|
real-install: $(patsubst %,install-%,$(TARGETS)) install-post
|
2008-11-16 22:19:57 +00:00
|
|
|
|
2011-11-07 21:28:40 +00:00
|
|
|
install-bin: $(DESTDIR)$(bindir)
|
2011-08-19 20:53:48 +00:00
|
|
|
@echo " INST '$(PROG_NAME)'"
|
2011-11-07 21:28:40 +00:00
|
|
|
@$(install) -m 755 $(PROG_NAME) "$(DESTDIR)$(bindir)/$(PROG_NAME)"
|
2007-07-01 19:04:20 +00:00
|
|
|
|
2008-06-11 22:18:06 +00:00
|
|
|
# If one is hacking crosstool-NG, the patch set might change between any two
|
|
|
|
# installations of the same VERSION, thus the patches must be removed prior
|
|
|
|
# to being installed. It is simpler to remove the whole lib/ directory, as it
|
|
|
|
# is the goal of the install-lib rule to install the lib/ directory...
|
2011-11-07 21:28:40 +00:00
|
|
|
install-lib: uninstall-lib $(DESTDIR)$(libdir) install-lib-main install-lib-samples
|
2007-07-01 19:04:20 +00:00
|
|
|
|
2010-06-27 14:40:21 +00:00
|
|
|
LIB_SUB_DIR := config contrib kconfig patches scripts
|
2011-11-07 21:28:40 +00:00
|
|
|
$(patsubst %,install-lib-%-copy,$(LIB_SUB_DIR)): $(DESTDIR)$(libdir)
|
2010-06-27 14:40:21 +00:00
|
|
|
@echo " INSTDIR '$(patsubst install-lib-%-copy,%,$(@))/'"
|
|
|
|
@tar cf - --exclude='*.sh.in' $(patsubst install-lib-%-copy,%,$(@)) \
|
2011-11-07 21:28:40 +00:00
|
|
|
|(cd "$(DESTDIR)$(libdir)"; tar xf -)
|
2010-06-27 14:40:21 +00:00
|
|
|
|
|
|
|
# Huh? It seems we need at least one command to make this rule kick-in.
|
|
|
|
install-lib-%: install-lib-%-copy; @true
|
|
|
|
|
|
|
|
# Huh? that one does not inherit the -opy dependency, above...
|
|
|
|
install-lib-scripts: install-lib-scripts-copy
|
2011-11-07 21:28:40 +00:00
|
|
|
@chmod a+x $(DESTDIR)$(libdir)/scripts/crosstool-NG.sh
|
|
|
|
@chmod a+x $(DESTDIR)$(libdir)/scripts/saveSample.sh
|
|
|
|
@rm -f "$(DESTDIR)$(libdir)/scripts/addToolVersion.sh"
|
2010-06-27 14:40:21 +00:00
|
|
|
|
2011-11-07 21:28:40 +00:00
|
|
|
install-lib-main: $(DESTDIR)$(libdir) $(patsubst %,install-lib-%,$(LIB_SUB_DIR))
|
2010-06-27 14:40:21 +00:00
|
|
|
@echo " INST 'steps.mk'"
|
2011-11-07 21:28:40 +00:00
|
|
|
@$(install) -m 644 steps.mk "$(DESTDIR)$(libdir)/steps.mk"
|
2010-06-27 14:40:21 +00:00
|
|
|
@echo " INST 'paths.mk'"
|
2011-11-07 21:28:40 +00:00
|
|
|
@$(install) -m 644 paths.mk "$(DESTDIR)$(libdir)/paths.mk"
|
2007-07-01 19:04:20 +00:00
|
|
|
|
|
|
|
# Samples need a little love:
|
2008-02-14 22:44:34 +00:00
|
|
|
# - change every occurrence of CT_TOP_DIR to CT_LIB_DIR
|
2011-11-07 21:28:40 +00:00
|
|
|
install-lib-samples: $(DESTDIR)$(libdir) install-lib-main
|
2010-06-27 14:40:21 +00:00
|
|
|
@echo " INSTDIR 'samples/'"
|
2011-07-31 18:44:10 +00:00
|
|
|
@for samp_dir in samples/*/; do \
|
2011-11-07 21:28:40 +00:00
|
|
|
mkdir -p "$(DESTDIR)$(libdir)/$${samp_dir}"; \
|
2011-04-28 21:36:37 +00:00
|
|
|
$(sed) -r -e 's:\$$\{CT_TOP_DIR\}:\$$\{CT_LIB_DIR\}:;' \
|
|
|
|
-e 's:^(CT_WORK_DIR)=.*:\1="\$${CT_TOP_DIR}/.build":;' \
|
2011-07-31 18:44:10 +00:00
|
|
|
$${samp_dir}/crosstool.config \
|
2011-11-07 21:28:40 +00:00
|
|
|
>"$(DESTDIR)$(libdir)/$${samp_dir}/crosstool.config"; \
|
2011-07-31 18:44:10 +00:00
|
|
|
$(install) -m 644 "$${samp_dir}/reported.by" \
|
2011-11-07 21:28:40 +00:00
|
|
|
"$(DESTDIR)$(libdir)/$${samp_dir}"; \
|
2011-07-31 18:44:10 +00:00
|
|
|
for libc_cfg in "$${samp_dir}/"*libc*.config; do \
|
|
|
|
[ -f "$${libc_cfg}" ] || continue; \
|
|
|
|
$(install) -m 644 "$${libc_cfg}" \
|
2011-11-07 21:28:40 +00:00
|
|
|
"$(DESTDIR)$(libdir)/$${samp_dir}"; \
|
2011-07-31 18:44:10 +00:00
|
|
|
done; \
|
2007-07-01 19:04:20 +00:00
|
|
|
done
|
2011-11-07 21:28:40 +00:00
|
|
|
@$(install) -m 644 samples/samples.mk "$(DESTDIR)$(libdir)/samples/samples.mk"
|
2007-07-01 19:04:20 +00:00
|
|
|
|
2011-11-07 21:28:40 +00:00
|
|
|
install-doc: $(DESTDIR)$(docdir)
|
2010-08-14 14:37:11 +00:00
|
|
|
@echo " INST 'docs/*.txt'"
|
|
|
|
@for doc_file in docs/*.txt; do \
|
2011-11-07 21:28:40 +00:00
|
|
|
$(install) -m 644 "$${doc_file}" "$(DESTDIR)$(docdir)"; \
|
2007-07-01 19:04:20 +00:00
|
|
|
done
|
2007-07-14 10:19:01 +00:00
|
|
|
|
2011-11-07 21:28:40 +00:00
|
|
|
install-man: $(DESTDIR)$(mandir)$(MAN_SUBDIR)
|
2011-08-19 20:53:48 +00:00
|
|
|
@echo " INST '$(PROG_NAME).1.gz'"
|
2011-11-07 21:28:40 +00:00
|
|
|
@$(install) -m 644 docs/$(PROG_NAME).1.gz "$(DESTDIR)$(mandir)$(MAN_SUBDIR)"
|
2007-07-01 19:04:20 +00:00
|
|
|
|
2011-11-07 21:28:40 +00:00
|
|
|
$(sort $(DESTDIR)$(bindir) $(DESTDIR)$(libdir) $(DESTDIR)$(docdir) $(DESTDIR)$(mandir)$(MAN_SUBDIR)):
|
2010-06-27 14:40:21 +00:00
|
|
|
@echo " MKDIR '$@/'"
|
2009-01-25 22:58:26 +00:00
|
|
|
@$(install) -m 755 -d "$@"
|
2007-07-01 19:04:20 +00:00
|
|
|
|
2010-04-01 22:18:26 +00:00
|
|
|
install-post:
|
|
|
|
@echo
|
2011-08-19 20:53:48 +00:00
|
|
|
@echo "For auto-completion, do not forget to install '$(PROG_NAME).comp' into"
|
2010-06-27 14:40:21 +00:00
|
|
|
@echo "your bash completion directory (usually /etc/bash_completion.d)"
|
2007-07-01 19:04:20 +00:00
|
|
|
|
|
|
|
#--------------------------------------
|
|
|
|
# Uninstall rules
|
|
|
|
|
2008-11-16 22:19:57 +00:00
|
|
|
real-uninstall: $(patsubst %,uninstall-%,$(TARGETS))
|
|
|
|
|
2008-06-11 21:45:57 +00:00
|
|
|
uninstall-bin:
|
2011-11-07 21:28:40 +00:00
|
|
|
@echo " RM '$(DESTDIR)$(bindir)/$(PROG_NAME)'"
|
|
|
|
@rm -f "$(DESTDIR)$(bindir)/$(PROG_NAME)"
|
2007-07-01 19:04:20 +00:00
|
|
|
|
2008-06-11 21:45:57 +00:00
|
|
|
uninstall-lib:
|
2011-11-07 21:28:40 +00:00
|
|
|
@echo " RMDIR '$(DESTDIR)$(libdir)/'"
|
|
|
|
@rm -rf "$(DESTDIR)$(libdir)"
|
2007-07-01 19:04:20 +00:00
|
|
|
|
2008-06-11 21:45:57 +00:00
|
|
|
uninstall-doc:
|
2011-11-07 21:28:40 +00:00
|
|
|
@echo " RMDIR '$(DESTDIR)$(docdir)/'"
|
|
|
|
@rm -rf "$(DESTDIR)$(docdir)"
|
2007-07-28 20:45:24 +00:00
|
|
|
|
2008-06-11 21:45:57 +00:00
|
|
|
uninstall-man:
|
2011-11-07 21:28:40 +00:00
|
|
|
@echo " RM '$(DESTDIR)$(mandir)$(MAN_SUBDIR)/$(PROG_NAME).1.gz'"
|
|
|
|
@rm -f "$(DESTDIR)$(mandir)$(MAN_SUBDIR)/$(PROG_NAME).1"{,.gz}
|
2008-11-16 22:19:57 +00:00
|
|
|
|
|
|
|
endif # Not --local
|
2009-01-26 22:43:08 +00:00
|
|
|
|
|
|
|
endif # No extra MAKEFLAGS were added
|
2011-09-28 23:27:54 +00:00
|
|
|
|
|
|
|
.PHONY: build $(patsubst %,build-%,$(TARGETS)) install
|