X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=rules.mak;h=967295dd2b641b068970015dd442410e8ff3f55f;hb=da1725d3f9723668a61a3b83f1bf94ce14fc4e4b;hp=04c7f74d0786f5df332f8b2c38bc04d49ce6c2bd;hpb=8a99e9a30ca8c93082d9032627c5d522ff66e664;p=mirror_qemu.git diff --git a/rules.mak b/rules.mak index 04c7f74d07..967295dd2b 100644 --- a/rules.mak +++ b/rules.mak @@ -1,4 +1,7 @@ +# These are used when we want to do substitutions without confusing Make +NULL := +SPACE := $(NULL) # COMMA := , # Don't use implicit rules or variables @@ -129,7 +132,9 @@ modules: # otherwise print the 'quiet' output in the format " NAME args to print" # NAME should be a short name of the command, 7 letters or fewer. # If called with only a single argument, will print nothing in quiet mode. -quiet-command = $(if $(V),$1,$(if $(2),@printf " %-7s %s\n" $2 $3 && $1, @$1)) +quiet-command-run = $(if $(V),,$(if $2,printf " %-7s %s\n" $2 $3 && ))$1 +quiet-@ = $(if $(V),,@) +quiet-command = $(quiet-@)$(call quiet-command-run,$1,$2,$3) # cc-option # Usage: CFLAGS+=$(call cc-option, -falign-functions=0, -malign-functions=0) @@ -139,7 +144,7 @@ cc-option = $(if $(shell $(CC) $1 $2 -S -o /dev/null -xc /dev/null \ cc-c-option = $(if $(shell $(CC) $1 $2 -c -o /dev/null -xc /dev/null \ >/dev/null 2>&1 && echo OK), $2, $3) -VPATH_SUFFIXES = %.c %.h %.S %.cc %.cpp %.m %.mak %.texi %.sh %.rc +VPATH_SUFFIXES = %.c %.h %.S %.cc %.cpp %.m %.mak %.texi %.sh %.rc Kconfig% %.json.in set-vpath = $(if $1,$(foreach PATTERN,$(VPATH_SUFFIXES),$(eval vpath $(PATTERN) $1))) # install-prog list, dir @@ -322,7 +327,7 @@ endef # ../water/ice.mo-libs = -licemaker # ../water/ice.mo-objs = ../water/ice1.o ../water/ice2.o # -# Note that 'hot' didn't include 'season/' in the input, so 'summer.o' is not +# Note that 'hot' didn't include 'water/' in the input, so 'steam.o' is not # included. # define unnest-vars @@ -387,3 +392,10 @@ TEXI2MAN = $(call quiet-command, \ $(call TEXI2MAN) %.8: $(call TEXI2MAN) + +GEN_SUBST = $(call quiet-command, \ + sed -e "s!@libexecdir@!$(libexecdir)!g" < $< > $@, \ + "GEN","$@") + +%.json: %.json.in + $(call GEN_SUBST)