Fix Makefile to build on alternative make implementations

On some systems (notably FreeBSD), the make implementation makes a
distinction between $(builddir)/<path> and <path>, even when builddir is
`.`. This commit removes $(builddir) from all references to generated
files, so that these implementations don't fail. Keeping $(builddir)
causes older versions automake (1.15 and older) to generate a broken
Makefile.
reverse-scroll
nirenjan 2021-10-12 10:02:35 -07:00
parent 41be44cc94
commit 8d38c4d16b
2 changed files with 7 additions and 3 deletions

View File

@ -49,8 +49,12 @@ libx52test_LDFLAGS = @CMOCKA_LIBS@ @LIBUSB_LIBS@
libx52test_LDADD = libx52.la
CLEANFILES += libx52/test_libx52.c
$(builddir)/libx52/test_libx52.c: $(srcdir)/libx52/x52_test_gen.py $(srcdir)/libx52/x52_tests.json
$(AM_V_GEN) $(PYTHON) $(srcdir)/libx52/x52_test_gen.py $(srcdir)/libx52/x52_tests.json > $@
test_libx52_c_DEPENDS = \
$(srcdir)/libx52/x52_test_gen.py \
$(srcdir)/libx52/x52_tests.json
libx52/test_libx52.c: $(test_libx52_c_DEPENDS)
$(AM_V_GEN) $(PYTHON) $(test_libx52_c_DEPENDS) > $@
endif
# Extra files that need to be in the distribution

View File

@ -25,7 +25,7 @@ util_char_map_c_DEPENDS = \
$(srcdir)/libx52util/x52_char_map_gen.py \
$(srcdir)/libx52util/x52_char_map.cfg
$(builddir)/libx52util/util_char_map.c: $(util_char_map_c_DEPENDS)
libx52util/util_char_map.c: $(util_char_map_c_DEPENDS)
$(AM_V_GEN) $(PYTHON) $(util_char_map_c_DEPENDS) $@
# Extra files that need to be in the distribution