From: Vincent Bernat Date: Fri, 11 Mar 2022 21:17:26 +0000 (+0100) Subject: build: use `cc -E` instead of `cpp` to build atom list X-Git-Tag: 1.0.14~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2a64d539fd1b5dfe4c5dbb658c1a8c2abbc33913;p=thirdparty%2Flldpd.git build: use `cc -E` instead of `cpp` to build atom list For some reason, with OpenBSD, `cpp` only half expand the macros when invoked as `cpp`, but it works just fine with `clang -E`. --- diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am index f9810392..8763b4fd 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)(for f in $(ATOM_FILES:%=$(srcdir)/%); do \ - $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CC) -E $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $$f; done | \ $(SED) -n 's+^void init_atom_builder_\([^(]*\)().*, \([0-9]*\)).*+\2 \1+p' | \ sort | \ @@ -32,7 +32,7 @@ atom-glue.c: $(ATOM_FILES) Makefile for (atom in atoms) { print " init_atom_builder_"atom"();" } \ print "}"; }' && \ for f in $(ATOM_FILES:%=$(srcdir)/%); do \ - $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CC) -E $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $$f; done | \ $(SED) -n 's+^void init_atom_map_\([^(]*\)().*, \([0-9]*\)).*+\2 \1+p' | \ sort -n | \