Skip to content

Commit

Permalink
build: only touch .dir.stamp if it doesn't already exist
Browse files Browse the repository at this point in the history
This stops its date being continuously updated, forcing configure
retests all the time.  Now it serves its intended purpose of causing
configure retests only if .config was deleted (as is done by e.g.
make clean).

Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees@oracle.com>
  • Loading branch information
nickalcock authored and kvanhees committed Feb 7, 2024
1 parent f454b37 commit 8b6938c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Makeconfig
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,10 @@ $(CONFIG_MK): $(objdir)/.config/config.$(1).mk
endef

$(objdir)/.config/.dir.stamp:
mkdir -p $(objdir)/.config
touch $(objdir)/.config/.dir.stamp
if [[ ! -f $(objdir)/.config/.dir.stamp ]]; then \
mkdir -p $(objdir)/.config; \
touch $(objdir)/.config/.dir.stamp; \
fi

$(CONFIG_H):
echo '/* This file is automatically generated. */' > $(objdir)/config.h
Expand Down

0 comments on commit 8b6938c

Please sign in to comment.