X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=Makefile.am;h=2b061e4b169951da183af10cea12494e5024b27e;hb=df6a283f24aa146ab862950503db9542a12dab7a;hp=3b0d65160315c1a10658328c5d05013487acda6b;hpb=87011069dd1cc94efa1c3f445e334b4200a08b0f;p=kconfig-frontends diff --git a/Makefile.am b/Makefile.am index 3b0d651..2b061e4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,5 +1,8 @@ ACLOCAL_AMFLAGS = -I scripts/.autostuff/m4 -MAKEFLAGS = $(SILENT_MAKEFLAGS) +MAKEFLAGS = $(SILENT_MAKEFLAGS_$(V)) +SILENT_MAKEFLAGS_ = $(SILENT_MAKEFLAGS_$(AM_DEFAULT_VERBOSITY)) +SILENT_MAKEFLAGS_0 = --no-print-directory -s +SILENT_MAKEFLAGS_1 = EXTRA_DIST = .version @@ -11,6 +14,8 @@ lib_LTLIBRARIES = noinst_LIBRARIES = CLEANFILES = +DISTCLEANFILES = +MAINTAINERCLEANFILES = BUILT_SOURCES = #=============================================================================== @@ -40,7 +45,10 @@ dist_EXTRA_libs_parser_libkconfig_parser_la_SOURCES = \ libs_parser_libkconfig_parser_la_CPPFLAGS = \ -DROOTMENU="\"$(root_menu)\"" \ -DCONFIG_=\"$(config_prefix)\" \ - $(intl_CPPFLAGS) + -DGPERF_LEN_TYPE="$(GPERF_LEN_TYPE)" \ + $(intl_CPPFLAGS) \ + -I$(top_srcdir)/libs/parser \ + -I$(top_builddir)/libs/parser libs_parser_libkconfig_parser_la_CFLAGS = \ $(AM_CFLAGS) \ $(kf_CFLAGS) @@ -59,12 +67,17 @@ libs_parser_kconfig_include_HEADERS = \ AM_V_GPERF = $(AM_V_GPERF_$(V)) AM_V_GPERF_ = $(AM_V_GPERF_$(AM_DEFAULT_VERBOSITY)) AM_V_GPERF_0 = @echo " GPERF " $@; +AM_V_GPERF_1 = +# In theory, the destination directory already exists, because there is at +# least the .pc file created by configure, but better safe than sorry, so +# we create the directory now. .gperf.c: + $(MKDIR_P) $(@D) $(AM_V_GPERF)$(GPERF) -t --output-file $@ -a -C -E -g -k 1,3,$$ -p -t $< -# The following rule produces a warning: -# libs/parser/Makefile.am:41: user target `.l.c' defined here... +# The following rule may produce a warning with some versions of automake: +# Makefile.am:85: user target `.l.c' defined here... # /usr/share/automake-1.11/am/lex.am: ... overrides Automake target # `.l.c' defined here # @@ -78,12 +91,35 @@ AM_V_GPERF_0 = @echo " GPERF " $@; # uses zconf in lieue of the original yy), then the output file is # also renamed, but automake does not now that, and make would fail # because it would think no file was generated. +# +# In theory, the destination directory already exists, because there is at +# least the .pc file created by configure, but better safe than sorry, so +# we create the directory now. .l.c: + $(MKDIR_P) $(@D) $(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)/pkgconfig +pkgconfig_DATA = libs/parser/kconfig-parser.pc +DISTCLEANFILES += libs/parser/kconfig-parser.pc +EXTRA_DIST += libs/parser/kconfig-parser.pc.in #-------------------------- # lxdialog lib (for mconf) @@ -119,9 +155,11 @@ libs_images_libkconfig_images_a_SOURCES = libs/images/images.c_orig nodist_libs_images_libkconfig_images_a_SOURCES = libs/images/images.c libs/images/images.c: libs/images/images.c_orig + $(MKDIR_P) $(@D) $(AM_V_GEN)$(SED) -e 's/^static //' $< >$@ libs/images/images.h: libs/images/images.c_orig + $(MKDIR_P) $(@D) $(AM_V_GEN)$(SED) -e '/^static \(const char \*xpm_\(.\{1,\}\)\[\]\) = {/!d; s//extern \1;/' \ $< >$@ @@ -144,6 +182,7 @@ if COND_kconfig bin_SCRIPTS += frontends/kconfig frontends/kconfig: frontends/kconfig.in + $(MKDIR_P) $(@D) $(AM_V_GEN)$(SED) -e 's/@KCFG_LIST@/$(kcfg_list)/g' \ $< >$@ @chmod +x $@ @@ -267,12 +306,13 @@ frontends_qconf_kconfig_qconf_CPPFLAGS = \ $(AM_CPPFLAGS) \ $(intl_CPPFLAGS) \ -I$(top_srcdir)/libs/parser \ - -I$(top_builddir)/libs/images + -I$(top_builddir)/libs/images \ + -I$(top_builddir)/frontends/qconf frontends_qconf_kconfig_qconf_CXXFLAGS = \ $(AM_CXXFLAGS) \ $(kf_CFLAGS) \ $(Qt5_CFLAGS) \ - -fPIC + -fPIC -std=c++11 frontends_qconf_kconfig_qconf_LDADD = \ $(top_builddir)/libs/parser/libkconfig-parser.la \ $(top_builddir)/libs/images/libkconfig-images.a \ @@ -281,6 +321,7 @@ frontends_qconf_kconfig_qconf_LDADD = \ AM_V_MOC = $(AM_V_MOC_$(V)) AM_V_MOC_ = $(AM_V_MOC_$(AM_DEFAULT_VERBOSITY)) AM_V_MOC_0 = @echo " MOC " $@; +AM_V_MOC_1 = .h.moc: $(AM_V_MOC)$(MOC) -i $< -o $@ @@ -319,6 +360,7 @@ EXTRA_DIST += \ utils/kconfig-tweak.in.patch utils/kconfig-tweak: utils/kconfig-tweak.in + $(MKDIR_P) $(@D) $(AM_V_GEN)$(SED) -e "s/@CONFIG_@/$(config_prefix)/g" \ $< >$@ @chmod +x $@