From 4326da204f9df312ed54892e2e1e356cae1972f7 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN" Date: Sun, 9 Apr 2017 10:10:28 +0200 Subject: [PATCH] Makefile: comment tricky yconf condition The yconf.c file is generated from the yconf.y yacc source; it is the main and only source file that is actuall compiled, as it #include-s the other source files (weird, but that's how it's done upstream). So yconf.c does not need to be listed as a built source; the other two, generated from lex and gperf source files, do need to be listed because they are not part of _SOURCES, but are only in _EXTRA_SOURCES. However, .c files generated from yacc code are nt considerate as being intermediate files, and thus are not cleaned automatically. Signed-off-by: "Yann E. MORIN" --- Makefile.am | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile.am b/Makefile.am index 7974a18..0142940 100644 --- a/Makefile.am +++ b/Makefile.am @@ -89,9 +89,13 @@ AM_V_GPERF_1 = .l.c: $(AM_V_LEX)$(LEXCOMPILE) -o$@ $< +# yconf.c not listed, because it is the real _SOURCES, but others are +# in _EXTRA_SOURCES (above), so must be listed: BUILT_SOURCES += \ libs/parser/hconf.c \ libs/parser/lconf.c +# Still, .c files generated from .y files are not cleaned by default, +# so yconf.c must be explicitly listed: CLEANFILES += \ libs/parser/hconf.c \ libs/parser/lconf.c \ -- 2.39.5