Here is an updated patch, using "conditional"s as suggested by
Makefile-man.am and regenerating Makefile-man.am by running "make
update-man-list"

This also removed the HAVE_PYTHON section from Makefile-man.am. Why it
did that is unclear to me.
Maybe Zbigniew can chime in here.


2014-12-19 15:24 GMT+01:00 Umut Tezduyar Lindskog <[email protected]>:
> :) See my second patch's comment Michael.
>
> On Fri, Dec 19, 2014 at 3:17 PM, Michael Biebl <[email protected]> wrote:
>> That said, Makefile-man.am contains a comment, that this file
>> shouldn't be edited directly but rather be updated via "make
>> update-man-list"
>>
>> 2014-12-19 15:12 GMT+01:00 Michael Biebl <[email protected]>:
>>> +if ENABLE_HWDB
>>> +MANPAGES += \
>>> +        man/hwdb.7
>>> +        man/systemd-hwdb.xml
>>>
>>> Shouldn't this rather be systemd-hwdb.8 ?
>>>
>>> I also don't see a reason to remove man/systemd-hwdb.xml from EXTRA_DIST.
>>> You want to include that file in the dist tarball always.
>>>
>>> 2014-12-19 13:25 GMT+01:00 Tom Gundersen <[email protected]>:
>>>> Hm, this broke the manpage building:
>>>>
>>>> $ ./autogen.sh c && make man/systemd-hwdb.8
>>>> [...]
>>>> make: *** No rule to make target 'man/systemd-hwdb.xml', needed by
>>>> 'man/systemd-hwdb.8'.  Stop.
>>>>
>>>> Care to take a look?
>>>>
>>>> Cheers,
>>>>
>>>> Tom
>>>>
>>>> On Fri, Dec 19, 2014 at 11:47 AM, Umut Tezduyar Lindskog
>>>> <[email protected]> wrote:
>>>>> ---
>>>>>  Makefile-man.am | 9 ++++++---
>>>>>  Makefile.am     | 2 ++
>>>>>  configure.ac    | 6 ++++++
>>>>>  3 files changed, 14 insertions(+), 3 deletions(-)
>>>>>
>>>>> diff --git a/Makefile-man.am b/Makefile-man.am
>>>>> index 45b8238..c6506aa 100644
>>>>> --- a/Makefile-man.am
>>>>> +++ b/Makefile-man.am
>>>>> @@ -14,7 +14,6 @@ MANPAGES += \
>>>>>         man/file-hierarchy.7 \
>>>>>         man/halt.8 \
>>>>>         man/hostname.5 \
>>>>> -       man/hwdb.7 \
>>>>>         man/journalctl.1 \
>>>>>         man/journald.conf.5 \
>>>>>         man/kernel-command-line.7 \
>>>>> @@ -73,7 +72,6 @@ MANPAGES += \
>>>>>         man/systemd-halt.service.8 \
>>>>>         man/systemd-hibernate-resume-generator.8 \
>>>>>         man/[email protected] \
>>>>> -       man/systemd-hwdb.8 \
>>>>>         man/systemd-inhibit.1 \
>>>>>         man/systemd-initctl.service.8 \
>>>>>         man/systemd-journald.service.8 \
>>>>> @@ -676,6 +674,12 @@ man/systemd-user.conf.html: 
>>>>> man/systemd-system.conf.html
>>>>>  man/user.conf.d.html: man/systemd-system.conf.html
>>>>>         $(html-alias)
>>>>>
>>>>> +if ENABLE_HWDB
>>>>> +MANPAGES += \
>>>>> +        man/hwdb.7 \
>>>>> +        man/systemd-hwdb.xml
>>>>> +
>>>>> +endif
>>>>>
>>>>>  if ENABLE_BACKLIGHT
>>>>>  MANPAGES += \
>>>>> @@ -1705,7 +1709,6 @@ EXTRA_DIST += \
>>>>>         man/systemd-hibernate-resume-generator.xml \
>>>>>         man/[email protected] \
>>>>>         man/systemd-hostnamed.service.xml \
>>>>> -       man/systemd-hwdb.xml \
>>>>>         man/systemd-inhibit.xml \
>>>>>         man/systemd-initctl.service.xml \
>>>>>         man/systemd-journal-gatewayd.service.xml \
>>>>> diff --git a/Makefile.am b/Makefile.am
>>>>> index a7a2b6d..8489a6b 100644
>>>>> --- a/Makefile.am
>>>>> +++ b/Makefile.am
>>>>> @@ -3607,6 +3607,7 @@ udevadm_LDADD = \
>>>>>         libudev-core.la
>>>>>
>>>>>  # 
>>>>> ------------------------------------------------------------------------------
>>>>> +if ENABLE_HWDB
>>>>>  INSTALL_DIRS += \
>>>>>         $(sysconfdir)/udev/hwdb.d
>>>>>
>>>>> @@ -3655,6 +3656,7 @@ INSTALL_DATA_HOOKS += \
>>>>>
>>>>>  hwdb-remove-hook:
>>>>>         -test -n "$(DESTDIR)" || rm -f /etc/udev/hwdb.bin
>>>>> +endif
>>>>>
>>>>>  # 
>>>>> ------------------------------------------------------------------------------
>>>>>  TESTS += \
>>>>> diff --git a/configure.ac b/configure.ac
>>>>> index 90aa3cc..9296c25 100644
>>>>> --- a/configure.ac
>>>>> +++ b/configure.ac
>>>>> @@ -1191,6 +1191,11 @@ AM_CONDITIONAL([ENABLE_GUDEV], [test 
>>>>> "x$enable_gudev" = "xyes"])
>>>>>  AS_IF([test "x$enable_gudev" = "xyes"], [ AC_DEFINE(HAVE_GLIB, 1, 
>>>>> [Define if glib is available]) ])
>>>>>
>>>>>  # 
>>>>> ------------------------------------------------------------------------------
>>>>> +AC_ARG_ENABLE(hwdb, [AC_HELP_STRING([--disable-hwdb], [disable hardware 
>>>>> database support])],
>>>>> +       enable_hwdb=$enableval, enable_hwdb=yes)
>>>>> +AM_CONDITIONAL(ENABLE_HWDB, [test x$enable_hwdb = xyes])
>>>>> +
>>>>> +# 
>>>>> ------------------------------------------------------------------------------
>>>>>  have_manpages=no
>>>>>  AC_ARG_ENABLE(manpages, AS_HELP_STRING([--disable-manpages], [disable 
>>>>> manpages]))
>>>>>  AS_IF([test "x$enable_manpages" != xno], [have_manpages=yes])
>>>>> @@ -1430,6 +1435,7 @@ AC_MSG_RESULT([
>>>>>          dbus:                    ${have_dbus}
>>>>>          nss-myhostname:          ${have_myhostname}
>>>>>          gudev:                   ${enable_gudev}
>>>>> +        hwdb:                    ${enable_hwdb}
>>>>>          gintrospection:          ${enable_introspection}
>>>>>          terminal:                ${have_terminal}
>>>>>          kdbus:                   ${have_kdbus}
>>>>> --
>>>>> 2.1.1
>>>>>
>>>>> _______________________________________________
>>>>> systemd-devel mailing list
>>>>> [email protected]
>>>>> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
>>>> _______________________________________________
>>>> systemd-devel mailing list
>>>> [email protected]
>>>> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
>>>
>>>
>>>
>>> --
>>> Why is it that all of the instruments seeking intelligent life in the
>>> universe are pointed away from Earth?
>>
>>
>>
>> --
>> Why is it that all of the instruments seeking intelligent life in the
>> universe are pointed away from Earth?
>> _______________________________________________
>> systemd-devel mailing list
>> [email protected]
>> http://lists.freedesktop.org/mailman/listinfo/systemd-devel



-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
From 6444a7306a7ea1dbec3b0e6a7d2d790da2ae52f9 Mon Sep 17 00:00:00 2001
From: Umut Tezduyar Lindskog <[email protected]>
Date: Fri, 19 Dec 2014 11:47:30 +0100
Subject: [PATCH] build: add option to disable hwdb

---
 Makefile-man.am      | 24 ++++++++++--------------
 Makefile.am          |  2 ++
 configure.ac         |  6 ++++++
 man/hwdb.xml         |  2 +-
 man/systemd-hwdb.xml |  2 +-
 5 files changed, 20 insertions(+), 16 deletions(-)

diff --git a/Makefile-man.am b/Makefile-man.am
index 45b8238..8a79ecc 100644
--- a/Makefile-man.am
+++ b/Makefile-man.am
@@ -14,7 +14,6 @@ MANPAGES += \
 	man/file-hierarchy.7 \
 	man/halt.8 \
 	man/hostname.5 \
-	man/hwdb.7 \
 	man/journalctl.1 \
 	man/journald.conf.5 \
 	man/kernel-command-line.7 \
@@ -73,7 +72,6 @@ MANPAGES += \
 	man/systemd-halt.service.8 \
 	man/systemd-hibernate-resume-generator.8 \
 	man/[email protected] \
-	man/systemd-hwdb.8 \
 	man/systemd-inhibit.1 \
 	man/systemd-initctl.service.8 \
 	man/systemd-journald.service.8 \
@@ -746,6 +744,16 @@ man/systemd-hostnamed.html: man/systemd-hostnamed.service.html
 
 endif
 
+if ENABLE_HWDB
+MANPAGES += \
+	man/hwdb.7 \
+	man/systemd-hwdb.8
+MANPAGES_ALIAS += \
+	#
+
+
+endif
+
 if ENABLE_KDBUS
 MANPAGES += \
 	man/sd_bus_creds_get_pid.3 \
@@ -1543,16 +1551,6 @@ man/systemd-user-sessions.html: man/systemd-user-sessions.service.html
 
 endif
 
-if HAVE_PYTHON
-MANPAGES += \
-	man/systemd.directives.7 \
-	man/systemd.index.7
-MANPAGES_ALIAS += \
-	#
-
-
-endif
-
 if HAVE_SYSV_COMPAT
 MANPAGES += \
 	man/systemd-sysv-generator.8
@@ -1750,9 +1748,7 @@ EXTRA_DIST += \
 	man/systemd-vconsole-setup.service.xml \
 	man/systemd.automount.xml \
 	man/systemd.device.xml \
-	man/systemd.directives.xml \
 	man/systemd.exec.xml \
-	man/systemd.index.xml \
 	man/systemd.journal-fields.xml \
 	man/systemd.kill.xml \
 	man/systemd.link.xml \
diff --git a/Makefile.am b/Makefile.am
index a7a2b6d..8489a6b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3607,6 +3607,7 @@ udevadm_LDADD = \
 	libudev-core.la
 
 # ------------------------------------------------------------------------------
+if ENABLE_HWDB
 INSTALL_DIRS += \
 	$(sysconfdir)/udev/hwdb.d
 
@@ -3655,6 +3656,7 @@ INSTALL_DATA_HOOKS += \
 
 hwdb-remove-hook:
 	-test -n "$(DESTDIR)" || rm -f /etc/udev/hwdb.bin
+endif
 
 # ------------------------------------------------------------------------------
 TESTS += \
diff --git a/configure.ac b/configure.ac
index 90aa3cc..9296c25 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1191,6 +1191,11 @@ AM_CONDITIONAL([ENABLE_GUDEV], [test "x$enable_gudev" = "xyes"])
 AS_IF([test "x$enable_gudev" = "xyes"], [ AC_DEFINE(HAVE_GLIB, 1, [Define if glib is available]) ])
 
 # ------------------------------------------------------------------------------
+AC_ARG_ENABLE(hwdb, [AC_HELP_STRING([--disable-hwdb], [disable hardware database support])],
+       enable_hwdb=$enableval, enable_hwdb=yes)
+AM_CONDITIONAL(ENABLE_HWDB, [test x$enable_hwdb = xyes])
+
+# ------------------------------------------------------------------------------
 have_manpages=no
 AC_ARG_ENABLE(manpages, AS_HELP_STRING([--disable-manpages], [disable manpages]))
 AS_IF([test "x$enable_manpages" != xno], [have_manpages=yes])
@@ -1430,6 +1435,7 @@ AC_MSG_RESULT([
         dbus:                    ${have_dbus}
         nss-myhostname:          ${have_myhostname}
         gudev:                   ${enable_gudev}
+        hwdb:                    ${enable_hwdb}
         gintrospection:          ${enable_introspection}
         terminal:                ${have_terminal}
         kdbus:                   ${have_kdbus}
diff --git a/man/hwdb.xml b/man/hwdb.xml
index 9f2aff3..9828a65 100644
--- a/man/hwdb.xml
+++ b/man/hwdb.xml
@@ -3,7 +3,7 @@
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd";>
 
-<refentry id="hwdb">
+<refentry id="hwdb" conditional="ENABLE_HWDB">
   <refentryinfo>
     <title>hwdb</title>
     <productname>systemd</productname>
diff --git a/man/systemd-hwdb.xml b/man/systemd-hwdb.xml
index 09f4d55..361a23d 100644
--- a/man/systemd-hwdb.xml
+++ b/man/systemd-hwdb.xml
@@ -3,7 +3,7 @@
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd";>
 
-<refentry id="systemd-hwdb">
+<refentry id="systemd-hwdb" conditional="ENABLE_HWDB">
   <refentryinfo>
     <title>systemd-hwdb</title>
     <productname>systemd</productname>
-- 
2.1.3

_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to