summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Allsopp <david.allsopp@metastack.com>2023-01-29 10:16:23 +0000
committerDavid Allsopp <david.allsopp@metastack.com>2023-02-01 18:31:21 +0000
commite33ca3be0b474347d2f4039b09b49502dcabfc33 (patch)
treee63cef9e688a488923d721a423f967d8932465f5
parent8ddd109b3d964c2800c79dfaa4d045c398b39f36 (diff)
downloadocaml-e33ca3be0b474347d2f4039b09b49502dcabfc33.tar.gz
Fail if the build tree needs reconfiguring
-rw-r--r--Makefile5
-rw-r--r--Makefile.build_config.in3
-rwxr-xr-xconfigure4
-rw-r--r--configure.ac2
4 files changed, 14 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index b29ec55724..c0ba7e5822 100644
--- a/Makefile
+++ b/Makefile
@@ -1856,6 +1856,11 @@ endif
include .depend
+ifneq "$(GENERATED_BY_CONFIG_STATUS)" ""
+$(GENERATED_BY_CONFIG_STATUS): %: %.in
+ $(error $@ needs regenerating - please re-run configure)
+endif
+
Makefile.config Makefile.build_config: config.status
config.status:
@echo "Please refer to the installation instructions:"
diff --git a/Makefile.build_config.in b/Makefile.build_config.in
index e1dd17eda7..1baee56759 100644
--- a/Makefile.build_config.in
+++ b/Makefile.build_config.in
@@ -124,3 +124,6 @@ runtime_ASM_OBJECTS = $(addprefix runtime/,@runtime_asm_objects@)
# Platform-dependent module for ocamlyacc
ocamlyacc_WSTR_MODULE = @ocamlyacc_wstr_module@
+
+# Files which are generated by config.status
+GENERATED_BY_CONFIG_STATUS = @ac_config_files@ @ac_config_headers@
diff --git a/configure b/configure
index b0c4c4ccfe..a32d99cd20 100755
--- a/configure
+++ b/configure
@@ -777,6 +777,8 @@ build_os
build_vendor
build_cpu
build
+ac_config_headers
+ac_config_files
QS
ocaml_libdir
ocaml_bindir
@@ -3393,6 +3395,8 @@ OCAML_VERSION_SHORT=5.1
+
+
## Generated files
ac_config_files="$ac_config_files Makefile.build_config"
diff --git a/configure.ac b/configure.ac
index ba0ecc38b6..1c4931ce3c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -213,6 +213,8 @@ AC_SUBST([compute_deps])
AC_SUBST([ocaml_bindir])
AC_SUBST([ocaml_libdir])
AC_SUBST([QS])
+AC_SUBST([ac_config_files])
+AC_SUBST([ac_config_headers])
## Generated files