[ostree/wip-2012-9: 1/2] build: Add --enable-triggers-only
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree/wip-2012-9: 1/2] build: Add --enable-triggers-only
- Date: Sun, 26 Aug 2012 18:11:19 +0000 (UTC)
commit c63cca53d71d85a057d5fa6580da034bf1679526
Author: Colin Walters <walters verbum org>
Date: Sun Aug 26 12:46:14 2012 -0400
build: Add --enable-triggers-only
For bootstrapping gnome-ostree, we need to install the triggers early
on, before we actually build the real ostree binary.
Makefile-daemon.am | 2 ++
Makefile-libostree.am | 4 +++-
Makefile-ostadmin.am | 2 ++
Makefile-ostree.am | 2 ++
Makefile-otutil.am | 2 ++
Makefile-switchroot.am | 2 ++
Makefile.am | 2 ++
configure.ac | 21 +++++++++++++++++----
8 files changed, 32 insertions(+), 5 deletions(-)
---
diff --git a/Makefile-daemon.am b/Makefile-daemon.am
index aab7e40..3a9d718 100644
--- a/Makefile-daemon.am
+++ b/Makefile-daemon.am
@@ -17,7 +17,9 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
+if !TRIGGERS_ONLY
libexec_PROGRAMS += ostreed
+endif
ostreed_SOURCES = src/daemon/ostreed.c \
src/daemon/ot-daemon.h \
diff --git a/Makefile-libostree.am b/Makefile-libostree.am
index 89e7b19..e4dadae 100644
--- a/Makefile-libostree.am
+++ b/Makefile-libostree.am
@@ -17,7 +17,9 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
+if !TRIGGERS_ONLY
privlib_LTLIBRARIES += libostree.la
+endif
libostree_la_SOURCES = src/libostree/ostree.h \
src/libostree/ostree-core.c \
@@ -56,4 +58,4 @@ libostree_la_LIBADD += $(OT_DEP_LIBARCHIVE_LIBS)
endif
install-data-hook:
- rm $(DESTDIR)$(privlibdir)/libostree.la
+ rm -f $(DESTDIR)$(privlibdir)/libostree.la
diff --git a/Makefile-ostadmin.am b/Makefile-ostadmin.am
index 76df1cb..636e219 100644
--- a/Makefile-ostadmin.am
+++ b/Makefile-ostadmin.am
@@ -15,7 +15,9 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
+if !TRIGGERS_ONLY
bin_PROGRAMS += ostadmin
+endif
ostadmin_SOURCES = src/ostadmin/main.c \
src/ostadmin/ot-admin-builtins.h \
diff --git a/Makefile-ostree.am b/Makefile-ostree.am
index 1356fdd..571b07f 100644
--- a/Makefile-ostree.am
+++ b/Makefile-ostree.am
@@ -17,7 +17,9 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
+if !TRIGGERS_ONLY
bin_PROGRAMS += ostree
+endif
ostree_SOURCES = src/ostree/main.c \
src/ostree/ot-builtins.h \
diff --git a/Makefile-otutil.am b/Makefile-otutil.am
index 4855e5e..84fe14a 100644
--- a/Makefile-otutil.am
+++ b/Makefile-otutil.am
@@ -17,7 +17,9 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
+if !TRIGGERS_ONLY
noinst_LTLIBRARIES += libotutil.la
+endif
libotutil_la_SOURCES = \
src/libotutil/ot-checksum-utils.c \
diff --git a/Makefile-switchroot.am b/Makefile-switchroot.am
index 3400057..cf2cc54 100644
--- a/Makefile-switchroot.am
+++ b/Makefile-switchroot.am
@@ -15,7 +15,9 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
+if !TRIGGERS_ONLY
sbin_PROGRAMS += ostree-switch-root
+endif
ostree_switch_root_SOURCES = src/switchroot/ostree-switch-root.c
diff --git a/Makefile.am b/Makefile.am
index d3d3a7e..beeb1d0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -71,7 +71,9 @@ endif
libgsystem_srcpath := src/libgsystem
libgsystem_cflags = $(OT_INTERNAL_GIO_UNIX_CFLAGS)
libgsystem_libs = $(OT_INTERNAL_GIO_UNIX_LIBS)
+if !TRIGGERS_ONLY
include src/libgsystem/Makefile-libgsystem.am
+endif
include Makefile-daemon.am
include Makefile-otutil.am
include Makefile-libostree.am
diff --git a/configure.ac b/configure.ac
index 9f0bca3..767caec 100644
--- a/configure.ac
+++ b/configure.ac
@@ -27,6 +27,11 @@ AC_SUBST(WARN_CFLAGS)
LT_PREREQ([2.2.4])
LT_INIT([disable-static])
+AC_ARG_ENABLE(triggers-only,
+ AS_HELP_STRING([--enable-triggers-only], [Only build and install triggers]),,
+ enable_triggers_only=no)
+AM_CONDITIONAL(TRIGGERS_ONLY, test x$enable_triggers_only != xno)
+
AC_CHECK_HEADER([attr/xattr.h],,[AC_MSG_ERROR([You must have attr/xattr.h from libattr])])
PKG_PROG_PKG_CONFIG
@@ -46,6 +51,9 @@ AS_IF([test x$enable_embedded_dependencies = xyes], [
AC_ARG_WITH(soup,
AS_HELP_STRING([--with-soup], [Use libsoup @<:@default=yes@:>@]),
[], [with_soup=check])
+ if test x$enable_triggers_only != xno; then
+ with_soup=no
+ fi
AS_IF([test x$with_soup != xno ], [
AC_MSG_CHECKING([for $SOUP_DEPENDENCY])
PKG_CHECK_EXISTS($SOUP_DEPENDENCY, have_soup=yes, have_soup=no)
@@ -59,7 +67,7 @@ AS_IF([test x$enable_embedded_dependencies = xyes], [
], [
with_soup=no
])
- ])
+ ], [ with_soup=no ])
])
AM_CONDITIONAL(USE_LIBSOUP, test x$with_soup != xno)
@@ -69,6 +77,9 @@ AC_ARG_ENABLE(documentation,
AC_HELP_STRING([--enable-documentation],
[build documentation]),,
enable_documentation=yes)
+if test x$enable_triggers_only != xno; then
+ enable_documentation=no
+fi
if test x$enable_documentation = xyes; then
AC_PATH_PROG([XSLTPROC], [xsltproc])
if test x$XSLTPROC = x; then
@@ -80,7 +91,7 @@ AM_CONDITIONAL(BUILD_DOCUMENTATION, test x$enable_documentation = xyes)
AC_ARG_WITH(libarchive,
AS_HELP_STRING([--without-libarchive], [Do not use libarchive]),
:, with_libarchive=maybe)
-AS_IF([ test x$with_libarchive != xno ], [
+AS_IF([ test x$with_libarchive != xno && test x$enable_triggers_only != xno ], [
AC_MSG_CHECKING([for $LIBARCHIVE_DEPENDENCY])
PKG_CHECK_EXISTS($LIBARCHIVE_DEPENDENCY, have_libarchive=yes, have_libarchive=no)
AC_MSG_RESULT([$have_libarchive])
@@ -94,10 +105,10 @@ AS_IF([ test x$with_libarchive != xno ], [
], [
with_libarchive=no
])
-])
+], [ with_libarchive=no ])
AM_CONDITIONAL(USE_LIBARCHIVE, test $with_libarchive != no)
-AS_IF([test x$cross_compiling != xyes && test -d /etc/kernel],
+AS_IF([test x$cross_compiling != xyes && test -d /etc/kernel && test x$enable_triggers_only != xno ],
[kernel_updates_default=yes],
[kernel_updates_default=no])
@@ -119,8 +130,10 @@ echo "
===============
+ triggers only: $enable_triggers_only
embedded dependencies: $enable_embedded_dependencies
libsoup (retrieve remote HTTP repositories): $with_soup
libarchive (parse tar files directly): $with_libarchive
+ documentation: $enable_documentation
kernel updates integration: $enable_kernel_updates
"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]