commit b26d16ddb425936fa71459860708c5b6747b4458
parent 4b12fe6bce151c8f1d4d7d65a0b2461fc0f780af
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Wed, 9 Oct 2024 17:05:39 +0200
build: Generate cstd.h in config
This file is almost never modified, and the make from NetBSD
had some problems building it so the best solution is just
to generate it in config that is always checked.
Diffstat:
3 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/Makefile b/Makefile
@@ -19,7 +19,7 @@ all:
+@$(MAKE) `$(SCRIPTDIR)/config` `uname -m`
config:
- +@cd include/bits/scc && $(MAKE) $@
+ +@cd include/bits/scc && $(MAKE)
install: all
$(SCRIPTDIR)/install $(ROOT)
diff --git a/README b/README
@@ -91,7 +91,8 @@ The main targets of the Makefile are:
by the user.
- distclean
- Remove all the generated files.
+ Remove all the generated files, including the files generated by the
+ config target that are not removed by the clean target.
Toolchain configuration
=======================
diff --git a/include/bits/scc/Makefile b/include/bits/scc/Makefile
@@ -5,19 +5,17 @@ PROJECTDIR = ../../..
include $(PROJECTDIR)/scripts/rules.mk
SYSHDR =\
- sysld.h\
- sysincludes.h\
+ config.h\
+ sys.h\
cstd.h\
NODEP = 1
-all: cstd.h
+all: $(SYSHDR)
cstd.h: cstd-$(STD).h
cp cstd-$(STD).h $@
-config: sys.h config.h
-
config.h:
rm -f $@;\
trap "rm -f $$$$.h" EXIT INT QUIT HUP TERM;\