Revision 1215c6e7
b/Makefile | ||
---|---|---|
29 | 29 |
DOCS= |
30 | 30 |
endif |
31 | 31 |
|
32 |
build-all: $(TOOLS) $(DOCS) recurse-all |
|
32 |
SUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory) |
|
33 |
|
|
34 |
build-all: config-host.h |
|
35 |
$(call quiet-command, $(MAKE) $(SUBDIR_MAKEFLAGS) $(TOOLS) $(DOCS) recurse-all,) |
|
33 | 36 |
|
34 | 37 |
config-host.mak: configure |
35 | 38 |
ifneq ($(wildcard config-host.mak),) |
... | ... | |
37 | 40 |
@sed -n "/.*Configured with/s/[^:]*: //p" $@ | sh |
38 | 41 |
endif |
39 | 42 |
|
40 |
SUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory) |
|
43 |
config-host.h: config-host.h-timestamp |
|
44 |
config-host.h-timestamp: config-host.mak |
|
45 |
|
|
41 | 46 |
SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_DIRS)) |
42 | 47 |
|
43 |
subdir-%: |
|
48 |
subdir-%: config-host.h
|
|
44 | 49 |
$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V="$(V)" TARGET_DIR="$*/" all,) |
45 | 50 |
|
46 | 51 |
$(filter %-softmmu,$(SUBDIR_RULES)): libqemu_common.a |
... | ... | |
200 | 205 |
done |
201 | 206 |
|
202 | 207 |
distclean: clean |
203 |
rm -f config-host.mak config-host.h config-host.ld $(DOCS) qemu-options.texi qemu-img-cmds.texi |
|
208 |
rm -f config-host.mak config-host.h* config-host.ld $(DOCS) qemu-options.texi qemu-img-cmds.texi
|
|
204 | 209 |
rm -f qemu-{doc,tech}.{info,aux,cp,dvi,fn,info,ky,log,pg,toc,tp,vr} |
205 | 210 |
for d in $(TARGET_DIRS) libhw32 libhw64 libuser; do \ |
206 | 211 |
rm -rf $$d || exit 1 ; \ |
b/configure | ||
---|---|---|
1800 | 1800 |
fi |
1801 | 1801 |
|
1802 | 1802 |
config_host_mak="config-host.mak" |
1803 |
config_host_h="config-host.h" |
|
1804 | 1803 |
config_host_ld="config-host.ld" |
1805 | 1804 |
|
1806 |
#echo "Creating $config_host_mak and $config_host_h" |
|
1807 |
|
|
1808 |
test -f $config_host_h && mv $config_host_h ${config_host_h}~ |
|
1809 |
|
|
1810 | 1805 |
echo "# Automatically generated by configure - do not modify" > $config_host_mak |
1811 | 1806 |
printf "# Configured with:" >> $config_host_mak |
1812 | 1807 |
printf " '%s'" "$0" "$@" >> $config_host_mak |
... | ... | |
2064 | 2059 |
echo "LIBS_TOOLS+=$libs_tools" >> $config_host_mak |
2065 | 2060 |
echo "EXESUF=$EXESUF" >> $config_host_mak |
2066 | 2061 |
|
2067 |
echo "/* Automatically generated by configure - do not modify */" > $config_host_h |
|
2068 |
|
|
2069 |
/bin/sh $source_path/create_config < $config_host_mak >> $config_host_h |
|
2070 |
|
|
2071 |
if test -f ${config_host_h}~ ; then |
|
2072 |
if cmp -s $config_host_h ${config_host_h}~ ; then |
|
2073 |
mv ${config_host_h}~ $config_host_h |
|
2074 |
else |
|
2075 |
rm ${config_host_h}~ |
|
2076 |
fi |
|
2077 |
fi |
|
2078 |
|
|
2079 | 2062 |
# generate list of library paths for linker script |
2080 | 2063 |
|
2081 | 2064 |
$ld --verbose -v 2> /dev/null | grep SEARCH_DIR > ${config_host_ld} |
... | ... | |
2474 | 2457 |
echo "LDFLAGS+=$ldflags" >> $config_mak |
2475 | 2458 |
echo "QEMU_CFLAGS+=$cflags" >> $config_mak |
2476 | 2459 |
|
2477 |
echo "/* Automatically generated by configure - do not modify */" > $config_h |
|
2478 |
echo "#include \"../config-host.h\"" >> $config_h |
|
2460 |
echo "#include \"../config-host.h\"" > $config_h |
|
2479 | 2461 |
|
2480 | 2462 |
/bin/sh $source_path/create_config < $config_mak >> $config_h |
2481 | 2463 |
|
b/create_config | ||
---|---|---|
1 | 1 |
#!/bin/sh |
2 | 2 |
|
3 |
echo "/* Automatically generated by create_config - do not modify */" |
|
4 |
|
|
3 | 5 |
while read line; do |
4 | 6 |
|
5 | 7 |
case $line in |
b/rules.mak | ||
---|---|---|
35 | 35 |
|
36 | 36 |
cc-option = $(if $(shell $(CC) $1 $2 -S -o /dev/null -xc /dev/null \ |
37 | 37 |
>/dev/null 2>&1 && echo OK), $2, $3) |
38 |
|
|
39 |
# Generate timestamp files for .h include files |
|
40 |
|
|
41 |
%.h: %.h-timestamp |
|
42 |
@test -f $@ || cp $< $@ |
|
43 |
|
|
44 |
%.h-timestamp: %.mak |
|
45 |
$(call quiet-command, $(SRC_PATH)/create_config < $< > $@, " GEN $*.h") |
|
46 |
@cmp $@ $*.h >/dev/null 2>&1 || cp $@ $*.h |
Also available in: Unified diff