scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

commit 523578193bc82e554dcebd70bc0d92cac703be17
parent c056afc52c0d449a0251ebd05df7dbed65b32124
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Tue, 29 Oct 2024 21:09:21 +0100

build/libc: Use explicit rules for chained dependencies

Inference rules are only applied with direct dependencies,
and chaining them with other rules is not supported by all
the Makefiles.

Diffstat:
Msrc/libc/rules.mk | 3+++
Msrc/libc/time/Makefile | 6++++--
2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/libc/rules.mk b/src/libc/rules.mk @@ -19,6 +19,9 @@ CRT = $(LIBCDIR)/crt.o _sys_errlist.c: $(SYSERRNO) ../../mkerrstr $(SYSERRNO) +_sys_errlist.$O: _sys_errlist.c + $(CC) $(PROJ_CFLAGS) -c -o $@ _sys_errlist.c + $(CRT): crt.$O cp crt.$O $@ diff --git a/src/libc/time/Makefile b/src/libc/time/Makefile @@ -17,8 +17,10 @@ OBJS =\ all: $(OBJS) -tz.$O: timezone.lst - awk -f gentz.awk $? > tz.c +tz.c: timezone.lst + awk -f gentz.awk timezone.lst > $@ + +tz.$O: tz.c $(CC) $(PROJ_CFLAGS) -c -o $@ tz.c clean: