1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/automake/parse-config
3 # Copyright (C) 2004 - 2021 The T2 SDE Project
4 # Copyright (C) 1998 - 2003 ROCK Linux Project
6 # This Copyright note is generated by scripts/Create-CopyPatch,
7 # more information can be found in the files COPYING and README.
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License version 2.
11 # --- T2-COPYRIGHT-NOTE-END ---
13 # If an application is running automake, it includes all the stuff
14 # from usr/share/aclocal/ and so depends on all packages placing
17 # We can savely ignore those dependencies, since a package which is really
18 # using an others package aclocal file will also access other files related
19 # to the package outside of usr/share/aclocal.
21 var_append flistrfilter "|" ".*: .*/share/aclocal/.*"
24 # do not do anything if we're outside builddir (like sysfiles is)
25 [[ ${PWD//src.$pkg.$config.$id/} = $PWD ]] && return
28 if ! atstage native; then
29 pref=$base/build/$SDECFG_ID/TOOLCHAIN/tools.cross
32 if [ -d $pref/usr/share/automake ]; then
33 # search (recursively) for the files
34 find -name config.guess -o -name config.sub -o \
35 -name configfsf.guess -o -name configfsf.sub |
37 if grep -q Autoconf $file; then
39 local f=${file##*/}; f=${f/fsf/}
40 cp -fv $pref/usr/share/automake/$f $file
46 # some packages do not include an up-to-date config.{sub,guess}
47 if hasflag AUTOMAKE-QUIRK ||
48 [ $arch = 'arm64' -o $arch = 'avr32' -o $arch = 'csky' -o \
49 $arch = 'blackfin' -o 'microblaze' -o 'nios2' ] || [[ $arch = riscv* ]]; then
50 # don't down-date our own file on a rebuild
51 [ $pkg != automake ] && hook_add preconf 2 automake_fixup