]> git.sur5r.net Git - kconfig-frontends/blobdiff - Makefile.am
Makefile: ensure image directory exists
[kconfig-frontends] / Makefile.am
index 014294041269c4e2e83ebe288837632c48365529..2b061e4b169951da183af10cea12494e5024b27e 100644 (file)
@@ -15,6 +15,7 @@ noinst_LIBRARIES =
 
 CLEANFILES =
 DISTCLEANFILES =
+MAINTAINERCLEANFILES =
 BUILT_SOURCES =
 
 #===============================================================================
@@ -68,7 +69,11 @@ 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 may produce a warning with some versions of automake:
@@ -86,7 +91,12 @@ AM_V_GPERF_1 =
 # 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$@ $<
 
 # yconf.c not listed, because it is the real _SOURCES, but others are
@@ -96,7 +106,7 @@ BUILT_SOURCES += \
        libs/parser/lconf.c
 # Still, .c files generated from .y files are not cleaned by default,
 # so yconf.c must be explicitly listed:
-CLEANFILES += \
+MAINTAINERCLEANFILES += \
        libs/parser/hconf.c \
        libs/parser/lconf.c \
        libs/parser/yconf.c
@@ -106,7 +116,7 @@ EXTRA_DIST += \
        libs/parser/yconf.y.patch
 
 # libs/parser/kconfig-parser.pc generated by AC_CONFIG_FILES in configure.ac
-pkgconfigdir = $(libdir)/pkg-config
+pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = libs/parser/kconfig-parser.pc
 DISTCLEANFILES += libs/parser/kconfig-parser.pc
 EXTRA_DIST += libs/parser/kconfig-parser.pc.in
@@ -145,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;/' \
                $< >$@
 
@@ -170,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 $@
@@ -299,7 +312,7 @@ 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 \
@@ -347,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 $@