Revision a992fe3d

b/Makefile
1 1
# Makefile for QEMU.
2 2

  
3 3
# This needs to be defined before rules.mak
4
GENERATED_HEADERS = config-host.h config-all-devices.h
4
GENERATED_HEADERS = config-host.h
5 5

  
6 6
ifneq ($(wildcard config-host.mak),)
7 7
# Put the all: rule here so that config-host.mak can contain dependencies.
......
41 41
config-all-devices.mak: $(SUBDIR_DEVICES_MAK)
42 42
	$(call quiet-command,cat $(SUBDIR_DEVICES_MAK) | grep "=y$$" | sort -u > $@,"  GEN   $@")
43 43

  
44
%/config-devices.mak: default-configs/%.mak
45
	$(call quiet-command,cat $< > $@.tmp, "  GEN   $@")
46
	@if test -f $@ ; then \
47
	  echo "WARNING: $@ out of date." ;\
48
	  echo "Run \"make defconfing\" to regenerate." ; \
49
	  rm $@.tmp ; \
50
	 else \
51
	  mv $@.tmp $@ ; \
52
	 fi
53

  
54
defconfig:
55
	rm -f config-all-devices.mak $(SUBDIR_DEVICES_MAK)
56

  
44 57
-include config-all-devices.mak
45 58

  
46 59
build-all: $(DOCS) $(TOOLS) recurse-all
......
48 61
config-host.h: config-host.h-timestamp
49 62
config-host.h-timestamp: config-host.mak
50 63

  
51
config-all-devices.h: config-all-devices.h-timestamp
52
config-all-devices.h-timestamp: config-all-devices.mak
53

  
54 64
SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_DIRS))
55 65

  
56 66
subdir-%: $(GENERATED_HEADERS)
......
246 256

  
247 257
distclean: clean
248 258
	rm -f config-host.mak config-host.h* config-host.ld $(DOCS) qemu-options.texi qemu-img-cmds.texi qemu-monitor.texi
249
	rm -f config-all-devices.mak config-all-devices.h*
259
	rm -f config-all-devices.mak
250 260
	rm -f roms/seabios/config.mak roms/vgabios/config.mak
251 261
	rm -f qemu-{doc,tech}.{info,aux,cp,dvi,fn,info,ky,log,pg,toc,tp,vr}
252 262
	for d in $(TARGET_DIRS) libhw32 libhw64 libuser; do \
b/Makefile.target
1 1
# -*- Mode: makefile -*-
2 2

  
3 3
# This needs to be defined before rules.mak
4
GENERATED_HEADERS = config-target.h config-devices.h
4
GENERATED_HEADERS = config-target.h
5 5

  
6 6
include ../config-host.mak
7 7
include config-devices.mak
b/config.h
1

  
2 1
#include "config-host.h"
3 2
#include "config-target.h"
4

  
5
/* We want to include different config files for specific targets
6
   And for the common library.  They need a different name because
7
   we don't want to rely in paths */
8

  
9
#if defined(NEED_CPU_H)
10
#include "config-devices.h"
11
#else
12
#include "config-all-devices.h"
13
#endif
b/configure
2209 2209
  mkdir -p $target_dir/nwfpe
2210 2210
fi
2211 2211

  
2212
if test ! -f $target_dir/config-devices.mak ; then
2213
  cp $source_path/default-configs/${target}.mak $target_dir/config-devices.mak
2214
fi
2215

  
2216 2212
#
2217 2213
# don't use ln -sf as not all "ln -sf" over write the file/link
2218 2214
#

Also available in: Unified diff