diff options
Diffstat (limited to 'maintainer')
-rwxr-xr-x | maintainer/addToolVersion.sh | 238 | ||||
-rwxr-xr-x | maintainer/gen-kconfig.sh | 160 | ||||
-rw-r--r-- | maintainer/kconfig-choice.template | 32 | ||||
-rw-r--r-- | maintainer/kconfig-menu.template | 20 | ||||
-rw-r--r-- | maintainer/kconfig-versions.template | 285 |
5 files changed, 337 insertions, 398 deletions
diff --git a/maintainer/addToolVersion.sh b/maintainer/addToolVersion.sh deleted file mode 100755 index 38c2e55..0000000 --- a/maintainer/addToolVersion.sh +++ /dev/null @@ -1,238 +0,0 @@ -#!/bin/sh -set -e - -# Adds a new version to one of the toolchain component -myname="$0" - -# Parse the tools' paths configuration -# It is expected that this script is only to be run from the -# source directory of crosstool-NG, so it is trivial to find -# paths.sh (we can't use ". paths.sh", as POSIX states that -# $PATH should be searched for, and $PATH most probably doe -# not include "."), hence the "./". -. "./paths.sh" - -doHelp() { - cat <<-EOF - Usage: ${myname} <--tool> <[options] version [...]> ... - 'tool' in one of: - gcc, binutils, glibc, uClibc, uClibc-ng, newlib, linux, gdb, - duma, strace, ltrace, libelf, gmp, mpfr, isl, cloog, mpc, - mingw-w64, expat, ncurses, musl, gettext, zlib, libiconv - - Valid options for all tools: - --stable, -s, +x (default) - mark the version as being stable (as opposed to experimental, below) - - --experimental, -x, +s - mark the version as being experimental (as opposed to stable, above) - - --current, -c, +o (default) - mark the version as being cuurent (as opposed to obsolete, below) - - --obsolete, -o, +c - mark the version as being obsolete (as opposed to current, above) - - Note: setting a new tool resets to the defaults: 'stable' and 'current'. - - 'version' is a valid version for the specified tool. - - Examples: - add stable current version 2.6.19.2 to linux kernel: - ${myname} --linux 2.6.19.2 - - add experimental obsolete version 2.3.5 and stable current versions 2.6.1 - and 2.6.2 to glibc, add stable obsolete version 3.3.3 to gcc: - ${myname} --glibc -x -o 2.3.5 -s -c 2.6.1 2.6.2 --gcc -o 3.3.3 -EOF -} - -# Extract field $3 from version $1 with separator $2 -getVersionField() { - local version="$1" - local sep="$2" - local field="$3" - - echo "${version}${sep}${sep}${sep}${sep}" |cut -d ${sep} -f ${field} -} - -# Effectively add a version to the specified tool -# $cat : tool category -# $tool : tool name -# $tool_prefix : tool directory prefix -# $EXP : set to non empty if experimental, to empty otherwise -# OBS : set to non empty if obsolete, to empty otherwise -# $1 : version string to add -addToolVersion() { - local version="$1" - local file="$2" - local config_ver_option - local exp_obs_prompt - local deps v ver_M ver_m ver_p - local SedExpr1 SedExpr2 - - [ -f "${file}" ] || return 0 - - v=$(echo "${version}" |"${sed}" -r -e 's/-/_/g; s/\./_/g;') - - config_ver_option="${cat}_V_${v}" - - # Check for existing version: it can be legitimitate for an end-user - # to try adding a new version if the one he/she wants is not listed. - # But it can be the case where the version is hidden behind either one - # of EXPERIMENTAL or OBSOLETE, so warn if the version is already listed. - if ${grep} -E "^config ${config_ver_option}$" "${file}" >/dev/null 2>&1; then - echo "'${tool}': version '${version}' already present:" - ${grep} -A1 -B0 -n \ - -E "^(config ${config_ver_option}| {4}prompt \"${version}\")$" \ - "${file}" /dev/null - return 0 - fi - - SedExpr1="${SedExpr1}config ${config_ver_option}\n" - SedExpr1="${SedExpr1} bool\n" - SedExpr1="${SedExpr1} prompt \"${version}" - case "${EXP},${OBS}" in - ,) ;; - ,*) exp_obs_prompt=" (OBSOLETE)" - deps=" depends on OBSOLETE" - ;; - *,) exp_obs_prompt=" (EXPERIMENTAL)" - deps=" depends on EXPERIMENTAL" - ;; - *) exp_obs_prompt=" (EXPERIMENTAL, OBSOLETE)" - deps=" depends on EXPERIMENTAL \\&\\& OBSOLETE" - ;; - esac - [ -n "${exp_obs_prompt}" ] && SedExpr1="${SedExpr1}${exp_obs_prompt}" - SedExpr1="${SedExpr1}\"" - [ -n "${deps}" ] && SedExpr1="${SedExpr1}\n${deps}" - case "${tool}" in - gcc) - # Extract 'M'ajor and 'm'inor from version string - ver_M=$(getVersionField "${version}" . 1) - ver_m=$(getVersionField "${version}" . 2) - if [ ${ver_M} -ge 4 ] && [ ${ver_m} -ge 2 ]; then - SedExpr1="${SedExpr1}\n select CC_GCC_${ver_M}_${ver_m}" - fi - ;; - binutils) - # Extract 'M'ajor, 'm'inor, sometimes 'p'atch from version string - # TODO: Rework this - ver_M=$(getVersionField "${version}" . 1) - ver_m=$(getVersionField "${version}" . 2) - ver_p=$(getVersionField "${version}" . 3) - if [ ${ver_M} -eq 2 -a ${ver_m} -eq 27 ]; then - SedExpr1="${SedExpr1}\n select BINUTILS_2_27_or_later" - elif [ ${ver_M} -eq 2 -a ${ver_m} -eq 26 ]; then - SedExpr1="${SedExpr1}\n select BINUTILS_2_26_or_later" - elif [ ${ver_M} -eq 2 -a ${ver_m} -eq 25 -a ${ver_p} -eq 1 ]; then - SedExpr1="${SedExpr1}\n select BINUTILS_2_25_1_or_later" - elif [ ${ver_M} -eq 2 -a ${ver_m} -eq 25 -a -z ${ver_p} ]; then - SedExpr1="${SedExpr1}\n select BINUTILS_2_25_or_later" - elif [ ${ver_M} -eq 2 -a ${ver_m} -eq 24 ]; then - SedExpr1="${SedExpr1}\n select BINUTILS_2_24_or_later" - elif [ ${ver_M} -eq 2 -a ${ver_m} -eq 23 -a ${ver_p} -eq 2 ]; then - SedExpr1="${SedExpr1}\n select BINUTILS_2_23_2_or_later" - fi - ;; - uClibc) - # uClibc-0.9.33.2 needs some love - ver_M=$(getVersionField "${version}" . 1) - ver_m=$(getVersionField "${version}" . 2) - ver_p=$(getVersionField "${version}" . 3) - if [ ${ver_M} -eq 0 -a ${ver_m} -eq 9 -a ${ver_p} -eq 33 ]; then - SedExpr1="${SedExpr1}\n select LIBC_UCLIBC_0_9_33_2_or_later" - fi - ;; - uClibc-ng) - # uClibc-ng-1.0.15 changed threading configuration, no longer compatible - # with the rest of uClibc gang. - ver_M=$(getVersionField "${version}" . 1) - ver_m=$(getVersionField "${version}" . 2) - ver_p=$(getVersionField "${version}" . 3) - if [ ${ver_M} -eq 1 -a ${ver_m} -eq 0 -a ${ver_p} -eq 15 ]; then - SedExpr1="${SedExpr1}\n select LIBC_UCLIBC_NG_1_0_15_or_later" - fi - ;; - gdb) - # gdb-7.0 and above have special handling - ver_M=$(getVersionField "${version}" . 1) - ver_m=$(getVersionField "${version}" . 2) - if [ ${ver_M} -ge 7 ]; then - if [ ${ver_m} -ge 2 ]; then - SedExpr1="${SedExpr1}\n select GDB_7_2_or_later" - else - SedExpr1="${SedExpr1}\n select GDB_7_0_or_later" - fi - fi - ;; - esac - SedExpr2=" default \"${version}\" if ${config_ver_option}" - "${sed}" -r -i -e 's/^(# CT_INSERT_VERSION_BELOW)$/\1\n\n'"${SedExpr1}"'/;' "${file}" - "${sed}" -r -i -e 's/^(# CT_INSERT_VERSION_STRING_BELOW)$/\1\n'"${SedExpr2}"'/;' "${file}" -} - -cat= -tool= -tool_prefix= -VERSION= -EXP= -OBS= - -if [ $# -eq 0 ]; then - doHelp - exit 1 -fi - -while [ $# -gt 0 ]; do - case "$1" in - # Tools: - --gcc) EXP=; OBS=; cat=CC_GCC; tool=gcc; tool_prefix=cc; dot2suffix=;; - --binutils) EXP=; OBS=; cat=BINUTILS; tool=binutils; tool_prefix=binutils; dot2suffix=;; - --glibc) EXP=; OBS=; cat=LIBC_GLIBC; tool=glibc; tool_prefix=libc; dot2suffix=;; - --uClibc) EXP=; OBS=; cat=LIBC_UCLIBC; tool=uClibc; tool_prefix=libc; dot2suffix=;; - --uClibc-ng)EXP=; OBS=; cat=LIBC_UCLIBC_NG; tool=uClibc; tool_prefix=libc; dot2suffix=;; - --newlib) EXP=; OBS=; cat=LIBC_NEWLIB; tool=newlib; tool_prefix=libc; dot2suffix=;; - --mingw-w64)EXP=; OBS=; cat=WINAPI; tool=mingw; tool_prefix=libc; dot2suffix=;; - --musl) EXP=; OBS=; cat=LIBC_MUSL; tool=musl; tool_prefix=libc; dot2suffix=;; - --linux) EXP=; OBS=; cat=KERNEL; tool=linux; tool_prefix=kernel; dot2suffix=;; - --gdb) EXP=; OBS=; cat=GDB; tool=gdb; tool_prefix=debug; dot2suffix=;; - --duma) EXP=; OBS=; cat=DUMA; tool=duma; tool_prefix=debug; dot2suffix=;; - --strace) EXP=; OBS=; cat=STRACE; tool=strace; tool_prefix=debug; dot2suffix=;; - --ltrace) EXP=; OBS=; cat=LTRACE; tool=ltrace; tool_prefix=debug; dot2suffix=;; - --gmp) EXP=; OBS=; cat=GMP; tool=gmp; tool_prefix=companion_libs; dot2suffix=;; - --mpfr) EXP=; OBS=; cat=MPFR; tool=mpfr; tool_prefix=companion_libs; dot2suffix=;; - --isl) EXP=; OBS=; cat=ISL; tool=isl; tool_prefix=companion_libs; dot2suffix=;; - --cloog) EXP=; OBS=; cat=CLOOG; tool=cloog; tool_prefix=companion_libs; dot2suffix=;; - --mpc) EXP=; OBS=; cat=MPC; tool=mpc; tool_prefix=companion_libs; dot2suffix=;; - --libelf) EXP=; OBS=; cat=LIBELF; tool=libelf; tool_prefix=companion_libs; dot2suffix=;; - --expat) EXP=; OBS=; cat=EXPAT; tool=expat; tool_prefix=companion_libs; dot2suffix=;; - --ncurses) EXP=; OBS=; cat=NCURSES; tool=ncurses; tool_prefix=companion_libs; dot2suffix=;; - --gettext) EXP=; OBS=; cat=GETTEXT; tool=gettext; tool_prefix=companion_libs; dot2suffix=;; - --libiconv) EXP=; OBS=; cat=LIBICONV; tool=libiconv; tool_prefix=companion_libs; dot2suffix=;; - --zlib) EXP=; OBS=; cat=ZLIB; tool=zlib; tool_prefix=companion_tools; dot2suffix=;; - --make) EXP=; OBS=; cat=MAKE; tool=make; tool_prefix=companion_tools; dot2suffix=;; - --m4) EXP=; OBS=; cat=M4; tool=m4; tool_prefix=companion_tools; dot2suffix=;; - --autoconf) EXP=; OBS=; cat=AUTOCONF; tool=autoconf; tool_prefix=companion_tools; dot2suffix=;; - --automake) EXP=; OBS=; cat=AUTOMAKE; tool=automake; tool_prefix=companion_tools; dot2suffix=;; - --libtool) EXP=; OBS=; cat=LIBTOOL; tool=libtool; tool_prefix=companion_tools; dot2suffix=;; - - # Tools options: - -x|--experimental|+s) EXP=1;; - -s|--stable|+x) EXP=;; - -o|--obsolete|+c) OBS=1;; - -c|--current|+o) OBS=;; - - # Misc: - -h|--help) doHelp; exit 0;; - -*) echo "Unknown option: '$1' (use -h/--help for help)."; exit 1;; - - # Version string: - *) [ -n "${tool}" ] || { doHelp; exit 1; } - file_base="config/${tool_prefix}/${tool}.in" - addToolVersion "$1" "${file_base}${dot2suffix}" - ;; - esac - shift -done diff --git a/maintainer/gen-kconfig.sh b/maintainer/gen-kconfig.sh deleted file mode 100755 index 364844d..0000000 --- a/maintainer/gen-kconfig.sh +++ /dev/null @@ -1,160 +0,0 @@ -#!/bin/bash - -set -e - -# Accept overrides from command line if needed -sed=${SED:-sed} -grep=${GREP:-grep} - -# Generate either a choice or a menuconfig with the specified entries. -# -# Usage: -# generate a choice: -# gen_choice <out-file> <label> <config-prefix> <base-dir> -# -# generate a menuconfig: -# gen_menu <out-file> <label> <config-prefix> <base-dir> -# -# where: -# out-file -# put the generated choice/menuconfig into that file -# for choices, it acts as the base bname of the file, the secondary -# parts (the .in.2) are put in out-file.2 -# -# label -# name for the entries family -# eg. Architecture, Kernel... -# -# config-prefix -# prefix for the choice entries -# eg. ARCH, KERNEL... -# -# base-dir -# base directory containing config files -# eg. config/arch, config/kernel... -# - -# Helper: find the base names of all *.in files in a given directory -get_components() { - local dir="${1}" - local f b - - for f in ${dir}/*.in; do - b=${f#${dir}/} - echo ${b%.in} - done -} - -# Generate a choice -# See above for usage -gen_choice() { - local out_file="${1}" - local label="${2}" - local cfg_prefix="${3}" - local base_dir="${4}" - local file entry _entry - - # Generate the part-1 - exec >"${out_file}" - printf '# %s menu\n' "${label}" - printf '# Generated file, do not edit!!!\n' - printf '\n' - printf 'choice GEN_CHOICE_%s\n' "${cfg_prefix}" - printf ' bool\n' - printf ' prompt "%s"\n' "${label}" - printf '\n' - for entry in `get_components ${base_dir}`; do - file="${base_dir}/${entry}.in" - _entry=$(printf '%s\n' "${entry}" |"${sed}" -r -s -e 's/[-.+]/_/g;') - printf 'config %s_%s\n' "${cfg_prefix}" "${_entry}" - printf ' bool\n' - printf ' prompt "%s"\n' "${entry}" - "${sed}" -r -e '/^## depends on /!d; s/^## / /;' ${file} 2>/dev/null - "${sed}" -r -e '/^## select /!d; s/^## / /;' ${file} 2>/dev/null - if "${grep}" -E '^## help' ${file} >/dev/null 2>&1; then - printf ' help\n' - "${sed}" -r -e '/^## help ?/!d; s/^## help ?/ /;' ${file} 2>/dev/null - fi - printf '\n' - done - printf 'endchoice\n' - - printf '\n' - printf 'config %s\n' "${cfg_prefix}" - for entry in `get_components ${base_dir}`; do - file="${base_dir}/${entry}.in" - _entry=$(printf '%s\n' "${entry}" |"${sed}" -r -s -e 's/[-.+]/_/g;') - printf ' default "%s" if %s_%s\n' "${entry}" "${cfg_prefix}" "${_entry}" - done - - printf '\n' - for entry in `get_components ${base_dir}`; do - file="${base_dir}/${entry}.in" - _entry=$(printf '%s\n' "${entry}" |"${sed}" -r -s -e 's/[-.+]/_/g;') - printf 'if %s_%s\n' "${cfg_prefix}" "${_entry}" - printf 'source "%s"\n' "${file}" - printf 'endif\n' - done - - # Generate the part-2 - exec >"${out_file}.2" - printf '# %s second part options\n' "${label}" - printf '# Generated file, do not edit!!!\n' - for entry in `get_components ${base_dir}`; do - file="${base_dir}/${entry}.in" - _entry=$(printf '%s\n' "${entry}" |"${sed}" -r -s -e 's/[-.+]/_/g;') - if [ -f "${file}.2" ]; then - printf '\n' - printf 'if %s_%s\n' "${cfg_prefix}" "${_entry}" - printf 'comment "%s other options"\n' "${entry}" - printf 'source "%s.2"\n' "${file}" - printf 'endif\n' - fi - done -} - -# Generate a menuconfig -# See above for usage -gen_menu() { - local out_file="${1}" - local label="${2}" - local cfg_prefix="${3}" - local base_dir="${4}" - local file entry _entry - - # Generate the menuconfig - exec >"${out_file}" - printf '# %s menu\n' "${label}" - printf '# Generated file, do not edit!!!\n' - printf '\n' - for entry in `get_components ${base_dir}`; do - file="${base_dir}/${entry}.in" - _entry=$(printf '%s\n' "${entry}" |"${sed}" -r -s -e 's/[-.+]/_/g;') - printf 'menuconfig %s_%s\n' "${cfg_prefix}" "${_entry}" - printf ' bool\n' - if "${grep}" -E '^## default' ${file} >/dev/null 2>&1; then - "${sed}" -r -e '/^## default ?/!d; s/^## default ?/ default /;' ${file} 2>/dev/null - fi - printf ' prompt "%s"\n' "${entry}" - "${sed}" -r -e '/^## depends on /!d; s/^## / /;' ${file} 2>/dev/null - "${sed}" -r -e '/^## select /!d; s/^## / /;' ${file} 2>/dev/null - if "${grep}" -E '^## help' ${file} >/dev/null 2>&1; then - printf ' help\n' - "${sed}" -r -e '/^## help ?/!d; s/^## help ?/ /;' ${file} 2>/dev/null - fi - printf '\n' - printf 'if %s_%s\n' "${cfg_prefix}" "${_entry}" - printf 'source "%s"\n' "${file}" - printf 'endif\n' - printf '\n' - done -} - -mkdir -p config/gen -gen_choice config/gen/arch.in "Target Architecture" "ARCH" "config/arch" -gen_choice config/gen/kernel.in "Target OS" "KERNEL" "config/kernel" -gen_choice config/gen/cc.in "Compiler" "CC" "config/cc" -gen_choice config/gen/binutils.in "Binutils" "BINUTILS" "config/binutils" -gen_choice config/gen/libc.in "C library" "LIBC" "config/libc" -gen_menu config/gen/debug.in "Debug facilities" "DEBUG" "config/debug" -gen_menu config/gen/companion_tools.in "Companion tools" "COMP_TOOLS" "config/companion_tools" diff --git a/maintainer/kconfig-choice.template b/maintainer/kconfig-choice.template new file mode 100644 index 0000000..12ea12c --- /dev/null +++ b/maintainer/kconfig-choice.template @@ -0,0 +1,32 @@ +# +# DO NOT EDIT! This file is automatically generated. +# + +choice GEN_CHOICE_@@prefix@@ + bool "@@label@@" + +#!foreach choice +config @@prefix@@_@@kcfg_choice@@ + bool "@@choice@@" +#!foreach dependency + @@depline@@ +#!end-foreach + help +#!foreach help + @@helpline@@ +#!end-foreach + +#!end-foreach +endchoice + +config @@prefix@@ + string +#!foreach choice + default "@@choice@@" if @@prefix@@_@@kcfg_choice@@ +#!end-foreach + +#!foreach choice +if @@prefix@@_@@kcfg_choice@@ +source "config/@@dir@@/@@choice@@.in" +endif +#!end-foreach diff --git a/maintainer/kconfig-menu.template b/maintainer/kconfig-menu.template new file mode 100644 index 0000000..12b9f2b --- /dev/null +++ b/maintainer/kconfig-menu.template @@ -0,0 +1,20 @@ +# +# DO NOT EDIT! This file is automatically generated. +# + +#!foreach choice +menuconfig @@prefix@@_@@kcfg_choice@@ + bool "@@choice@@" +#!foreach dependency + @@depline@@ +#!end-foreach + help +#!foreach help + @@helpline@@ +#!end-foreach + +if @@prefix@@_@@kcfg_choice@@ +source "config/@@dir@@/@@choice@@.in" +endif + +#!end-foreach diff --git a/maintainer/kconfig-versions.template b/maintainer/kconfig-versions.template new file mode 100644 index 0000000..e7e0121 --- /dev/null +++ b/maintainer/kconfig-versions.template @@ -0,0 +1,285 @@ +# +# DO NOT EDIT! This file is automatically generated. +# + +# The component directory name +config @@masterpfx@@_DIR_NAME + string + default "@@master@@" + +#!if [ "@@nforks@@" -ge 2 ] + +choice + bool "Show @@master@@ versions from" + +#!foreach fork +config @@masterpfx@@_USE_@@originpfx@@ + bool "@@origin@@" +#!if [ -n "@@only_obsolete@@" ] + depends on OBSOLETE +#!end-if +#!if [ -n "@@only_experimental@@" ] + depends on EXPERIMENTAL +#!end-if + help +@@originhelp@@ + +#!end-foreach +endchoice + +config @@masterpfx@@_USE + string +#!foreach fork + default "@@pfx@@" if @@masterpfx@@_USE_@@originpfx@@ +#!end-foreach + +#!end-if + +#!foreach fork +#!if [ "@@nforks@@" -ge 2 ] +if @@masterpfx@@_USE_@@originpfx@@ +#!end-if + +config @@pfx@@_PKG_NAME + string + default "@@pkg_name@@" + +#!// If a project makes official releases, using "bleeding edge" +#!// from a development repository is experimental. However, there +#!// are projects that consider its HEAD a "rolling release". For +#!// those, checking out from a repository is the regular method. +choice + bool "Source of @@pkg_label@@" + +#!if [ -n "@@all_versions@@" ] +config @@pfx@@_SRC_RELEASE + bool "Released tarball" + help + Download a released tarball. + +#!end-if +config @@pfx@@_SRC_DEVEL + bool "Vendor/custom repository" +#!if [ -n "@@all_versions@@" ] + depends on EXPERIMENTAL +#!end-if + help + Check out from a repository. +#!if [ -n "@@repository@@" ] + Default is the vendor repository at @@repository_url@@ +#!end-if + +if @@pfx@@_SRC_DEVEL + +choice + bool "VCS type" +#!if [ -n "@@repository@@" ] + default @@pfx@@_DEVEL_VCS_@@vcs@@ +#!end-if + help + Version control system from which the sources will be checked out. + The default value points to the development repository for @@pkg_label@@. + +config @@pfx@@_DEVEL_VCS_git + bool "Git" + +config @@pfx@@_DEVEL_VCS_svn + bool "Subversion" + +config @@pfx@@_DEVEL_VCS_hg + bool "Mercurial" + +config @@pfx@@_DEVEL_VCS_cvs + bool "CVS" + +endchoice + +config @@pfx@@_DEVEL_VCS + string + default "git" if @@pfx@@_DEVEL_VCS_git + default "svn" if @@pfx@@_DEVEL_VCS_svn + default "hg" if @@pfx@@_DEVEL_VCS_hg + default "cvs" if @@pfx@@_DEVEL_VCS_cvs + +config @@pfx@@_DEVEL_URL + string "Repository URL" +#!if [ -n "@@repository@@" ] + default "@@repository_url@@" +#!end-if + help + Repository URL. + + For CVS, enter both the value of CVS root and the module name, separated + by a space. + +config @@pfx@@_DEVEL_BRANCH + string "Branch/tag to check out" + default "@@repository_branch@@" + help + Git/CVS: branch/tag to be checked out + Subversion: directories to append to the repository URL (i.e. branch or tag) + Mercurial: official guide recommends using separate repositories to maintain + stable branches. You likely need to change the repository URL, rather than + enter anything here. + +config @@pfx@@_DEVEL_REVISION + string "Revision/changeset" + default "@@repository_cset@@" + help + Commit ID or revision ID to check out. + Git: enter the commit ID to check out a commit. + CVS: enter the date in "YYYY/MM/DD HH:MM:SS" format (UTC) to check out certain date. + Subversion: enter the revision. + +config @@pfx@@_DEVEL_SUBDIR + string "Subdirectory in the repository" + default "@@repository_subdir@@" + help + Some projects produce releases not from the top-level directory in the + repository, but rather from some subdirectory. If it is the case, + specify this subdirectory here. + +config @@pfx@@_DEVEL_BOOTSTRAP + string "Bootstrap command" + default "@@bootstrap@@" + help + Command to run after checking out. Some projects don't store the generated + files like configure script in the repository; building out of a checked out + working copy thus requires some extra steps. Separate multiple shell commands + with &&. + +endif + +config @@pfx@@_SRC_CUSTOM + bool "Custom location" + depends on EXPERIMENTAL + help + Custom directory or tarball. + +if @@pfx@@_SRC_CUSTOM + +config @@pfx@@_CUSTOM_LOCATION + string "Custom source location" + help + Path to the directory or tarball with the sources. + +endif + +endchoice + +#!if [ -n "@@all_versions@@" ] +config @@pfx@@_MIRRORS + string + default "@@mirrors@@" + +config @@pfx@@_ARCHIVE_FILENAME + string + default "@@archive_filename@@" + +config @@pfx@@_ARCHIVE_DIRNAME + string + default "@@archive_dirname@@" + +#!end-if + +#!// Below, we explicitly select all milestones to which a given version +#!// compares greater-or-equal. We don't select just the latest applicable +#!// (and letting milestones chain-select each other, with FOO_6_or_later +#!// selecting FOO_5_or_later and so on) so that we can handle the cases +#!// where we need to identify a range of releases on a branch, for example, +#!// "all FOO releases after 4.9.1 but before 4.9.3". +#!// +#!if [ -n "@@all_versions@@" -a -z "@@versionlocked@@" ] +choice + bool "Version of @@pkg_label@@" + help + For a released version, select the version of @@pkg_label@@ to download + and build. For sources out of the vendor repository or from a custom + location, select the version that describes those custom sources. + Based on this version, crosstool-NG may apply some version-specific + quirks while building @@pkg_label@@. + +config @@pfx@@_VERY_NEW + bool "newer than anything below" + depends on EXPERIMENTAL + depends on @@pfx@@_SRC_DEVEL || @@pfx@@_SRC_CUSTOM +#!foreach milestone + select @@masterpfx@@_@@ms_kcfg@@_or_later + depends on !@@masterpfx@@_REQUIRE_@@ms_kcfg@@_or_older +#!end-foreach + +#!foreach version +config @@pfx@@_V_@@kcfg@@ + bool "@@ver@@@@ver_postfix@@" +#!if [ "@@obsolete@@" = "yes" ] + depends on OBSOLETE +#!end-if +#!if [ "@@experimental@@" = "yes" ] + depends on EXPERIMENTAL +#!end-if +#!foreach milestone +#!if [ "@@version_cmp_milestone@@" -ge 0 ] + select @@masterpfx@@_@@ms_kcfg@@_or_later +#!end-if +#!if [ "@@version_cmp_milestone@@" -le 0 ] + select @@masterpfx@@_@@ms_kcfg@@_or_older +#!end-if +#!if [ "@@version_cmp_milestone@@" -gt 0 ] + depends on !@@masterpfx@@_REQUIRE_@@ms_kcfg@@_or_older +#!end-if +#!if [ "@@version_cmp_milestone@@" -lt 0 ] + depends on !@@masterpfx@@_REQUIRE_@@ms_kcfg@@_or_later +#!end-if +#!end-foreach + +#!end-foreach +config @@pfx@@_VERY_OLD + bool "older than anything above" + depends on OBSOLETE && EXPERIMENTAL + depends on @@pfx@@_SRC_DEVEL || @@pfx@@_SRC_CUSTOM +#!foreach milestone + depends on !@@masterpfx@@_REQUIRE_@@ms_kcfg@@_or_later +#!end-foreach + +endchoice +#!end-if + +#!if [ -n "@@versionlocked@@" ] +#!foreach version +config @@pfx@@_V_@@kcfg@@ + def_bool y + depends on @@versionlocked@@_V_@@kcfg@@ + +#!end-foreach +#!end-if + +config @@pfx@@_VERSION + string +#!foreach version + default "@@ver@@" if @@pfx@@_V_@@kcfg@@ +#!end-foreach + default "unknown" + +#!if [ "@@nforks@@" -ge 2 ] +endif +#!end-if + +#!end-foreach + +#!foreach milestone +#!// Milestones selected by a chosen version of this package +config @@masterpfx@@_@@ms_kcfg@@_or_later + bool + +config @@masterpfx@@_@@ms_kcfg@@_or_older + bool + +#!// Milestone requirements selected by other packages that restrict +#!// the choices in this package +config @@masterpfx@@_REQUIRE_@@ms_kcfg@@_or_later + bool + +config @@masterpfx@@_REQUIRE_@@ms_kcfg@@_or_older + bool + +#!end-foreach |