summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2018-12-25 04:16:05 -0500
committermidipix <writeonce@midipix.org>2018-12-25 05:13:52 -0500
commit76b44f46b84bdc5325caeec11d2c728bbde07c19 (patch)
tree7aa87df7eca241de4f2fe62be7d23cdd2eb4f1ef
parent3ca1f06e31a1833a7b82aee05caf20697137a4e3 (diff)
downloadntcon-76b44f46b84bdc5325caeec11d2c728bbde07c19.tar.bz2
ntcon-76b44f46b84bdc5325caeec11d2c728bbde07c19.tar.xz
build system: Makefile.in: always include cfgdefs.mk & usrdefs.mk.
The purpose of this commit is twofold; from the user's perspective, this provides a consistent experience whenever building a sofort-based project; and from the developer's perspective, this provides an easy way to test cfgdefs.mk even before the writing and/or integration of cfgdefs.sh.
-rw-r--r--Makefile.in5
-rwxr-xr-xconfigure13
-rw-r--r--sofort/cfgdefs.in5
3 files changed, 14 insertions, 9 deletions
diff --git a/Makefile.in b/Makefile.in
index e0029cc..400f5f7 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -119,13 +119,8 @@ include $(PROJECT_DIR)/sysinfo/compiler/$(COMPILER).mk
include $(PROJECT_DIR)/sysinfo/toolchain/$(TOOLCHAIN).mk
include $(PROJECT_DIR)/sysinfo/os/$(OS).mk
-ifeq ($(USE_CUSTOM_CFGDEFS),yes)
include ./cfgdefs.mk
-endif
-
-ifeq ($(USE_CUSTOM_USRDEFS),yes)
include ./usrdefs.mk
-endif
include $(PROJECT_DIR)/sofort/defs.mk
include $(PROJECT_DIR)/sofort/flavor.mk
diff --git a/configure b/configure
index 96ab8a7..e88666c 100755
--- a/configure
+++ b/configure
@@ -63,13 +63,18 @@ init_vars()
# project-specific config definitions
if [ _$mb_use_custom_cfgdefs = _yes ]; then
- cat < /dev/null > cfgdefs.mk
+ cat $mb_project_dir/sofort/cfgdefs.in \
+ > cfgdefs.mk
+ else
+ printf '%s %s\n\n' \
+ '# this project does not include' \
+ 'a custom config step.' \
+ > cfgdefs.mk
+ cat $mb_project_dir/sofort/cfgdefs.in >> cfgdefs.mk
fi
# user build-time overrides
- if [ _$mb_use_custom_usrdefs = _yes ]; then
- touch usrdefs.mk
- fi
+ touch usrdefs.mk
# project
mb_nickname=$NICKNAME
diff --git a/sofort/cfgdefs.in b/sofort/cfgdefs.in
new file mode 100644
index 0000000..4627d90
--- /dev/null
+++ b/sofort/cfgdefs.in
@@ -0,0 +1,5 @@
+# changes made to this file will be gone the next time
+# you run ./configure.
+
+# for persistent post-configure, ad-hoc changes to the
+# build project, use usrdefs.mk instead.