diff options
author | P. J. McDermott <pj@pehjota.net> | 2014-11-24 11:52:06 (EST) |
---|---|---|
committer | P. J. McDermott <pj@pehjota.net> | 2014-11-24 11:52:06 (EST) |
commit | a3a6c44e6d763ab8b2f49f8f97013f8d5e5e2424 (patch) | |
tree | 0e868492eded8caa3ca2110f9dba263bc4079720 | |
parent | d7414686e224ce9e9c2ece3d5eccaeb5e26735ea (diff) |
Makefile: Simplify hostprogs-y assignment
`make kconfig/mconf` works now as well.
-rw-r--r-- | Makefile | 19 |
1 files changed, 4 insertions, 15 deletions
@@ -11,21 +11,10 @@ include $(src)/Makefile $(obj)/.depend: $(wildcard *.h *.c) $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) -MM *.c > $@ 2>/dev/null || : -ifeq ($(MAKECMDGOALS),xconfig) -hostprogs-y := qconf -endif -ifeq ($(MAKECMDGOALS),gconfig) -hostprogs-y := gconf -endif -ifeq ($(MAKECMDGOALS),menuconfig) -hostprogs-y := mconf -endif -ifeq ($(MAKECMDGOALS),config) -hostprogs-y := conf -endif -ifeq ($(MAKECMDGOALS),nconfig) -hostprogs-y := nconf -endif +hostprogs-y := $(shell printf '%s' '$(MAKECMDGOALS)' | sed \ + -e 's|$(obj)/||;' \ + -e 's/xconfig/qconf/; s/gconfig/gconf/;' \ + -e 's/menuconfig/mconf/; s/config/conf/; s/nconfig/nconf/;') __hostprogs := $(sort $(hostprogs-y) $(hostprogs-m)) |