summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMans Rullgard <mans@mansr.com>2011-06-07 10:11:21 +0100
committerMans Rullgard <mans@mansr.com>2011-06-11 19:35:47 +0100
commit623ffe8c82c3194e4eff469add76b1478025cd22 (patch)
treebcf5913b83481c15a2f6fde4ca6b96c24634e158 /Makefile
parent19d824e47373594739bb9a05cd4e7edbc441b173 (diff)
build: simplify some conditional targets
Use intermediate targets instead of variables for conditional parts of "all" and "install" targets. Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile21
1 files changed, 11 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index db1a9bd150..7c7cdaf167 100644
--- a/Makefile
+++ b/Makefile
@@ -41,15 +41,9 @@ FF_LDFLAGS := $(FFLDFLAGS)
FF_EXTRALIBS := $(FFEXTRALIBS)
FF_DEP_LIBS := $(DEP_LIBS)
-ALL_TARGETS-$(CONFIG_DOC) += documentation
+all-$(CONFIG_DOC): documentation
-ifdef PROGS
-INSTALL_TARGETS-yes += install-progs install-data
-INSTALL_TARGETS-$(CONFIG_DOC) += install-man
-endif
-INSTALL_PROGS_TARGETS-$(CONFIG_SHARED) = install-libs
-
-all: $(FF_DEP_LIBS) $(PROGS) $(ALL_TARGETS-yes)
+all: $(FF_DEP_LIBS) $(PROGS)
config.h: .config
.config: $(wildcard $(FFLIBS:%=$(SRC_DIR)/lib%/all*.c))
@@ -127,11 +121,18 @@ doc/%.1: TAG = MAN
doc/%.1: doc/%.pod
$(M)pod2man --section=1 --center=" " --release=" " $< > $@
-install: install-libs install-headers $(INSTALL_TARGETS-yes)
+ifdef PROGS
+install: install-progs install-data
+endif
+
+install: install-libs install-headers
install-libs: install-libs-yes
-install-progs: $(PROGS) $(INSTALL_PROGS_TARGETS-yes)
+install-progs-$(CONFIG_DOC): install-man
+install-progs-$(CONFIG_SHARED): install-libs
+
+install-progs: install-progs-yes $(PROGS)
$(Q)mkdir -p "$(BINDIR)"
$(INSTALL) -c -m 755 $(PROGS) "$(BINDIR)"