Adjusted the KernelConfigSection and WriteConfigFile rules. Now the former eats arbitrary targets. Adjusted KernelLd to make use of it.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@165 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -763,9 +763,8 @@ rule KernelLd
|
|||||||
Depends $(1) : $(2) ;
|
Depends $(1) : $(2) ;
|
||||||
|
|
||||||
if $(6) {
|
if $(6) {
|
||||||
Depends $(OBOS_KERNEL_CONFIG) : $(1) ;
|
|
||||||
for i in $(6) {
|
for i in $(6) {
|
||||||
SECTIONS on $(OBOS_KERNEL_CONFIG) += ":" $(i) elf32 [ FDirName $(LOCATE_TARGET) $(1) ] ;
|
KernelConfigSection $(i) : elf32 : $(1) ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -836,7 +835,12 @@ rule SystemMain
|
|||||||
rule KernelConfigSection
|
rule KernelConfigSection
|
||||||
{
|
{
|
||||||
# KernelConfigSection <section> : <type> : <file> ;
|
# KernelConfigSection <section> : <type> : <file> ;
|
||||||
SECTIONS on $(OBOS_KERNEL_CONFIG) += ":" $(1) $(2) $(3) ;
|
|
||||||
|
SECTION_NAMES on $(OBOS_KERNEL_CONFIG) += $(1) ;
|
||||||
|
SECTION_TYPES on $(OBOS_KERNEL_CONFIG) += $(2) ;
|
||||||
|
SECTION_FILES on $(OBOS_KERNEL_CONFIG) += $(3) ;
|
||||||
|
|
||||||
|
Depends $(OBOS_KERNEL_CONFIG) : $(3) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
rule WriteKernelConfig
|
rule WriteKernelConfig
|
||||||
@@ -845,42 +849,43 @@ rule WriteKernelConfig
|
|||||||
|
|
||||||
Depends files : $(1) ;
|
Depends files : $(1) ;
|
||||||
|
|
||||||
LOCATE on $(1) = $(LOCATE_TARGET) ;
|
MakeLocate $(1) : $(OBOS_OBJECT_TARGET) ;
|
||||||
|
|
||||||
MakeLocate $(1) : $(LOCATE_TARGET) ;
|
|
||||||
|
|
||||||
Clean clean : $(1) ;
|
Clean clean : $(1) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
actions WriteKernelConfig
|
actions WriteKernelConfig bind SECTION_FILES
|
||||||
{
|
{
|
||||||
target="$(1)"
|
target="$(1)"
|
||||||
echo "# OpenBeOS Kernel Config File" > "$target"
|
echo "# OpenBeOS Kernel Config File" > "$target"
|
||||||
echo "# Automatically generated - do not edit!" >> "$target"
|
echo "# Automatically generated - do not edit!" >> "$target"
|
||||||
issection="0"
|
count=0
|
||||||
section=
|
for section in "$(SECTION_NAMES)" ; do
|
||||||
for i in "$(SECTIONS)" ; do
|
count=`expr $count + 1`
|
||||||
if [ $issection == 1 ]; then
|
eval section$count="$section"
|
||||||
section="$i"
|
done
|
||||||
issection=2
|
i=1
|
||||||
echo "["$section"]" >> "$target"
|
for type in "$(SECTION_TYPES)" ; do
|
||||||
elif [ $issection == 2 ]; then
|
eval type$i="$type"
|
||||||
type=$i
|
i=`expr $i + 1`
|
||||||
issection=3
|
done
|
||||||
echo "type="$type >> "$target"
|
i=1
|
||||||
else
|
for file in "$(SECTION_FILES)" ; do
|
||||||
if [ "$i" == ":" ]; then
|
eval file$i="$file"
|
||||||
issection=1
|
i=`expr $i + 1`
|
||||||
echo "" >> "$target"
|
done
|
||||||
else
|
for i in `seq $count` ; do
|
||||||
file="$i"
|
eval section="\$section$i"
|
||||||
case "$file" in
|
eval type="\$type$i"
|
||||||
/*) ;;
|
eval file="\$file$i"
|
||||||
*) file=`pwd`/"$file";;
|
echo "" >> "$target"
|
||||||
esac
|
echo "["$section"]" >> "$target"
|
||||||
echo "file="$file >> $target
|
echo "type="$type >> "$target"
|
||||||
fi
|
case "$file" in
|
||||||
fi
|
/*) ;;
|
||||||
|
*) file=`pwd`/"$file";;
|
||||||
|
esac
|
||||||
|
echo "file="$file >> "$target"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user