]> git.sur5r.net Git - kconfig-frontends/blobdiff - Makefile.am
Makefile: generated yacc/lex/gperf source are maintainer-clean
[kconfig-frontends] / Makefile.am
index 65126c0abd676c22a6a46ad63e51a8ddaac890af..058690a78656ae97b111228bff69c2bc2fdea9ef 100644 (file)
@@ -14,6 +14,8 @@ lib_LTLIBRARIES =
 noinst_LIBRARIES =
 
 CLEANFILES =
+DISTCLEANFILES =
+MAINTAINERCLEANFILES =
 BUILT_SOURCES =
 
 #===============================================================================
@@ -45,7 +47,8 @@ libs_parser_libkconfig_parser_la_CPPFLAGS = \
        -DCONFIG_=\"$(config_prefix)\" \
        -DGPERF_LEN_TYPE="$(GPERF_LEN_TYPE)" \
        $(intl_CPPFLAGS) \
-       -I$(top_srcdir)/libs/parser
+       -I$(top_srcdir)/libs/parser \
+       -I$(top_builddir)/libs/parser
 libs_parser_libkconfig_parser_la_CFLAGS = \
        $(AM_CFLAGS) \
        $(kf_CFLAGS)
@@ -87,14 +90,26 @@ AM_V_GPERF_1 =
 .l.c:
        $(AM_V_LEX)$(LEXCOMPILE) -o$@ $<
 
-BUILT_SOURCES += libs/parser/hconf.c libs/parser/lconf.c
-CLEANFILES += libs/parser/hconf.c libs/parser/lconf.c libs/parser/yconf.c
-EXTRA_DIST += libs/parser/yconf.y.patch
+# 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:
+MAINTAINERCLEANFILES += \
+       libs/parser/hconf.c \
+       libs/parser/lconf.c \
+       libs/parser/yconf.c
+EXTRA_DIST += \
+       libs/parser/hconf.c \
+       libs/parser/hconf.gperf.patch \
+       libs/parser/yconf.y.patch
 
 # libs/parser/kconfig-parser.pc generated by AC_CONFIG_FILES in configure.ac
 pkgconfigdir = $(libdir)/pkg-config
 pkgconfig_DATA = libs/parser/kconfig-parser.pc
-CLEANFILES += libs/parser/kconfig-parser.pc
+DISTCLEANFILES += libs/parser/kconfig-parser.pc
 EXTRA_DIST += libs/parser/kconfig-parser.pc.in
 
 #--------------------------