diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2010-10-27 11:43:49 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2010-10-28 13:13:37 +0200 |
commit | a9a3c5e2a70ae45317241e7d10bf00d22d0598ac (patch) | |
tree | 6a02f6b2dd5c2e014e2865c40ff8ae8ac7cafc1a | |
parent | b1eae272a97aa056a5f992273af2bf1120d14982 (diff) | |
download | ptxdist-a9a3c5e2a70ae45317241e7d10bf00d22d0598ac.tar.gz ptxdist-a9a3c5e2a70ae45317241e7d10bf00d22d0598ac.tar.xz |
[kgen] cleanup kconfig menu generation
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r-- | scripts/lib/ptxd_lib_00-init.sh | 3 | ||||
-rw-r--r-- | scripts/lib/ptxd_lib_kgen.sh | 23 |
2 files changed, 11 insertions, 15 deletions
diff --git a/scripts/lib/ptxd_lib_00-init.sh b/scripts/lib/ptxd_lib_00-init.sh index 17912969f..02a48e7c7 100644 --- a/scripts/lib/ptxd_lib_00-init.sh +++ b/scripts/lib/ptxd_lib_00-init.sh @@ -98,6 +98,9 @@ ptxd_init_ptxdist_path() { PTXDIST_PATH_POSTRULES="${PTXDIST_PATH_RULES//://post:}" export PTXDIST_PATH_POSTRULES + PTXDIST_PATH_PLATFORMS="${PTXDIST_PATH//://platforms:}" + export PTXDIST_PATH_PLATFORMS + ptxd_init_ptxdist_path_sysroot } diff --git a/scripts/lib/ptxd_lib_kgen.sh b/scripts/lib/ptxd_lib_kgen.sh index 7816904f9..97c2a81a4 100644 --- a/scripts/lib/ptxd_lib_kgen.sh +++ b/scripts/lib/ptxd_lib_kgen.sh @@ -10,14 +10,6 @@ export PTX_KGEN_DIR="${PTXDIST_TEMPDIR}/kgen" -# -# local defined vars -# -# FIXME: use these globaly -# -PTXDIST_OVERWRITE_DIRS_MSB=( "${PTXDIST_PLATFORMCONFIGDIR}" "${PTXDIST_WORKSPACE}" "${PTXDIST_TOPDIR}" ) -PTXDIST_OVERWRITE_DIRS_LSB=( "${PTXDIST_TOPDIR}" "${PTXDIST_WORKSPACE}" "${PTXDIST_PLATFORMCONFIGDIR}" ) - ptxd_kgen_awk() { kgen_part="${kgen_part}" \ @@ -31,7 +23,8 @@ ptxd_kgen_awk() section = $2; pkg = gensub(/.*\//, "", "g", file); - pkgs[section, pkg] = file; + if (!((section, pkg) in pkgs)) + pkgs[section, pkg] = file; } END { @@ -58,12 +51,12 @@ ptxd_kgen_generate_sections() { local dir { - for dir in "${PTXDIST_OVERWRITE_DIRS_LSB[@]}"; do - if [ \! -d "${dir}/${kgen_part_dir}" ]; then + for dir in "${kgen_dirs[@]}"; do + if [ \! -d "${dir}" ]; then continue fi # '! -name ".#*"' filters out emacs's lock files - find "${dir}/${kgen_part_dir}/" -name *.in \! -name ".#*" -print0 + find "${dir}/" -name *.in \! -name ".#*" -print0 done } | { # @@ -81,7 +74,7 @@ ptxd_kgen_generate_sections() ptxd_kgen() { local kgen_part="${1}" - local kgen_part_dir="${part}" + local kgen_dirs if [ ${#} -ne 1 ]; then cat <<EOF @@ -94,8 +87,8 @@ EOF # transmogrify part into subdir case "${kgen_part}" in - ptx) kgen_part_dir="rules" ;; - platform) kgen_part_dir="platforms" ;; + ptx) IFS=: kgen_dirs=( ${PTXDIST_PATH_RULES} ) ;; + platform) IFS=: kgen_dirs=( ${PTXDIST_PATH_PLATFORMS} ) ;; board|user|collection) return 0 ;; *) cat <<EOF |