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
This commit is contained in:
Oliver Smith 2021-10-04 12:57:26 +02:00
parent dfd92fadab
commit f7f8c96e7b
1 changed files with 8 additions and 5 deletions

View File

@ -176,11 +176,14 @@ def gen_make(proj, deps, configure_opts, jobs, make_dir, src_dir, build_dir, url
-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"