summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2021-05-23 13:52:50 +0000
committermidipix <writeonce@midipix.org>2021-05-23 14:25:06 +0000
commit76b5c8e2b26898163c38bc4bf4e8a24991b646de (patch)
tree13882f1fbfc56a08a1e724a9825c3d6585349a2a
parent94703963da658fb4c97bfefe7ae75bdbd27d8430 (diff)
downloadsbpython2-76b5c8e2b26898163c38bc4bf4e8a24991b646de.tar.bz2
sbpython2-76b5c8e2b26898163c38bc4bf4e8a24991b646de.tar.xz
build system: Makefile.in: properly support project-specified make file names.
-rw-r--r--Makefile.in4
-rwxr-xr-xconfigure19
2 files changed, 13 insertions, 10 deletions
diff --git a/Makefile.in b/Makefile.in
index 49ee097..9c27151 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -282,7 +282,7 @@ dirs.tag:
mkdir -p lib
touch dirs.tag
-host.tag: Makefile
+host.tag: @makefile@
$(CC) $(CFLAGS) -dumpmachine > host.tmp
mv host.tmp host.tag
@@ -299,7 +299,7 @@ distclean: clean
rm -f cfgdefs.mk
rm -f usrdefs.mk
rm -f config.log
- rm -f Makefile
+ rm -f @makefile@
rmdir build ccenv bin lib 2>&1 || true
clean: clean-implib
diff --git a/configure b/configure
index 4712b13..a235b5e 100755
--- a/configure
+++ b/configure
@@ -178,6 +178,11 @@ init_vars()
MAKEMODE="$mb_makemode"
fi
+
+ if [ -z "$mb_makefile" ]; then
+ mb_makefile='Makefile'
+ fi
+
# project-specific initialization
if [ _$mb_use_custom_cfginit = _yes ]; then
. "$mb_project_dir/project/config/cfginit.sh"
@@ -312,7 +317,7 @@ verify_build_directory()
fi
fi
- rm -f Makefile Makefile.host Makefile.tmp Makefile.failed
+ rm -f Makefile Makefile.host Makefile.tmp Makefile.failed $mb_makefile
output_step_epilog
}
@@ -818,7 +823,7 @@ config_cfghost()
$mb_pwd/Makefile.tmp > $mb_pwd/Makefile.host
rm $mb_pwd/Makefile.tmp
- mv $mb_pwd/Makefile.host $mb_pwd/Makefile
+ mv $mb_pwd/Makefile.host $mb_pwd/$mb_makefile
output_step_epilog
}
@@ -828,10 +833,13 @@ config_host()
{
output_step_prolog ${mb_script} 'config_host'
+ # verify configuration for the host's (cross-)compiler
${mb_make} -s host.tag \
- && output_step_epilog \
+ -f "$mb_makefile" \
+ && output_step_epilog \
&& return 0
+ # should never happen
error_msg "configure was able to generate a Makefile for the selected host,"
error_msg "however the host-targeting compiler was found to be missing"
error_msg "at least one of the required headers or features."
@@ -841,11 +849,6 @@ config_host()
config_fini()
{
- # rename Makefile as needed
- if [ -n "$mb_makefile" ]; then
- mv $mb_pwd/Makefile $mb_pwd/$mb_makefile
- fi
-
# project-specific post-configuration steps
if [ _$mb_use_custom_cfgfini = _yes ]; then
. "$mb_project_dir/project/config/cfgfini.sh"