diff options
author | Timo Teras <timo.teras@iki.fi> | 2009-08-05 16:58:12 +0300 |
---|---|---|
committer | Timo Teras <timo.teras@iki.fi> | 2009-08-05 16:58:12 +0300 |
commit | 4bedcb02ec93d98a3ad900abdf6ea138ea8adf0f (patch) | |
tree | 4a4266ba7d4a1e7a6e836dee741613e331943687 | |
parent | f14cbbf4e52883b73d713b45237f914949f942c1 (diff) | |
download | apk-tools-4bedcb02ec93d98a3ad900abdf6ea138ea8adf0f.tar.gz apk-tools-4bedcb02ec93d98a3ad900abdf6ea138ea8adf0f.tar.bz2 apk-tools-4bedcb02ec93d98a3ad900abdf6ea138ea8adf0f.tar.xz apk-tools-4bedcb02ec93d98a3ad900abdf6ea138ea8adf0f.zip |
build: update make rules
-rw-r--r-- | Make.rules | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -47,6 +47,8 @@ export srctree objtree ## # Consult SCM for better version string. +TAGPREFIX ?= v + GIT_REV := $(shell test -d .git && git describe || echo exported) ifneq ($(GIT_REV), exported) FULL_VERSION := $(patsubst $(TAGPREFIX)%,%,$(GIT_REV)) @@ -152,7 +154,8 @@ escsq = $(subst $(squote),'\$(squote)',$1) # Find any prerequisites that is newer than target or that does not exist. # PHONY targets skipped in both cases. -any-prereq = $(filter-out $(PHONY),$?) $(filter-out $(PHONY) $(wildcard $^),$^) +local-target-prereqs = % +any-prereq = $(filter $(local-target-prereqs), $(filter-out $(PHONY),$?) $(filter-out $(PHONY) $(wildcard $^), $^)) # Execute command if command has changed or prerequisite(s) are updated. # @@ -188,6 +191,8 @@ define rule_cc_o_c rm $(depfile) endef +$(obj)/%.o: override local-target-prereqs=% + $(obj)/%.o: $(src)/%.c FORCE $(call if_changed_rule,cc_o_c) @@ -204,6 +209,8 @@ quiet_cmd_ld = LD $@ $(addprefix $(obj)/,$($(@F)-objs)) \ $(LIBS) $(LIBS_$(@F)) +$(__progs): override local-target-prereqs=$(addprefix $(obj)/,$($(*F)-objs)) + $(__progs): $(obj)/%: $(cobjs) FORCE $(call if_changed,ld) |