Skip to content

Commit

Permalink
build: add a mechanism to tell whether the tree is configured yet
Browse files Browse the repository at this point in the history
This means that bits of makefiles that depend on configure symbols and
might emit noisy errors otherwise can be surrounded with ifdef
CONFIGURED to suppress their execution when the makefile is initially
run (when all it does is configure itself and restart parsing, resetting
all its variables to the configured values).

We fix another noisy error while we're here: the initial build routinely
displays

GNUmakefile:111: /home/oranix/oracle/private/dtrace/build/config.mk: No such file or directory

because the tree is not yet configured and config.mk hasn't been
created.

This buys us nothing and is just noisy: suppress it.

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 Nov 8, 2022
1 parent c980b01 commit c47002c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ $(shell mkdir -p $(objdir))
include Makeoptions
include Makefunctions
include Makeconfig
include $(objdir)/config.mk
-include $(objdir)/config.mk
include Build $(sort $(wildcard */Build))
-include $(objdir)/*.deps
include Makerules
Expand Down
1 change: 1 addition & 0 deletions Makeconfig
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ $(CONFIG_H):

$(CONFIG_MK):
echo '# This file is automatically generated.' > $(objdir)/config.mk
echo 'CONFIGURED := yes' >> $(objdir)/config.mk
cat $(objdir)/.config/*.mk >> $(objdir)/config.mk 2>/dev/null || true

$(eval $(call check-symbol-rule,ELF_GETSHDRSTRNDX,elf_getshdrstrndx,elf))
Expand Down

0 comments on commit c47002c

Please sign in to comment.