| 20 |
endif |
endif |
| 21 |
export version debnum DEBIAN_UPSTREAM_VERSION |
export version debnum DEBIAN_UPSTREAM_VERSION |
| 22 |
|
|
| 23 |
karch := $(DEB_HOST_ARCH) |
karch := $(DEB_HOST_ARCH) |
| 24 |
|
# |
| 25 |
|
# Build the list of common config files to be included |
| 26 |
|
# |
| 27 |
ifeq ($(subarch),none) |
ifeq ($(subarch),none) |
| 28 |
basedir := arch/$(karch) |
basedir := arch/$(karch) |
| 29 |
else |
else |
| 30 |
basedir := arch/$(karch)/$(subarch) |
basedir := arch/$(karch)/$(subarch) |
| 31 |
endif |
endif |
| 32 |
default := $(basedir)/config.default |
default := $(basedir)/config.default |
| 33 |
configs := $(notdir $(wildcard $(basedir)/config.*)) |
configs := $(notdir $(wildcard $(basedir)/config.*)) |
| 34 |
configs := $(filter-out config.common config.default, $(configs)) |
configs := $(filter-out config.common config.default, $(configs)) |
| 35 |
tkdir := kernel-source-$(version) |
tkdir := kernel-source-$(version) |
| 36 |
kdir := kernel-source-$(version)-$(subarch) |
kdir := kernel-source-$(version)-$(subarch) |
| 37 |
ifndef flavours |
ifndef flavours |
| 38 |
flavours := $(patsubst config.%,%,$(configs)) |
flavours := $(patsubst config.%,%,$(configs)) |
| 39 |
endif |
endif |
| 71 |
ifndef headers_dirs |
ifndef headers_dirs |
| 72 |
headers_dirs = $(karch) |
headers_dirs = $(karch) |
| 73 |
endif |
endif |
| 74 |
|
ifneq (no,$(include_common_config)) |
| 75 |
|
ccommon := arch/config.common |
| 76 |
|
endif |
| 77 |
|
ccommon += arch/$(karch)/config.common arch/$(karch)/$(subarch)/config.common |
| 78 |
# |
# |
| 79 |
# TODO: |
# TODO: |
| 80 |
# * Check that make oldconfig does not actually |
# * Check that make oldconfig does not actually |
| 142 |
-e 's,@headers_extra@,$(headers_extra),g' \ |
-e 's,@headers_extra@,$(headers_extra),g' \ |
| 143 |
header-install.in > header-install-$(subarch) |
header-install.in > header-install-$(subarch) |
| 144 |
chmod u+x header-install-$(subarch) |
chmod u+x header-install-$(subarch) |
| 145 |
|
# |
| 146 |
|
# The way to make the correct package names is to make a |
| 147 |
|
# subarch-specific post-install script... |
| 148 |
|
# |
| 149 |
post-install: post-install.in |
post-install: post-install.in |
| 150 |
sed -e 's,@initrd_modules@,$(initrd_modules),' \ |
sed -e 's,@initrd_modules@,$(initrd_modules),' \ |
| 151 |
post-install.in > post-install |
post-install.in > post-install |
| 156 |
# and subarch specific one (arch/$(karch)/config.subarch). |
# and subarch specific one (arch/$(karch)/config.subarch). |
| 157 |
# It is possible to avoid the inclusion of the arch-indep |
# It is possible to avoid the inclusion of the arch-indep |
| 158 |
# config file by setting include_common_config = no in the |
# config file by setting include_common_config = no in the |
| 159 |
# arch/$(karch)/Makefile.inc. Absense of any of the above |
# arch/$(karch)/Makefile.inc. |
|
# files is ignored. |
|
| 160 |
# |
# |
| 161 |
config.%: |
config.%: |
| 162 |
@echo -n "Generating configuration file $@ ..." |
@echo "Generating configuration file $@:" |
| 163 |
arch='$(basedir)/config.common'; \ |
rm -f $@ |
| 164 |
subarch='$(basedir)/$@'; \ |
for i in $(ccommon); do \ |
| 165 |
include=''; \ |
if [ -f $${i} ]; then \ |
| 166 |
if [ '$(include_common_config)' != 'no' ]; then \ |
cat $${i} >> $@; \ |
| 167 |
include='arch/config.common'; \ |
fi; \ |
| 168 |
fi; \ |
done |
| 169 |
if [ -f "$${arch}" ]; then \ |
# Flavour config file must be present |
| 170 |
include="$${include} $${arch}"; \ |
cat $(basedir)/$@ >> $@ |
|
fi; \ |
|
|
if [ -f "$${subarch}" ]; then \ |
|
|
include="$${include} $${subarch}"; \ |
|
|
fi; \ |
|
|
cat $${include} > $@ |
|
|
@echo " done." |
|
| 171 |
# |
# |
| 172 |
# TODO: subarch specific patches |
# TODO: subarch specific patches |
| 173 |
# |
# |