Revision bd9141bb
b/Makefile | ||
---|---|---|
39 | 39 |
|
40 | 40 |
SUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory) |
41 | 41 |
SUBDIR_DEVICES_MAK=$(patsubst %, %/config-devices.mak, $(TARGET_DIRS)) |
42 |
SUBDIR_DEVICES_MAK_DEP=$(patsubst %, %/config-devices.mak.d, $(TARGET_DIRS)) |
|
42 | 43 |
|
43 | 44 |
config-all-devices.mak: $(SUBDIR_DEVICES_MAK) |
44 | 45 |
$(call quiet-command,cat $(SUBDIR_DEVICES_MAK) | grep =y | sort -u > $@," GEN $@") |
45 | 46 |
|
47 |
-include $(SUBDIR_DEVICES_MAK_DEP) |
|
48 |
|
|
46 | 49 |
%/config-devices.mak: default-configs/%.mak |
47 |
$(call quiet-command,cat $< > $@.tmp, " GEN $@")
|
|
50 |
$(call quiet-command,$(SHELL) $(SRC_PATH)/make_device_config.sh $@ $<, " GEN $@")
|
|
48 | 51 |
@if test -f $@; then \ |
49 | 52 |
if cmp -s $@.old $@; then \ |
50 |
if ! cmp -s $@ $@.tmp; then \ |
|
51 |
mv $@.tmp $@; \ |
|
52 |
cp -p $@ $@.old; \ |
|
53 |
fi; \ |
|
53 |
mv $@.tmp $@; \ |
|
54 |
cp -p $@ $@.old; \ |
|
54 | 55 |
else \ |
55 | 56 |
if test -f $@.old; then \ |
56 | 57 |
echo "WARNING: $@ (user modified) out of date.";\ |
b/Makefile.objs | ||
---|---|---|
160 | 160 |
hw-obj-y = |
161 | 161 |
hw-obj-y += vl.o loader.o |
162 | 162 |
hw-obj-y += virtio.o virtio-console.o |
163 |
hw-obj-y += fw_cfg.o pci.o pci_host.o pcie_host.o pci_bridge.o |
|
163 |
hw-obj-y += fw_cfg.o |
|
164 |
hw-obj-$(CONFIG_PCI) += pci.o pci_host.o pcie_host.o pci_bridge.o |
|
164 | 165 |
hw-obj-y += ioh3420.o xio3130_upstream.o xio3130_downstream.o |
165 | 166 |
hw-obj-y += watchdog.o |
166 | 167 |
hw-obj-$(CONFIG_ISA_MMIO) += isa_mmio.o |
b/make_device_config.sh | ||
---|---|---|
1 |
#! /bin/sh |
|
2 |
# Construct a target device config file from a default, pulling in any |
|
3 |
# files from include directives. |
|
4 |
|
|
5 |
dest=$1.tmp |
|
6 |
dep=$1.d |
|
7 |
src=$2 |
|
8 |
src_dir=`dirname $src` |
|
9 |
all_includes= |
|
10 |
|
|
11 |
process_includes () { |
|
12 |
cat $1 | grep '^include' | \ |
|
13 |
while read include file ; do |
|
14 |
all_includes="$all_includes $src_dir/$file" |
|
15 |
process_includes $src_dir/$file |
|
16 |
done |
|
17 |
} |
|
18 |
|
|
19 |
f=$src |
|
20 |
while [ -n "$f" ] ; do |
|
21 |
f=`awk '/^include / {print "'$src_dir'/" $2}' $f` |
|
22 |
all_includes="$all_includes $f" |
|
23 |
done |
|
24 |
process_includes $src > $dest |
|
25 |
|
|
26 |
cat $src $all_includes | grep -v '^include' > $dest |
|
27 |
echo "$1: $all_includes" > $dep |
Also available in: Unified diff