From 10f665bd0ea6954fce620325aeeecb5e869f7479 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Wed, 17 Apr 2024 12:39:59 -0400 Subject: config: Delete gen/objs.mk Rather than explicitly listing all these dependencies, we can rely on DEPFLAGS to generate them for us. --- Makefile | 2 ++ config/config.mk | 10 ---------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 1d26d12..981c322 100644 --- a/Makefile +++ b/Makefile @@ -93,6 +93,8 @@ ${GEN}/version.c.new:: ${GEN}/version.c: ${GEN}/version.c.new @test -e $@ && cmp -s $@ ${.ALLSRC} && rm ${.ALLSRC} || mv ${.ALLSRC} $@ +${OBJ}/gen/version.o: ${GEN}/version.c + ## Test phase (`make check`) # Unit test binaries diff --git a/config/config.mk b/config/config.mk index 4771a5e..bfcb559 100644 --- a/config/config.mk +++ b/config/config.mk @@ -11,7 +11,6 @@ MKS := \ ${GEN}/vars.mk \ ${GEN}/flags.mk \ ${GEN}/deps.mk \ - ${GEN}/objs.mk \ ${GEN}/pkgs.mk # The main configuration file, which includes the others @@ -50,15 +49,6 @@ ${GEN}/deps.mk: ${GEN}/flags.mk @+${MAKE} -sf config/deps.mk .PHONY: ${GEN}/deps.mk -# Lists file.o: file.c dependencies -${GEN}/objs.mk:: - @${MKDIR} ${@D} - ${MSG} "[ GEN] ${TGT}" - @printf '# %s\n' "${TGT}" >$@ - @for obj in ${OBJS:${OBJ}/%.o=%}; do \ - printf '$${OBJ}/%s.o: %s.c\n' "$$obj" "$$obj"; \ - done | sed 's|: gen/|: $${GEN}/|' >>$@ - # External dependencies PKG_MKS := \ ${GEN}/libacl.mk \ -- cgit v1.2.3