neels has submitted this change. (
https://gerrit.osmocom.org/c/osmo-dev/+/25737 )
Change subject: gen_makefile.py: proj_files: ignore config.h
......................................................................
gen_makefile.py: proj_files: ignore config.h
Do not consider config.h inside the source tree as modified source file.
This file gets generated when running ./configure to build in-tree,
whereas osmo-dev always builds out-of-tree.
Having config.h inside proj_files causes problems with the next patch,
where conflicting in-tree builds will be automatically be cleaned with
"make distclean". For example:
* "make libosmocore" runs with a previously configured in-tree build
* proj_files contains config.h.
* Before attempting to build libosmocore out-of-tree, with the next
patch, "make distclean" gets executed.
* config.h is now removed
* .make.libosmocore.build target expects all proj_files to exist and
fails with:
make: *** No rule to make target '../src/libosmocore/config.h', needed by
'.make.libosmocore.build'. Stop.
Change-Id: I10d970f2cadacb5071dcde975c76b15404038a3c
---
M gen_makefile.py
1 file changed, 8 insertions(+), 5 deletions(-)
Approvals:
fixeria: Looks good to me, but someone else must approve
pespin: Looks good to me, but someone else must approve
neels: Looks good to me, approved
diff --git a/gen_makefile.py b/gen_makefile.py
index 90a7476..c36b5ff 100755
--- a/gen_makefile.py
+++ b/gen_makefile.py
@@ -176,11 +176,14 @@
-and -not -name "Makefile.in" \
-and -not -name "config.h.in" )
{proj}_files := $(shell find {src_proj} \
- -name "*.[hc]" \
- -or -name "*.py" \
- -or -name "*.cpp" \
- -or -name "*.tpl" \
- -or -name "*.map")
+ \( \
+ -name "*.[hc]" \
+ -or -name "*.py" \
+ -or -name "*.cpp" \
+ -or -name "*.tpl" \
+ -or -name "*.map" \
+ \) \
+ -and -not -name "config.h")
.make.{proj}.clone:
@echo -e "\n\n\n===== $@\n"
--
To view, visit https://gerrit.osmocom.org/c/osmo-dev/+/25737
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-Change-Id: I10d970f2cadacb5071dcde975c76b15404038a3c
Gerrit-Change-Number: 25737
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <[email protected]>
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: neels <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-MessageType: merged