summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaetan Nadon <memsize@videotron.ca>2010-08-20 16:58:18 -0400
committerGaetan Nadon <memsize@videotron.ca>2010-08-20 19:21:54 -0400
commita3acab7ea9ea4013b5d11b7ce4f1540134f32f37 (patch)
treec5cdff61dacdaf91d70972f03ab30a8acd76146e
parent051b49b9ac4409f3af80e6b49b4dd675e4c217b2 (diff)
config: upgrade to util-macros 1.8 for additional man page support
Use MAN_SUBST now supplied in XORG_MANPAGE_SECTIONS The value of MAN_SUBST is the same for all X.Org packages. Use AC_PROG_SED now supplied by XORG_DEFAULT_OPTIONS Use the appropriate platform version of sed Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
-rw-r--r--Makefile.am40
-rw-r--r--configure.ac11
-rw-r--r--man/Makefile.am41
-rw-r--r--man/rgb.man (renamed from rgb.man)0
-rw-r--r--man/showrgb.man (renamed from showrgb.man)0
5 files changed, 49 insertions, 43 deletions
diff --git a/Makefile.am b/Makefile.am
index 9b38781..4b43bb3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -20,20 +20,16 @@
# DEALINGS IN THE SOFTWARE.
#
-
+SUBDIRS=man
bin_PROGRAMS = showrgb
showrgb_SOURCES = showrgb.c
-appman_PRE = showrgb.man
-
if RGB_DB
bin_PROGRAMS += rgb
rgb_SOURCES = rgb.c
-appman_PRE += rgb.man
-
$(RGB_DB_FILES): rgb rgb.txt
-rm -f $(RGB_DB_FILES)
./rgb rgb < $(srcdir)/rgb.txt
@@ -51,41 +47,7 @@ EXTRA_DIST= \
others/raveling.txt \
others/thomas.txt
-appmandir = $(APP_MAN_DIR)
-
-appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
-
-EXTRA_DIST += $(appman_PRE)
MAINTAINERCLEANFILES = ChangeLog INSTALL
-CLEANFILES = $(appman_DATA) $(RGB_DB_FILES)
-
-SED = sed
-
-# Strings to replace in man pages
-XORGRELSTRING = @PACKAGE_STRING@
- XORGMANNAME = X Version 11
-
-MAN_SUBSTS = \
- -e 's|__RGB_DB__|$(db_dir)/$(db_file)|' \
- -e 's|__RGB_DB_DIR__|$(db_dir)|' \
- -e 's|__RGB_DB_TYPE__|$(RGB_DB_TYPE)|' \
- -e 's|__RGB_DB_FILES__|$(RGB_DB_FILES)|' \
- -e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
- -e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
- -e 's|__xservername__|Xorg|g' \
- -e 's|__xconfigfile__|xorg.conf|g' \
- -e 's|__projectroot__|$(prefix)|g' \
- -e 's|__apploaddir__|$(appdefaultdir)|' \
- -e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
- -e 's|__libmansuffix__|$(LIB_MAN_SUFFIX)|g' \
- -e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
- -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
- -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
-
-SUFFIXES = .$(APP_MAN_SUFFIX) .man
-
-.man.$(APP_MAN_SUFFIX):
- $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
.PHONY: ChangeLog INSTALL
diff --git a/configure.ac b/configure.ac
index b7f678a..80ab270 100644
--- a/configure.ac
+++ b/configure.ac
@@ -27,10 +27,10 @@ AM_INIT_AUTOMAKE([foreign dist-bzip2])
AM_MAINTAINER_MODE
AM_CONFIG_HEADER(config.h)
-# Require xorg-macros: XORG_DEFAULT_OPTIONS
+# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
m4_ifndef([XORG_MACROS_VERSION],
- [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])])
-XORG_MACROS_VERSION(1.3)
+ [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.8)
XORG_DEFAULT_OPTIONS
AC_PROG_CC
@@ -96,4 +96,7 @@ AC_SUBST([RGB_DB_FILES])
AM_CONDITIONAL(RGB_DB, [test x$db_type != xtext])
AC_SUBST(RGB_CFLAGS)
-AC_OUTPUT([Makefile])
+AC_CONFIG_FILES([Makefile
+ man/Makefile])
+
+AC_OUTPUT
diff --git a/man/Makefile.am b/man/Makefile.am
new file mode 100644
index 0000000..90037a7
--- /dev/null
+++ b/man/Makefile.am
@@ -0,0 +1,41 @@
+#
+# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice (including the next
+# paragraph) shall be included in all copies or substantial portions of the
+# Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+# DEALINGS IN THE SOFTWARE.
+#
+
+appmandir = $(APP_MAN_DIR)
+appman_PRE = rgb.man showrgb.man
+appman_DATA = showrgb.$(APP_MAN_SUFFIX)
+if RGB_DB
+appman_DATA += rgb.$(APP_MAN_SUFFIX)
+endif
+
+EXTRA_DIST = $(appman_PRE)
+CLEANFILES = $(appman_DATA)
+SUFFIXES = .$(APP_MAN_SUFFIX) .man
+MAN_SUBSTS += -e 's|__RGB_DB__|$(db_dir)/$(db_file)|g' \
+ -e 's|__RGB_DB_DIR__|$(db_dir)|g' \
+ -e 's|__RGB_DB_TYPE__|$(RGB_DB_TYPE)|g' \
+ -e 's|__RGB_DB_FILES__|$(RGB_DB_FILES)|g'
+
+# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
+.man.$(APP_MAN_SUFFIX):
+ $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
diff --git a/rgb.man b/man/rgb.man
index 6ca54ae..6ca54ae 100644
--- a/rgb.man
+++ b/man/rgb.man
diff --git a/showrgb.man b/man/showrgb.man
index 8e54a46..8e54a46 100644
--- a/showrgb.man
+++ b/man/showrgb.man