From f7f8c96e7b9bb41042a3b26f2f8a17c11e9970bc Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Mon, 4 Oct 2021 12:57:26 +0200 Subject: [PATCH] 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 --- gen_makefile.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) 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 @@ 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"