diff options
Diffstat (limited to 'rules/build-prog.mk')
-rw-r--r-- | rules/build-prog.mk | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/rules/build-prog.mk b/rules/build-prog.mk index 7fbe7897cb..4bf9ab09e4 100644 --- a/rules/build-prog.mk +++ b/rules/build-prog.mk @@ -87,15 +87,21 @@ else $1_$2_INPLACE = endif else +ifeq "$(findstring clean,$(MAKECMDGOALS))" "" +ifneq "$$($$($1_$2_PROG)_INPLACE)" "" +$$(error $$($1_$2_PROG)_INPLACE defined twice) +endif +endif +ifeq "$$($1_$2_TOPDIR)" "YES" +$$($1_$2_PROG)_INPLACE = $$(INPLACE_TOPDIR)/$$($1_$2_PROG) +else +$$($1_$2_PROG)_INPLACE = $$(INPLACE_BIN)/$$($1_$2_PROG) +endif # Where do we install the inplace version? ifeq "$$($1_$2_WANT_INPLACE_WRAPPER)" "YES" $1_$2_INPLACE = $$(INPLACE_LIB)/bin/$$($1_$2_PROG) else -ifeq "$$($1_$2_TOPDIR)" "YES" -$1_$2_INPLACE = $$(INPLACE_TOPDIR)/$$($1_$2_PROG) -else -$1_$2_INPLACE = $$(INPLACE_BIN)/$$($1_$2_PROG) -endif +$1_$2_INPLACE = $$($$($1_$2_PROG)_INPLACE) endif endif |