]> git.sur5r.net Git - kconfig-frontends/commitdiff
buildsystem: don't use recursive make for libs
authorYann E. MORIN <yann.morin.1998@free.fr>
Tue, 23 Aug 2016 18:53:37 +0000 (20:53 +0200)
committerYann E. MORIN <yann.morin.1998@free.fr>
Tue, 23 Aug 2016 18:54:41 +0000 (20:54 +0200)
Final step at getting rid of recursive make: convert libs.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Makefile.am
configure.ac
libs/Makefile.am [deleted file]
libs/images/Makefile.am [deleted file]
libs/lxdialog/Makefile.am [deleted file]
libs/parser/Makefile.am [deleted file]

index 3a786f64660c8aa7cf5026a021aaf7c6c50ec214..caa18bace7163955f442112123c7e0b9717e0f35 100644 (file)
@@ -1,13 +1,15 @@
 ACLOCAL_AMFLAGS = -I scripts/.autostuff/m4
 MAKEFLAGS = $(SILENT_MAKEFLAGS)
 
-SUBDIRS = libs
 EXTRA_DIST = .version
 
 bin_PROGRAMS =
 bin_SCRIPTS =
 dist_bin_SCRIPTS =
 
+lib_LTLIBRARIES =
+noinst_LIBRARIES =
+
 CLEAN_FILES =
 BUILT_SOURCES =
 
@@ -17,6 +19,121 @@ dist_doc_DATA = \
        docs/kconfig-language.txt \
        docs/kconfig.txt
 
+#===============================================================================
+# Libraries
+
+SUFFIXES = .gperf
+
+lib_LTLIBRARIES += libs/parser/libkconfig-parser.la
+libs_parser_libkconfig_parser_la_SOURCES = libs/parser/yconf.y
+dist_EXTRA_libs_parser_libkconfig_parser_la_SOURCES = \
+       libs/parser/hconf.gperf \
+       libs/parser/lconf.l \
+       libs/parser/confdata.c \
+       libs/parser/menu.c \
+       libs/parser/symbol.c \
+       libs/parser/util.c \
+       libs/parser/expr.c \
+       libs/parser/expr.h \
+       libs/parser/lkc.h \
+       libs/parser/lkc_proto.h
+libs_parser_libkconfig_parser_la_CPPFLAGS = \
+       -DROOTMENU="\"$(root_menu)\"" \
+       -DCONFIG_=\"$(config_prefix)\" \
+       $(intl_CPPFLAGS)
+libs_parser_libkconfig_parser_la_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(kf_CFLAGS)
+libs_parser_libkconfig_parser_la_LDFLAGS = \
+       -release $(KCONFIGPARSER_LIB_VERSION) \
+       -no-undefined
+libs_parser_libkconfig_parser_la_LIBADD = $(intl_LIBS)
+
+libs_parser_kconfig_includedir = $(includedir)/kconfig
+libs_parser_kconfig_include_HEADERS = \
+       libs/parser/list.h \
+       libs/parser/lkc.h \
+       libs/parser/expr.h \
+       libs/parser/lkc_proto.h
+
+AM_V_GPERF = $(AM_V_GPERF_$(V))
+AM_V_GPERF_ = $(AM_V_GPERF_$(AM_DEFAULT_VERBOSITY))
+AM_V_GPERF_0 = @echo "  GPERF   " $@;
+
+.gperf.c:
+       $(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...
+#   /usr/share/automake-1.11/am/lex.am: ... overrides Automake target
+#   `.l.c' defined here
+#
+# This is expected, and can't be avoided (for now).
+# That's because, when working with lex+yacc sources, the default is to
+# build each files searately, and then link them together into the final
+# output. But the Linux kernel's parser simply #include-s the lexer,
+# so we can't put lconf.l into the _SOURCES (it's in EXTRA_SOURCES),
+# and thus automake does not catch the need to call lex.
+# Secondly, when flex is told to change the symbols' prefix (kconfig
+# 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.
+.l.c:
+       $(AM_V_LEX)$(LEXCOMPILE) -o$@ $<
+
+BUILT_SOURCES += libs/parser/hconf.c libs/parser/lconf.c
+CLEAN_FILES += libs/parser/hconf.c libs/parser/lconf.c libs/parser/yconf.c
+EXTRA_DIST += libs/parser/yconf.y.patch
+
+#--------------------------
+# lxdialog lib (for mconf)
+if COND_lxdialog
+
+noinst_LIBRARIES += libs/lxdialog/libkconfig-lxdialog.a
+
+libs_lxdialog_libkconfig_lxdialog_a_SOURCES = \
+       libs/lxdialog/checklist.c \
+       libs/lxdialog/dialog.h \
+       libs/lxdialog/inputbox.c \
+       libs/lxdialog/menubox.c \
+       libs/lxdialog/textbox.c \
+       libs/lxdialog/util.c \
+       libs/lxdialog/yesno.c
+libs_lxdialog_libkconfig_lxdialog_a_CPPFLAGS = \
+       $(AM_CPPFLAGS) \
+       $(ncurses_mconf_CPPFLAGS) \
+       $(intl_CPPFLAGS)
+libs_lxdialog_liblxdialog_a_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(kf_CFLAGS)
+
+endif # COND_lxdialog
+
+#--------------------------
+# kconfig meta frontend
+if COND_images
+
+noinst_LIBRARIES += libs/images/libkconfig-images.a
+
+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
+       $(AM_V_GEN)$(SED) -e 's/^static //' $< >$@
+
+libs/images/images.h: libs/images/images.c_orig
+       $(AM_V_GEN)$(SED) -e '/^static \(const char \*xpm_\(.\{1,\}\)\[\]\) = {/!d; s//extern \1;/' \
+               $< >$@
+
+BUILT_SOURCES += \
+       libs/images/images.c \
+       libs/images/images.h
+CLEAN_FILES += \
+       libs/images/images.c \
+       libs/images/images.h
+
+endif # COND_images
+
 #===============================================================================
 # Frontends
 
index 99705ecd41dfdb4fc32618432da8fe0eb5392e84..ba7db9b155bdff560e8d0bb265b24b16558f162f 100644 (file)
@@ -500,10 +500,6 @@ AS_IF(
 # Finalise
 AC_CONFIG_FILES([
     Makefile
-    libs/Makefile
-    libs/images/Makefile
-    libs/lxdialog/Makefile
-    libs/parser/Makefile
 ])
 AC_OUTPUT
 
diff --git a/libs/Makefile.am b/libs/Makefile.am
deleted file mode 100644 (file)
index d4c5973..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-if COND_lxdialog
-    MAYBE_lxdialog = lxdialog
-endif
-if COND_images
-    MAYBE_images = images
-endif
-SUBDIRS = parser $(MAYBE_images) $(MAYBE_lxdialog)
diff --git a/libs/images/Makefile.am b/libs/images/Makefile.am
deleted file mode 100644 (file)
index 009e238..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-noinst_LIBRARIES = libkconfig-images.a
-
-libkconfig_images_a_SOURCES = images.c_orig
-nodist_libkconfig_images_a_SOURCES = images.c
-BUILT_SOURCES = images.c images.h
-CLEANFILES = images.c images.h
-
-images.c: images.c_orig
-       $(AM_V_GEN)$(SED) -e 's/^static //' $< >$@
-
-images.h: images.c_orig
-       $(AM_V_GEN)$(SED) -e '/^static \(const char \*xpm_\(.\{1,\}\)\[\]\) = {/!d; s//extern \1;/' \
-                         $< >$@
diff --git a/libs/lxdialog/Makefile.am b/libs/lxdialog/Makefile.am
deleted file mode 100644 (file)
index a5ba6be..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-noinst_LIBRARIES = libkconfig-lxdialog.a
-
-libkconfig_lxdialog_a_SOURCES = \
-    checklist.c                 \
-    dialog.h                    \
-    inputbox.c                  \
-    menubox.c                   \
-    textbox.c                   \
-    util.c                      \
-    yesno.c
-
-libkconfig_lxdialog_a_CPPFLAGS = $(AM_CPPFLAGS)               \
-                                 $(ncurses_mconf_CPPFLAGS)    \
-                                 $(intl_CPPFLAGS)
-liblxdialog_a_CFLAGS = $(AM_CFLAGS) $(kf_CFLAGS)
diff --git a/libs/parser/Makefile.am b/libs/parser/Makefile.am
deleted file mode 100644 (file)
index d284e6a..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-SUFFIXES = .gperf
-
-lib_LTLIBRARIES = libkconfig-parser.la
-libkconfig_parser_la_SOURCES = yconf.y
-dist_EXTRA_libkconfig_parser_la_SOURCES = \
-    hconf.gperf lconf.l                   \
-    confdata.c menu.c symbol.c util.c     \
-    expr.c expr.h lkc.h lkc_proto.h
-libkconfig_parser_la_CPPFLAGS = -DROOTMENU="\"$(root_menu)\""   \
-                                -DCONFIG_=\"$(config_prefix)\"  \
-                                $(intl_CPPFLAGS)
-libkconfig_parser_la_CFLAGS = $(AM_CFLAGS) $(kf_CFLAGS)
-libkconfig_parser_la_LDFLAGS = -release $(KCONFIGPARSER_LIB_VERSION) -no-undefined
-libkconfig_parser_la_LIBADD = $(intl_LIBS)
-
-kconfig_includedir = $(includedir)/kconfig
-kconfig_include_HEADERS = list.h lkc.h expr.h lkc_proto.h
-
-BUILT_SOURCES = hconf.c lconf.c
-CLEANFILES = hconf.c lconf.c yconf.c
-EXTRA_DIST = yconf.y.patch
-
-AM_V_GPERF = $(AM_V_GPERF_$(V))
-AM_V_GPERF_ = $(AM_V_GPERF_$(AM_DEFAULT_VERBOSITY))
-AM_V_GPERF_0 = @echo "  GPERF   " $@;
-
-.gperf.c:
-       $(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...
-#      /usr/share/automake-1.11/am/lex.am: ... overrides Automake target
-#      `.l.c' defined here
-#
-# This is expected, and can't be avoided (for now).
-# That's because, when working with lex+yacc sources, the default is to
-# build each files searately, and then link them together into the final
-# output. But the Linux kernel's parser simply #include-s the lexer,
-# so we can't put lconf.l into the _SOURCES (it's in EXTRA_SOURCES),
-# and thus automake does not catch the need to call lex.
-# Secondly, when flex is told to change the symbols' prefix (kconfig
-# 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.
-.l.c:
-       $(AM_V_LEX)$(LEXCOMPILE) -o$@ $<