Makefile.in: improve POSTPROCESS_DEPS

In FreeBSD 14.2 Make, $*.d strips the path, eg. src/tst.o becomes tst.d
not src/tst.d.
This commit is contained in:
Martin Pulec
2025-05-22 11:09:53 +02:00
parent a7f29db2aa
commit 2f599f875d

View File

@@ -255,10 +255,10 @@ bin/hd-rum-av: $(srcdir)/data/template/bin/hd-rum-av
-include $(DEP_FILES)
POSTPROCESS_DEPS = \
@cp $*.d $*.P; \
@cp ${@:.o=.d} ${@:.o=.P}; \
sed -e 's/\#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
-e '/^$$/ d' -e 's/$$/ :/' < $*.d >> $*.P; \
rm -f $*.d
-e '/^$$/ d' -e 's/$$/ :/' < ${@:.o=.d} >> ${@:.o=.P}; \
rm -f ${@:.o=.d}
.SUFFIXES: .o .c .cpp .cu .m .mm