From: Vincent Bernat Date: Mon, 13 Jun 2016 07:54:57 +0000 (+0200) Subject: build: fix build issue introduced in previous commit X-Git-Tag: 0.9.4~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4bf902e9c55c39c7c720c2866f8d31e149c21123;p=thirdparty%2Flldpd.git build: fix build issue introduced in previous commit $^ was used for a reason: automake would fix the paths used in dependencies using VPATH or something similar. For some reason, this even break with GNU make when not using OOT build. Long story short, we use a pattern substitution to ensure that the atom files are looked up in the correct directory. This use of substitutions is mandated by POSIX (the 2013 version I think). See: http://austingroupbugs.net/view.php?id=519 It is however believed that most make implementation had support for this since a long time. --- diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am index 4648893b..250e32a7 100644 --- a/src/lib/Makefile.am +++ b/src/lib/Makefile.am @@ -21,7 +21,7 @@ liblldpctl_la_LIBADD = $(top_builddir)/src/libcommon-daemon-lib.la libfixedpoin atom-glue.c: $(ATOM_FILES) Makefile $(AM_V_GEN)($(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $(ATOM_FILES) | \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $(ATOM_FILES:%=$(srcdir)/%) | \ $(SED) -n 's+^void init_atom_builder_\([^(]*\)().*, \([0-9]*\)).*+\2 \1+p' | \ sort | \ $(AWK) '{ atoms[$$2] = 1 } \ @@ -31,7 +31,7 @@ atom-glue.c: $(ATOM_FILES) Makefile for (atom in atoms) { print " init_atom_builder_"atom"();" } \ print "}"; }' && \ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $(ATOM_FILES) | \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $(ATOM_FILES:%=$(srcdir)/%) | \ $(SED) -n 's+^void init_atom_map_\([^(]*\)().*, \([0-9]*\)).*+\2 \1+p' | \ sort -n | \ $(AWK) '{ atoms[$$2] = 1 } \