Because some architectures are very, very special. * configure.ac (cc_flags_m32, cc_flags_mx32): New variables. AC_SUBST them. * m4/mpers.m4 (MPERS_CFLAGS): Use instead of CFLAG, pushdef as $cc_flags_$1. Use mpers_name instead of CFLAG in AC_CACHE_CHECK messages. Pass MPERS_CFLAGS as the second argument to mpers_test.sh * mpers.sh: Add CC_ARCH_FLAGS as the second argument (PARSER_FILE is moved to the third one). Do not expect leading dash in ARCH_FLAG anymore. * mpers_test.sh (mpers_cc_flags): New variable, initialise to the second command line argument. Pass $mpers_name without leading dash to mpers.sh. Pass $mpers_cc_flags as the second argument to mpers.sh ($sample is the third argument now). * Makefile.am (mpers-m%.stamp:): Pass $(mpers_CC_FLAGS) as the second argument to mpers.sh ($$f is now the third argument). ($(mpers_m32_targets)): Define target variable mpers_CC_FLAGS with the value of @cc_flags_m32@ ($(mpers_mx32_targets)): Define target variable mpers_CC_FLAGS with the value of @cc_flags_mx32@ * tests/Makefile.am (MERS_CC_FLAGS): New variable. * bootstrap: Append @cc_flags_$1@ to MPERS_CC_FLAGS. Append $(MPERS_CC_FLAGS) to ARCH_MFLAGS.
27 lines
552 B
Bash
Executable File
27 lines
552 B
Bash
Executable File
#!/bin/sh -eu
|
|
|
|
./generate_mpers_am.sh
|
|
./xlat/gen.sh
|
|
./tests/gen_pure_executables.sh
|
|
./tests/gen_tests.sh
|
|
|
|
for m in m32 mx32; do
|
|
tests=tests-$m
|
|
rm -rf $tests
|
|
mkdir $tests
|
|
s='[[:space:]]*'
|
|
sed "s/@arch@/@arch_$m@/;
|
|
s/^MPERS_NAME$s=.*/& $m/;
|
|
s/^MPERS_CC_FLAGS$s=.*/& @cc_flags_$m@/;
|
|
s/^ARCH_MFLAGS$s=.*/& -DMPERS_IS_\$(MPERS_NAME) \$(MPERS_CC_FLAGS)/" \
|
|
tests/Makefile.am > $tests/Makefile.am
|
|
for f in tests/*; do
|
|
case "${f##*/}" in
|
|
Makefile*) continue;;
|
|
esac
|
|
ln -s ../"$f" $tests/
|
|
done
|
|
done
|
|
|
|
exec autoreconf -f -i "$@"
|