diff options
author | Paul Brook | 2009-11-22 17:25:30 +0100 |
---|---|---|
committer | Paul Brook | 2009-11-22 22:24:54 +0100 |
commit | a992fe3d0fc185112677286f7a02204d8245b61e (patch) | |
tree | c3cc533d4bb8e1ed5dfebba895bdd4bdb31e67d4 /Makefile | |
parent | target-mips: fix physical address type in MMU functions (diff) | |
download | qemu-a992fe3d0fc185112677286f7a02204d8245b61e.tar.gz qemu-a992fe3d0fc185112677286f7a02204d8245b61e.tar.xz qemu-a992fe3d0fc185112677286f7a02204d8245b61e.zip |
Makefile dependencies for device configs
Add makefile dependencies for target specific device configs.
These will copy the default config if none exists, obsoleting the old
configure time code. If a config already exists but is older than the
default then print a warning.
Also remove config-devices.h. Code does not and should not care which
devices are being built.
Signed-off-by: Paul Brook <paul@codesourcery.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 20 |
1 files changed, 15 insertions, 5 deletions
@@ -1,7 +1,7 @@ # Makefile for QEMU. # This needs to be defined before rules.mak -GENERATED_HEADERS = config-host.h config-all-devices.h +GENERATED_HEADERS = config-host.h ifneq ($(wildcard config-host.mak),) # Put the all: rule here so that config-host.mak can contain dependencies. @@ -41,6 +41,19 @@ SUBDIR_DEVICES_MAK=$(patsubst %, %/config-devices.mak, $(TARGET_DIRS)) config-all-devices.mak: $(SUBDIR_DEVICES_MAK) $(call quiet-command,cat $(SUBDIR_DEVICES_MAK) | grep "=y$$" | sort -u > $@," GEN $@") +%/config-devices.mak: default-configs/%.mak + $(call quiet-command,cat $< > $@.tmp, " GEN $@") + @if test -f $@ ; then \ + echo "WARNING: $@ out of date." ;\ + echo "Run \"make defconfing\" to regenerate." ; \ + rm $@.tmp ; \ + else \ + mv $@.tmp $@ ; \ + fi + +defconfig: + rm -f config-all-devices.mak $(SUBDIR_DEVICES_MAK) + -include config-all-devices.mak build-all: $(DOCS) $(TOOLS) recurse-all @@ -48,9 +61,6 @@ build-all: $(DOCS) $(TOOLS) recurse-all config-host.h: config-host.h-timestamp config-host.h-timestamp: config-host.mak -config-all-devices.h: config-all-devices.h-timestamp -config-all-devices.h-timestamp: config-all-devices.mak - SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_DIRS)) subdir-%: $(GENERATED_HEADERS) @@ -246,7 +256,7 @@ clean: distclean: clean rm -f config-host.mak config-host.h* config-host.ld $(DOCS) qemu-options.texi qemu-img-cmds.texi qemu-monitor.texi - rm -f config-all-devices.mak config-all-devices.h* + rm -f config-all-devices.mak rm -f roms/seabios/config.mak roms/vgabios/config.mak rm -f qemu-{doc,tech}.{info,aux,cp,dvi,fn,info,ky,log,pg,toc,tp,vr} for d in $(TARGET_DIRS) libhw32 libhw64 libuser; do \ |