diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2014-07-28 16:20:04 +0800 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2014-08-01 11:24:26 +0800 |
commit | c43847fe14e6b32cc58b8e8168f78e72ef94316d (patch) | |
tree | 4593c0e9d6adc4af40450a92aa4414109f9d29a4 | |
parent | 6c0dd46749cd791f3923e0d60f41d7a5e1033945 (diff) | |
download | petitboot-c43847fe14e6b32cc58b8e8168f78e72ef94316d.zip petitboot-c43847fe14e6b32cc58b8e8168f78e72ef94316d.tar.gz |
autotools: Use non-recursive make
With the current testing infrastructure, we don't have a strictly
hierarchical set of dependencies. This causes problems with a recursive
make, and means we have to hack around some of the dependencies.
This change generates a single, top-level makefile from all of the
Makefile.am fragments. We still need the po/ directory as a separate
SUBDIR, but all others can be converted to non-recursive.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
-rw-r--r-- | Makefile.am | 44 | ||||
-rw-r--r-- | configure.ac | 14 | ||||
-rw-r--r-- | discover/Makefile.am | 114 | ||||
-rw-r--r-- | discover/grub2/Makefile.am | 62 | ||||
-rw-r--r-- | discover/grub2/lexer.l | 2 | ||||
-rw-r--r-- | lib/Makefile.am | 61 | ||||
-rw-r--r-- | man/Makefile.am | 11 | ||||
-rw-r--r-- | test/Makefile.am | 10 | ||||
-rw-r--r-- | test/lib/Makefile.am | 41 | ||||
-rw-r--r-- | test/parser/Makefile.am | 198 | ||||
-rw-r--r-- | test/urls/Makefile.am | 45 | ||||
-rw-r--r-- | ui/common/Makefile.am | 55 | ||||
-rw-r--r-- | ui/ncurses/Makefile.am | 97 | ||||
-rw-r--r-- | ui/test/Makefile.am | 24 | ||||
-rw-r--r-- | ui/twin/Makefile.am | 62 | ||||
-rw-r--r-- | utils/Makefile.am | 33 |
16 files changed, 415 insertions, 458 deletions
diff --git a/Makefile.am b/Makefile.am index 7ae5012..15d561f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -12,17 +12,20 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -AUTOMAKE_OPTIONS = foreign +AUTOMAKE_OPTIONS = foreign subdir-objects parallel-tests -SUBDIRS = lib discover test ui utils man po +SUBDIRS = po ACLOCAL_AMFLAGS = -I m4 -AM_CPPFLAGS = $(DEFAULT_CPPFLAGS) +AM_CPPFLAGS = $(DEFAULT_CPPFLAGS) -I$(top_srcdir)/lib AM_CFLAGS = $(DEFAULT_CFLAGS) +AM_YFLAGS = -d LIBTOOL_DEPS = @LIBTOOL_DEPS@ +pkgsysconfdir = @sysconfdir@/@PACKAGE@ + libtool: $(LIBTOOL_DEPS) $(SHELL) ./config.status libtool @@ -33,3 +36,38 @@ MAINTAINERCLEANFILES = aclocal.m4 config.* configure configure.ac depcomp \ maintainer-clean-local: rm -rf m4 + +noinst_LTLIBRARIES = +noinst_PROGRAMS = +sbin_PROGRAMS = +dist_sbin_SCRIPTS = +check_PROGRAMS = +check_DATA = +check_SCRIPTS = +TESTS = +BUILT_SOURCES = +CLEANFILES = + +include lib/Makefile.am +include discover/grub2/Makefile.am +include discover/Makefile.am +include test/Makefile.am +include test/lib/Makefile.am +include test/parser/Makefile.am +include test/urls/Makefile.am +include ui/common/Makefile.am + +if WITH_NCURSES +include ui/ncurses/Makefile.am +endif + +if WITH_TWIN +include ui/twin/Makefile.am +endif + +include ui/test/Makefile.am + +include man/Makefile.am + +include utils/Makefile.am + diff --git a/configure.ac b/configure.ac index 58aa6cf..fbb6520 100644 --- a/configure.ac +++ b/configure.ac @@ -265,20 +265,6 @@ AC_SUBST([pkgsysconfdir], ["${sysconfdir}/${package}"]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_FILES([ Makefile - discover/Makefile - discover/grub2/Makefile - lib/Makefile - man/Makefile - test/Makefile - test/lib/Makefile - test/parser/Makefile - test/urls/Makefile - ui/Makefile - ui/common/Makefile - ui/ncurses/Makefile - ui/test/Makefile - ui/twin/Makefile - utils/Makefile po/Makefile.in ]) diff --git a/discover/Makefile.am b/discover/Makefile.am index 01c29d7..9e922fe 100644 --- a/discover/Makefile.am +++ b/discover/Makefile.am @@ -12,69 +12,63 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -pkgsysconfdir = @sysconfdir@/@PACKAGE@ +sbin_PROGRAMS += discover/pb-discover -SUBDIRS = grub2 +discover_pb_discover_SOURCES = \ + discover/boot.c \ + discover/boot.h \ + discover/cdrom.c \ + discover/cdrom.h \ + discover/device-handler.c \ + discover/device-handler.h \ + discover/discover-server.c \ + discover/discover-server.h \ + discover/event.c \ + discover/event.h \ + discover/file.c \ + discover/file.h \ + discover/params.c \ + discover/params.h \ + discover/parser.c \ + discover/parser.h \ + discover/parser-conf.c \ + discover/parser-conf.h \ + discover/parser-utils.c \ + discover/parser-utils.h \ + discover/paths.c \ + discover/paths.h \ + discover/pb-discover.c \ + discover/pb-discover.h \ + discover/platform.c \ + discover/platform.h \ + discover/platform-powerpc.c \ + discover/resource.c \ + discover/resource.h \ + discover/sysinfo.c \ + discover/sysinfo.h \ + discover/network.c \ + discover/network.h \ + discover/udev.c \ + discover/udev.h \ + discover/user-event.c \ + discover/user-event.h \ + discover/kboot-parser.c \ + discover/yaboot-parser.c \ + discover/pxe-parser.c -AM_CPPFLAGS = -I$(top_srcdir)/lib \ - -DLOCALEDIR='"$(localedir)"' \ - $(DEFAULT_CPPFLAGS) - -AM_CFLAGS = $(DEFAULT_CFLAGS) \ - -DPREFIX='"$(prefix)"' \ - -DPKG_SHARE_DIR='"$(pkgdatadir)"' \ - -DPKG_SYSCONF_DIR='"$(pkgsysconfdir)"' \ - -DPKG_LIBEXEC_DIR='"$(pkglibexecdir)"' \ - -DLOCAL_STATE_DIR='"$(localstatedir)"' - -EXTRA_DIST = native-parser.c +discover_pb_discover_LDADD = \ + $(core_lib) \ + discover/grub2/grub2-parser.ro -sbin_PROGRAMS = pb-discover +discover_pb_discover_LDFLAGS = -ludev -pb_discover_SOURCES = \ - boot.c \ - boot.h \ - cdrom.c \ - cdrom.h \ - device-handler.c \ - device-handler.h \ - discover-server.c \ - discover-server.h \ - event.c \ - event.h \ - file.c \ - file.h \ - params.c \ - params.h \ - parser.c \ - parser.h \ - parser-conf.c \ - parser-conf.h \ - parser-utils.c \ - parser-utils.h \ - paths.c \ - paths.h \ - pb-discover.c \ - pb-discover.h \ - platform.c \ - platform.h \ - platform-powerpc.c \ - resource.c \ - resource.h \ - sysinfo.c \ - sysinfo.h \ - network.c \ - network.h \ - udev.c \ - udev.h \ - user-event.c \ - user-event.h \ - kboot-parser.c \ - yaboot-parser.c \ - pxe-parser.c - -pb_discover_LDADD = $(top_builddir)/lib/libpbcore.la grub2/grub2-parser.ro +discover_pb_discover_CPPFLAGS = \ + $(AM_CPPFLAGS) \ + -DLOCAL_STATE_DIR='"$(localstatedir)"' \ + -DLOCALEDIR='"$(localedir)"' \ + -DPKG_LIBEXEC_DIR='"$(pkglibexecdir)"' \ + -DPKG_SHARE_DIR='"$(pkgsharedir)"' \ + -DPKG_SYSCONF_DIR='"$(pkgsysconfdir)"' -pb_discover_LDFLAGS = -ludev +EXTRA_DIST += discover/native-parser.c -MAINTAINERCLEANFILES = Makefile.in diff --git a/discover/grub2/Makefile.am b/discover/grub2/Makefile.am index 2efc7f3..dda6835 100644 --- a/discover/grub2/Makefile.am +++ b/discover/grub2/Makefile.am @@ -12,39 +12,49 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(top_srcdir) $(DEFAULT_CPPFLAGS) +noinst_PROGRAMS += discover/grub2/grub2-parser.ro -AM_CFLAGS = $(DEFAULT_CFLAGS) \ - -DPREFIX='"$(prefix)"' \ - -DPKG_SHARE_DIR='"$(pkgdatadir)"' \ - -DPKG_SYSCONF_DIR='"$(pkgsysconfdir)"' \ - -DLOCAL_STATE_DIR='"$(localstatedir)"' +discover/grub2/grub2-parser.ro$(EXEEXT): \ + $(discover_grub2_grub2_parser_ro_OBJECTS) + $(LD) -r -o $@ $^ -AM_YFLAGS = -d +discover_grub2_grub2_parser_ro_SOURCES = \ + discover/grub2/builtins.c \ + discover/grub2/env.c \ + discover/grub2/grub2.h \ + discover/grub2/grub2.c \ + discover/grub2/lexer.l \ + discover/grub2/parser.y \ + discover/grub2/script.c -noinst_PROGRAMS = grub2-parser.ro +BUILT_SOURCES += \ + discover/grub2/parser.c \ + discover/grub2/parser.h \ + discover/grub2/lexer.h \ + discover/grub2/lexer.c -grub2-parser.ro$(EXEEXT): $(grub2_parser_ro_OBJECTS) - $(LD) -r -o $@ $^ +CLEANFILES += \ + discover/grub2/parser.c \ + discover/grub2/parser.h \ + discover/grub2/lexer.c \ + discover/grub2/lexer.h -grub2_parser_ro_SOURCES = \ - builtins.c \ - env.c \ - grub2.h \ - grub2.c \ - lexer.l \ - parser.y \ - script.c \ - parser.c +discover_grub2_grub2_parser_ro_CPPFLAGS = \ + $(AM_CPPFLAGS) \ + -I$(top_srcdir)/discover/grub2 \ + -I$(top_builddir)/discover/grub2 -BUILT_SOURCES = parser.h lexer.h lexer.c lexer.h -CLEANFILES = lexer.c lexer.h -MAINTAINERCLEANFILES = Makefile.in # ylwrap doesn't handle flex header files well; use our own rule here. -lexer.h lexer.c: lexer.l - $(LEX) $(LFLAGS) --header-file=lexer.h -o lexer.c $^ +discover/grub2/lexer.h discover/grub2/lexer.c: \ + $(top_srcdir)/discover/grub2/lexer.l + $(AM_V_LEX)$(LEXCOMPILE) --header-file=discover/grub2/lexer.h \ + -o discover/grub2/lexer.c $^ + +# We need to loosen our warnings for the generated lexer code. +discover/grub2/%lexer.o discover/grub2/lexer.o: \ + AM_CFLAGS += -Wno-unused-parameter -Wno-missing-prototypes \ + -Wno-missing-declarations -lexer.o: CFLAGS+=-Wno-unused-parameter -Wno-missing-prototypes \ - -Wno-missing-declarations +$(discover_grub2_grub2_parser_ro_OBJECTS): discover/grub2/parser.h diff --git a/discover/grub2/lexer.l b/discover/grub2/lexer.l index e1aad99..e557146 100644 --- a/discover/grub2/lexer.l +++ b/discover/grub2/lexer.l @@ -17,8 +17,6 @@ void yyerror(struct grub2_parser *parser, const char *fmt, ...); %option yylineno %option noyyalloc noyyfree noyyrealloc %option extra-type="struct grub2_parser *" -%option header-file="lexer.h" -%option outfile="lexer.c" %x sqstring %x dqstring diff --git a/lib/Makefile.am b/lib/Makefile.am index 5fc8911..f9f9461 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -12,38 +12,37 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -AUTOMAKE_OPTIONS = subdir-objects +core_lib = lib/libpbcore.la -AM_CPPFLAGS = -I$(top_srcdir)/lib $(DEFAULT_CPPFLAGS) \ - -DPREFIX='"$(prefix)"' - -AM_CFLAGS = $(DEFAULT_CFLAGS) +noinst_LTLIBRARIES += $(core_lib) -noinst_LTLIBRARIES = libpbcore.la +lib_libpbcore_la_CPPFLAGS = \ + $(AM_CPPFLAGS) \ + -DPREFIX='"$(prefix)"' -libpbcore_la_SOURCES = \ - fold/fold.h \ - fold/fold.c \ - log/log.h \ - log/log.c \ - list/list.c \ - list/list.h \ - waiter/waiter.c \ - waiter/waiter.h \ - pb-protocol/pb-protocol.c \ - pb-protocol/pb-protocol.h \ - pb-config/pb-config.c \ - pb-config/pb-config.h \ - process/process.c \ - process/process.h \ - types/types.h \ - talloc/talloc.c \ - talloc/talloc.h \ - system/system.c \ - system/system.h \ - url/url.c \ - url/url.h \ - util/util.c \ - util/util.h +lib_libpbcore_la_SOURCES = \ + lib/fold/fold.h \ + lib/fold/fold.c \ + lib/i18n/i18n.h \ + lib/log/log.h \ + lib/log/log.c \ + lib/list/list.c \ + lib/list/list.h \ + lib/waiter/waiter.c \ + lib/waiter/waiter.h \ + lib/pb-protocol/pb-protocol.c \ + lib/pb-protocol/pb-protocol.h \ + lib/pb-config/pb-config.c \ + lib/pb-config/pb-config.h \ + lib/process/process.c \ + lib/process/process.h \ + lib/types/types.h \ + lib/talloc/talloc.c \ + lib/talloc/talloc.h \ + lib/system/system.c \ + lib/system/system.h \ + lib/url/url.c \ + lib/url/url.h \ + lib/util/util.c \ + lib/util/util.h -MAINTAINERCLEANFILES = Makefile.in diff --git a/man/Makefile.am b/man/Makefile.am index 75a6bc3..a299625 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -12,6 +12,11 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -dist_man_MANS = pb-console.8 pb-discover.8 pb-event.8 petitboot-nc.8 petitboot-twin.8 pb-udhcpc.8 petitboot.8 - -MAINTAINERCLEANFILES = Makefile.in +dist_man_MANS = \ + man/pb-console.8 \ + man/pb-discover.8 \ + man/pb-event.8 \ + man/petitboot-nc.8 \ + man/petitboot-twin.8 \ + man/pb-udhcpc.8 \ + man/petitboot.8 diff --git a/test/Makefile.am b/test/Makefile.am index 6562836..427041b 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -17,10 +17,8 @@ AM_LOG_FLAGS = --leak-check=full --error-exitcode=1 export LOG_COMPILER AM_LOG_FLAGS endif -SUBDIRS = lib parser urls +noinst_SCRIPTS = test/hotplug-device.sh +EXTRA_DIST += $(noinst_SCRIPTS) -noinst_SCRIPTS = hotplug-device.sh - -EXTRA_DIST = $(noinst_SCRIPTS) - -MAINTAINERCLEANFILES = Makefile.in +$(check_PROGRAMS): AM_CFLAGS = -O0 -g -Wall -Wextra -Werror +$(check_PROGRAMS): AM_CPPFLAGS = -DDEBUG -I$(top_srcdir)/lib diff --git a/test/lib/Makefile.am b/test/lib/Makefile.am index 23bee36..9636b08 100644 --- a/test/lib/Makefile.am +++ b/test/lib/Makefile.am @@ -11,30 +11,21 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -AUTOMAKE_OPTIONS = parallel-tests +lib_TESTS = \ + test/lib/list-test \ + test/lib/test-process-noargs \ + test/lib/test-process-sync \ + test/lib/test-process-sync-stdout \ + test/lib/test-process-stderr \ + test/lib/test-process-stderr-stdout \ + test/lib/test-process-async \ + test/lib/test-process-async-stdout \ + test/lib/test-process-parent-stdout \ + test/lib/test-process-both \ + test/lib/test-process-stdout-eintr \ + test/lib/test-fold -AM_CPPFLAGS = \ - -I$(top_srcdir) \ - -I$(top_srcdir)/lib \ - -DDEBUG +$(lib_TESTS): LIBS += $(core_lib) -AM_CFLAGS = -O0 -ggdb -Wall -Wextra -Werror - -LDADD = ../../lib/libpbcore.la - -check_PROGRAMS = list-test \ - test-process-noargs \ - test-process-sync \ - test-process-sync-stdout \ - test-process-stderr \ - test-process-stderr-stdout \ - test-process-async \ - test-process-async-stdout \ - test-process-parent-stdout \ - test-process-both \ - test-process-stdout-eintr \ - test-fold - -TESTS = $(check_PROGRAMS) - -MAINTAINERCLEANFILES = Makefile.in +check_PROGRAMS += $(lib_TESTS) +TESTS += $(lib_TESTS) diff --git a/test/parser/Makefile.am b/test/parser/Makefile.am index f0eff9e..685d7ac 100644 --- a/test/parser/Makefile.am +++ b/test/parser/Makefile.am @@ -11,117 +11,111 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -AUTOMAKE_OPTIONS = parallel-tests foreign - -AM_CPPFLAGS = \ - -I$(top_srcdir) \ - -I$(top_srcdir)/lib \ - -I$(top_srcdir)/discover \ - -DLOCAL_STATE_DIR='"$(localstatedir)"' \ - -DTEST_CONF_BASE='"$(srcdir)/data"' \ - -DDEBUG -DPETITBOOT_TEST - -AM_CFLAGS = -O0 -ggdb -Wall -Wextra -Werror - -LDADD = $(top_builddir)/lib/libpbcore.la libtest.ro - -TESTS = \ - test-null \ - test-grub2-single \ - test-grub2-default \ - test-grub2-empty \ - test-grub2-default-index \ - test-grub2-default-multiword \ - test-grub2-multiple-resolve \ - test-grub2-multiple-id \ - test-grub2-single-line-if \ - test-grub2-load-env \ - test-grub2-save-env \ - test-grub2-saved-default \ - test-grub2-nondefault-prefix \ - test-grub2-f18-ppc64 \ - test-grub2-f20-ppc64 \ - test-grub2-ubuntu-13_04-x86 \ - test-grub2-lexer-error \ - test-grub2-parser-error \ - test-kboot-single \ - test-yaboot-empty \ - test-yaboot-single \ - test-yaboot-partition \ - test-yaboot-partition-override \ - test-yaboot-external \ - test-yaboot-root-global \ - test-yaboot-root-override \ - test-yaboot-device-override \ - test-yaboot-global-state \ - test-yaboot-leftovers \ - test-yaboot-default \ - test-yaboot-rh8-ppc64 \ - test-pxe-empty \ - test-pxe-single \ - test-pxe-initrd-in-append \ - test-pxe-mac-without-conf \ - test-pxe-ip-without-conf \ - test-pxe-non-url-conf \ - test-pxe-local \ - test-pxe-pathprefix-with-conf \ - test-pxe-non-url-pathprefix-with-conf \ - test-pxe-pathprefix-discover \ - test-pxe-pathprefix-discover-mac \ - test-pxe-path-resolve-relative \ - test-pxe-path-resolve-absolute \ - test-pxe-discover-bootfile-root \ - test-pxe-discover-bootfile-subdir \ - test-pxe-discover-bootfile-pathprefix \ - test-pxe-discover-bootfile-relative-conffile \ - test-pxe-discover-bootfile-absolute-conffile \ - test-unresolved-remove - -$(TESTS): %: %.embedded-config.o -$(TESTS): LDADD += $@.embedded-config.o - -extract_config = $(srcdir)/extract-config.awk +parser_TESTS = \ + test/parser/test-null \ + test/parser/test-grub2-single \ + test/parser/test-grub2-default \ + test/parser/test-grub2-empty \ + test/parser/test-grub2-default-index \ + test/parser/test-grub2-default-multiword \ + test/parser/test-grub2-multiple-resolve \ + test/parser/test-grub2-multiple-id \ + test/parser/test-grub2-single-line-if \ + test/parser/test-grub2-load-env \ + test/parser/test-grub2-save-env \ + test/parser/test-grub2-saved-default \ + test/parser/test-grub2-nondefault-prefix \ + test/parser/test-grub2-f18-ppc64 \ + test/parser/test-grub2-f20-ppc64 \ + test/parser/test-grub2-ubuntu-13_04-x86 \ + test/parser/test-grub2-lexer-error \ + test/parser/test-grub2-parser-error \ + test/parser/test-kboot-single \ + test/parser/test-yaboot-empty \ + test/parser/test-yaboot-single \ + test/parser/test-yaboot-partition \ + test/parser/test-yaboot-partition-override \ + test/parser/test-yaboot-external \ + test/parser/test-yaboot-root-global \ + test/parser/test-yaboot-root-override \ + test/parser/test-yaboot-device-override \ + test/parser/test-yaboot-global-state \ + test/parser/test-yaboot-leftovers \ + test/parser/test-yaboot-default \ + test/parser/test-yaboot-rh8-ppc64 \ + test/parser/test-pxe-empty \ + test/parser/test-pxe-single \ + test/parser/test-pxe-initrd-in-append \ + test/parser/test-pxe-mac-without-conf \ + test/parser/test-pxe-ip-without-conf \ + test/parser/test-pxe-non-url-conf \ + test/parser/test-pxe-local \ + test/parser/test-pxe-pathprefix-with-conf \ + test/parser/test-pxe-non-url-pathprefix-with-conf \ + test/parser/test-pxe-pathprefix-discover \ + test/parser/test-pxe-pathprefix-discover-mac \ + test/parser/test-pxe-path-resolve-relative \ + test/parser/test-pxe-path-resolve-absolute \ + test/parser/test-pxe-discover-bootfile-root \ + test/parser/test-pxe-discover-bootfile-subdir \ + test/parser/test-pxe-discover-bootfile-pathprefix \ + test/parser/test-pxe-discover-bootfile-relative-conffile \ + test/parser/test-pxe-discover-bootfile-absolute-conffile \ + test/parser/test-unresolved-remove + +TESTS += $(parser_TESTS) +check_PROGRAMS += $(parser_TESTS) test/parser/libtest.ro + +check_DATA += \ + test/parser/data/grub2-f18-ppc64.conf \ + test/parser/data/grub2-f20-ppc.conf \ + test/parser/data/grub2-ubuntu-13_04-x86.conf \ + test/parser/data/yaboot-rh8-ppc64.conf + +$(parser_TESTS): AM_CPPFLAGS += \ + -I$(top_srcdir)/discover \ + -DLOCAL_STATE_DIR='"$(localstatedir)"' +$(parser_TESTS): LDADD += $@.embedded-config.o test/parser/libtest.ro $(core_lib) +$(parser_TESTS): %: %.embedded-config.o test/parser/libtest.ro + +extract_config = $(srcdir)/test/parser/extract-config.awk %.embedded-config.c: %.c $(extract_config) $(AWK) -f $(extract_config) $< > $@ # objects under test -parser_objs = \ - $(top_srcdir)/discover/yaboot-parser.c \ - $(top_srcdir)/discover/kboot-parser.c \ - $(top_srcdir)/discover/pxe-parser.c \ - $(top_srcdir)/discover/platform.c \ - $(top_srcdir)/discover/resource.c \ - $(top_srcdir)/discover/paths.c \ - $(top_srcdir)/discover/device-handler.c \ - $(top_srcdir)/discover/parser-conf.c \ - $(top_srcdir)/discover/user-event.c \ - $(top_srcdir)/discover/event.c - -libtest_ro_SOURCES = \ - main.c \ - utils.c \ - handler.c \ - parser-test.h \ - $(parser_objs) -libtest_ro_LDADD = \ - ../../discover/grub2/grub2-parser.ro +test_parser_libtest_ro_SOURCES = \ + test/parser/main.c \ + test/parser/utils.c \ + test/parser/handler.c \ + test/parser/parser-test.h \ + discover/yaboot-parser.c \ + discover/kboot-parser.c \ + discover/pxe-parser.c \ + discover/platform.c \ + discover/resource.c \ + discover/paths.c \ + discover/device-handler.c \ + discover/parser-conf.c \ + discover/user-event.c \ + discover/event.c \ + $(discover_grub2_grub2_parser_ro_SOURCES) + +test_parser_libtest_ro_CPPFLAGS = \ + $(AM_CPPFLAGS) \ + -I$(top_srcdir)/discover \ + -I$(top_srcdir)/discover/grub2 \ + -DPETITBOOT_TEST \ + -DLOCAL_STATE_DIR='"$(localstatedir)"' \ + -DTEST_CONF_BASE='"$(top_srcdir)/test/parser/data"' -libtest.ro$(EXEEXT): $(libtest_ro_OBJECTS) $(libtest_ro_LDADD) +test/parser/libtest.ro$(EXEEXT): $(test_parser_libtest_ro_OBJECTS) \ + $(test_parser_libtest_ro_LDADD) $(LD) -o $@ -r $^ -check_PROGRAMS = $(TESTS) libtest.ro - -check_DATA = \ - data/grub2-f18-ppc64.conf \ - data/grub2-f20-ppc.conf \ - data/grub2-ubuntu-13_04-x86.conf \ - data/yaboot-rh8-ppc64.conf - -EXTRA_DIST = $(check_DATA) $(extract_config) +EXTRA_DIST += $(check_DATA) $(extract_config) -CLEANFILES = \ +CLEANFILES += \ $(foreach f, $(TESTS), $(f).embedded-config.c $(f).embedded-config.o) -MAINTAINERCLEANFILES = Makefile.in diff --git a/test/urls/Makefile.am b/test/urls/Makefile.am index fbdf792..47040ae 100644 --- a/test/urls/Makefile.am +++ b/test/urls/Makefile.am @@ -11,32 +11,24 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -AUTOMAKE_OPTIONS = parallel-tests +check_PROGRAMS += test/urls/parse-url +check_SCRIPTS += test/urls/run-url-test -AM_CPPFLAGS = \ - -I$(top_srcdir) \ - -I$(top_srcdir)/lib \ - $(DEFAULT_CPPFLAGS) +test_urls_parse_url_SOURCES = test/urls/parse-url.c +test_urls_parse_url_LDADD = $(core_lib) -AM_CFLAGS = \ - $(DEFAULT_CFLAGS) +url_TESTS = \ + test/urls/data/double-slash.test \ + test/urls/data/http-simple.test \ + test/urls/data/join-full.test \ + test/urls/data/join-absolute.test \ + test/urls/data/join-relative.test \ + test/urls/data/localpath.test -parse_url_SOURCES = parse-url.c - -parse_url_LDADD = ../../lib/libpbcore.la - -check_PROGRAMS = parse-url -check_SCRIPTS = run-url-test - -TESTS = data/double-slash.test \ - data/http-simple.test \ - data/join-full.test \ - data/join-absolute.test \ - data/join-relative.test \ - data/localpath.test +TESTS += $(url_TESTS) TEST_EXTENSIONS = .test -TEST_LOG_COMPILER = $(builddir)/run-url-test +TEST_LOG_COMPILER = $(builddir)/test/urls/run-url-test if ENABLE_TEST_VALGRIND TEST_LOG_FLAGS = --valgrind @@ -46,18 +38,17 @@ edit = sed \ -e 's|@PACKAGE_NAME\@|$(PACKAGE_NAME)|g' \ -e 's|@PACKAGE_VERSION\@|$(PACKAGE_VERSION)|g' \ -e 's|@PACKAGE_BUGREPORT\@|$(PACKAGE_BUGREPORT)|g' \ - -e 's|@abs_srcdir\@|$(abs_srcdir)|g' \ - -e 's|@abs_builddir\@|$(abs_builddir)|g' \ + -e 's|@abs_srcdir\@|$(abs_srcdir)/test/urls|g' \ + -e 's|@abs_builddir\@|$(abs_builddir)/test/urls|g' \ -e 's|@prefix\@|$(prefix)|g' -EXTRA_DIST = $(TESTS) run-url-test.in +EXTRA_DIST += $(url_TESTS) test/urls/run-url-test.in -run-url-test: Makefile $(srcdir)/run-url-test.in +test/urls/run-url-test: $(srcdir)/test/urls/run-url-test.in rm -f $@ $@.tmp $(edit) $(srcdir)/$@.in >$@.tmp chmod +x $@.tmp mv $@.tmp $@ -CLEANFILES = run-url-test +CLEANFILES += test/urls/run-url-test -MAINTAINERCLEANFILES = Makefile.in diff --git a/ui/common/Makefile.am b/ui/common/Makefile.am index a7b2f0f..df6ea02 100644 --- a/ui/common/Makefile.am +++ b/ui/common/Makefile.am @@ -12,48 +12,39 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -AM_CPPFLAGS = \ - -I$(top_srcdir) \ - -I$(top_srcdir)/lib \ - $(DEFAULT_CPPFLAGS) - -AM_CFLAGS = \ - $(DEFAULT_CFLAGS) - -noinst_LTLIBRARIES = libpbui.la - -libpbui_la_SOURCES = \ - discover-client.c \ - discover-client.h \ - joystick.c \ - joystick.h \ - timer.c \ - timer.h \ - ui-system.c \ - ui-system.h +noinst_LTLIBRARIES += ui/common/libpbui.la + +ui_common_libpbui_la_SOURCES = \ + ui/common/discover-client.c \ + ui/common/discover-client.h \ + ui/common/joystick.c \ + ui/common/joystick.h \ + ui/common/timer.c \ + ui/common/timer.h \ + ui/common/ui-system.c \ + ui/common/ui-system.h if ENABLE_PS3 -libpbui_la_SOURCES += \ - ps3.c \ - ps3.h +ui_common_libpbui_la_SOURCES += \ + ui/common/ps3.c \ + ui/common/ps3.h endif artwork = if WITH_TWIN artwork += \ - $(srcdir)/artwork/background.jpg \ - $(srcdir)/artwork/COPYING-tux \ - $(srcdir)/artwork/tux.png \ - $(srcdir)/artwork/oxygen/applications-system.png \ - $(srcdir)/artwork/oxygen/configure.png \ - $(srcdir)/artwork/oxygen/COPYING-oxygen \ - $(srcdir)/artwork/oxygen/drive-harddisk.png \ - $(srcdir)/artwork/oxygen/network-wired.png \ - $(srcdir)/artwork/oxygen/utilities-terminal.png + $(srcdir)/ui/common/artwork/background.jpg \ + $(srcdir)/ui/common/artwork/COPYING-tux \ + $(srcdir)/ui/common/artwork/tux.png \ + $(srcdir)/ui/common/artwork/oxygen/applications-system.png \ + $(srcdir)/ui/common/artwork/oxygen/configure.png \ + $(srcdir)/ui/common/artwork/oxygen/COPYING-oxygen \ + $(srcdir)/ui/common/artwork/oxygen/drive-harddisk.png \ + $(srcdir)/ui/common/artwork/oxygen/network-wired.png \ + $(srcdir)/ui/common/artwork/oxygen/utilities-terminal.png endif artworkdir = $(pkgdatadir)/artwork/ dist_artwork_DATA = $(artwork) -MAINTAINERCLEANFILES = Makefile.in diff --git a/ui/ncurses/Makefile.am b/ui/ncurses/Makefile.am index 6112b65..9a4e1e4 100644 --- a/ui/ncurses/Makefile.am +++ b/ui/ncurses/Makefile.am @@ -12,66 +12,59 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -AM_CPPFLAGS = \ - -I$(top_srcdir) \ - -I$(top_srcdir)/lib \ - -DLOCALEDIR='"$(localedir)"' \ - $(DEFAULT_CPPFLAGS) - -AM_CFLAGS = \ - $(DEFAULT_CFLAGS) - -common_libs = \ - libpbnc.la \ - $(top_builddir)/ui/common/libpbui.la \ - $(top_builddir)/lib/libpbcore.la \ +ui_ncurses_common_libs = \ + ui/ncurses/libpbnc.la \ + ui/common/libpbui.la \ + $(core_lib) \ @MENU_LIB@ @FORM_LIB@ @CURSES_LIB@ -noinst_LTLIBRARIES = libpbnc.la +noinst_LTLIBRARIES += ui/ncurses/libpbnc.la -libpbnc_la_SOURCES = \ - nc-config.c \ - nc-config.h \ - nc-config-help.c \ - nc-cui.c \ - nc-cui.h \ - nc-cui-help.c \ - nc-boot-editor.c \ - nc-boot-editor.h \ - nc-boot-editor-help.c \ - nc-helpscreen.c \ - nc-helpscreen.h \ - nc-lang.c \ - nc-lang.h \ - nc-menu.c \ - nc-menu.h \ - nc-scr.c \ - nc-scr.h \ - nc-sysinfo.c \ - nc-sysinfo.h \ - nc-sysinfo-help.c \ - nc-textscreen.c \ - nc-textscreen.h \ - nc-widgets.c \ - nc-widgets.h \ - nc-add-url.c \ - nc-add-url.h \ - nc-add-url-help.c +ui_ncurses_libpbnc_la_SOURCES = \ + ui/ncurses/nc-config.c \ + ui/ncurses/nc-config.h \ + ui/ncurses/nc-config-help.c \ + ui/ncurses/nc-cui.c \ + ui/ncurses/nc-cui.h \ + ui/ncurses/nc-cui-help.c \ + ui/ncurses/nc-boot-editor.c \ + ui/ncurses/nc-boot-editor.h \ + ui/ncurses/nc-boot-editor-help.c \ + ui/ncurses/nc-helpscreen.c \ + ui/ncurses/nc-helpscreen.h \ + ui/ncurses/nc-lang.c \ + ui/ncurses/nc-lang.h \ + ui/ncurses/nc-menu.c \ + ui/ncurses/nc-menu.h \ + ui/ncurses/nc-scr.c \ + ui/ncurses/nc-scr.h \ + ui/ncurses/nc-sysinfo.c \ + ui/ncurses/nc-sysinfo.h \ + ui/ncurses/nc-sysinfo-help.c \ + ui/ncurses/nc-textscreen.c \ + ui/ncurses/nc-textscreen.h \ + ui/ncurses/nc-widgets.c \ + ui/ncurses/nc-widgets.h \ + ui/ncurses/nc-add-url.c \ + ui/ncurses/nc-add-url.h \ + ui/ncurses/nc-add-url-help.c -sbin_PROGRAMS = petitboot-nc +sbin_PROGRAMS += ui/ncurses/petitboot-nc if ENABLE_PS3 -sbin_PROGRAMS += petitboot-ps3-nc +sbin_PROGRAMS += ui/ncurses/petitboot-ps3-nc endif +ui_ncurses_petitboot_nc_CPPFLAGS = \ + $(DEFAULT_CPPFLAGS) \ + -DLOCALEDIR='"$(localedir)"' \ + -I$(top_srcdir)/lib -petitboot_nc_SOURCES = generic-main.c -petitboot_nc_LDADD = $(common_libs) - -petitboot_ps3_nc_SOURCES = ps3-main.c -petitboot_ps3_nc_LDADD = $(common_libs) $(libdir)/libps3-utils.so -#petitboot_ps3_nc_LDFLAGS = -L$(libdir) -lps3-utils +ui_ncurses_petitboot_nc_SOURCES = ui/ncurses/generic-main.c +ui_ncurses_petitboot_nc_LDADD = $(ui_ncurses_common_libs) -EXTRA_DIST = ui-guidelines.text +ui_ncurses_petitboot_ps3_nc_SOURCES = ui/ncurses/ps3-main.c +ui_ncurses_petitboot_ps3_nc_LDADD = $(ui_ncurses_common_libs) \ + $(libdir)/libps3-utils.so -MAINTAINERCLEANFILES = Makefile.in +EXTRA_DIST += ui/ncurses/ui-guidelines.text diff --git a/ui/test/Makefile.am b/ui/test/Makefile.am index 63b7d8c..afdf301 100644 --- a/ui/test/Makefile.am +++ b/ui/test/Makefile.am @@ -11,22 +11,10 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# +noinst_PROGRAMS += ui/test/discover-test -AM_CPPFLAGS = \ - -I$(top_srcdir) \ - -I$(top_srcdir)/lib \ - $(DEFAULT_CPPFLAGS) - -AM_CFLAGS = \ - $(DEFAULT_CFLAGS) - -common_libs = \ - $(top_builddir)/ui/common/libpbui.la \ - $(top_builddir)/lib/libpbcore.la - -noinst_PROGRAMS = discover-test - -discover_test_SOURCES = discover-test.c -discover_test_LDADD = $(common_libs) - -MAINTAINERCLEANFILES = Makefile.in +ui_test_discover_test_SOURCES = ui/test/discover-test.c +ui_test_discover_test_LDADD = \ + ui/common/libpbui.la \ + $(core_lib) diff --git a/ui/twin/Makefile.am b/ui/twin/Makefile.am index 053e73c..2c5032a 100644 --- a/ui/twin/Makefile.am +++ b/ui/twin/Makefile.am @@ -12,50 +12,42 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -AM_CPPFLAGS = \ - -I$(top_srcdir) \ - -I$(top_srcdir)/lib \ - $(DEFAULT_CPPFLAGS) \ - $(twin_CFLAGS) - -AM_CFLAGS = \ - -DPB_ARTWORK_PATH='"$(pkgdatadir)/artwork/"' \ - $(DEFAULT_CFLAGS) \ - $(twin_CFLAGS) +ui_twin_common_libs = \ + ui/twin/libpbt.la \ + ui/common/libpbui.la \ + $(core_lib) -AM_LDFLAGS = \ - $(twin_LIBS) +ui_twin_common_cppflags = \ + $(DEFAULT_CPPFLAGS) \ + -I$(top_srcdir)/lib \ + -DPB_ARTWORK_PATH='"$(pkgdatadir)/artwork/"' -common_libs = \ - libpbt.la \ - $(top_builddir)/ui/common/libpbui.la \ - $(top_builddir)/lib/libpbcore.la +noinst_LTLIBRARIES += ui/twin/libpbt.la -noinst_LTLIBRARIES = libpbt.la +ui_twin_libpbt_la_SOURCES = \ + ui/twin/pbt-client.c \ + ui/twin/pbt-client.h \ + ui/twin/pbt-main.c \ + ui/twin/pbt-main.h \ + ui/twin/pbt-menu.c \ + ui/twin/pbt-menu.h \ + ui/twin/pbt-scr.c \ + ui/twin/pbt-scr.h -libpbt_la_SOURCES = \ - pbt-client.c \ - pbt-client.h \ - pbt-main.c \ - pbt-main.h \ - pbt-menu.c \ - pbt-menu.h \ - pbt-scr.c \ - pbt-scr.h +ui_twin_libpbt_la_CPPFLAGS = $(ui_twin_common_cppflags) -sbin_PROGRAMS = petitboot-twin +sbin_PROGRAMS += ui/twin/petitboot-twin if ENABLE_PS3 -sbin_PROGRAMS += petitboot-ps3-twin +sbin_PROGRAMS += ui/twin/petitboot-ps3-twin endif -petitboot_twin_SOURCES = main-generic.c -petitboot_twin_LDADD = $(common_libs) - -petitboot_ps3_twin_SOURCES = main-ps3.c -petitboot_ps3_twin_LDADD = $(common_libs) -petitboot_ps3_twin_LDFLAGS = -lps3-utils +ui_twin_petitboot_twin_SOURCES = ui/twin/main-generic.c +ui_twin_petitboot_twin_CPPFLAGS = $(ui_twin_common_cppflags) +ui_twin_petitboot_twin_LDADD = $(ui_twin_common_libs) $(twin_LIBS) +ui_twin_petitboot_ps3_twin_SOURCES = ui/twin/main-ps3.c +ui_twin_petitboot_ps3_twin_CPPFLAGS = $(ui_twin_common_cppflags) +ui_twin_petitboot_ps3_twin_LDADD = $(ui_twin_common_libs) $(twin_LIBS) -lps3-utils -MAINTAINERCLEANFILES = Makefile.in diff --git a/utils/Makefile.am b/utils/Makefile.am index f0a6fc5..7c92f20 100644 --- a/utils/Makefile.am +++ b/utils/Makefile.am @@ -12,28 +12,17 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -AM_CPPFLAGS = \ - -I$(top_srcdir) \ - -I$(top_srcdir)/lib \ - $(DEFAULT_CPPFLAGS) +dist_sbin_SCRIPTS += utils/pb-udhcpc +dist_pkglibexec_SCRIPTS = utils/pb-console utils/pb-sysinfo +sbin_PROGRAMS += utils/pb-event -AM_CFLAGS = \ - $(DEFAULT_CFLAGS) - -dist_sbin_SCRIPTS = pb-udhcpc -dist_pkglibexec_SCRIPTS = pb-console pb-sysinfo - -sbin_PROGRAMS = pb-event - -pb_event_SOURCES = pb-event.c +utils_pb_event_SOURCES = utils/pb-event.c dist_pkgdata_DATA = \ - kboot.conf.sample \ - bb-kexec-reboot \ - logrotate.conf \ - hooks/01-create-default-dtb \ - hooks/20-update-dtb-sample \ - hooks/20-set-stdout \ - hooks/90-sort-dtb - -MAINTAINERCLEANFILES = Makefile.in + utils/kboot.conf.sample \ + utils/bb-kexec-reboot \ + utils/logrotate.conf \ + utils/hooks/01-create-default-dtb \ + utils/hooks/20-update-dtb-sample \ + utils/hooks/20-set-stdout \ + utils/hooks/90-sort-dtb |