summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.in30
-rw-r--r--man/local.mk54
2 files changed, 77 insertions, 7 deletions
diff --git a/Makefile.in b/Makefile.in
index 67daea9..2612155 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -19,6 +19,7 @@
package_name = @package_name@
package_version = @package_version@
+package_description = @package_description@
srcdir = @srcdir@
prefix = @prefix@
@@ -28,6 +29,8 @@ pkglibdir = @pkglibdir@
libopkbuild = @libopkbuild@
datadir = @datadir@
mandir = @mandir@
+man1dir = @man1dir@
+man3dir = @man3dir@
sysconfdir = @sysconfdir@
metadata = @metadata@
opkhelper_3_0 = @opkhelper_3_0@
@@ -55,12 +58,15 @@ include $(srcdir)/src/local.mk
include $(srcdir)/lib/local.mk
include $(srcdir)/lib/package/local.mk
include $(srcdir)/lib/metadata/local.mk
+include $(srcdir)/man/local.mk
include $(srcdir)/locale/local.mk
bin = $(bin_srcs:.sh=)
pkglib = $(pkglib_srcs:.sh=.sm)
pkglibpackage = $(pkglibpackage_srcs:.sh=.sm)
pkglibmetadata = $(pkglibmetadata_srcs:.sh=.sm)
+man1 = $(man1_srcs:.1in=.1)
+man3 = $(man3_srcs:.3in=.3)
locale = $(locale_srcs:.sh=.ms)
distdir = $(package_name)-$(package_version)
@@ -77,16 +83,20 @@ distfiles = \
lib/local.mk \
lib/package/local.mk \
lib/metadata/local.mk \
+ man/local.mk \
locale/local.mk \
$(bin_srcs) \
$(pkglib_srcs) \
$(pkglibpackage_srcs) \
$(pkglibmetadata_srcs) \
+ $(man1_srcs) \
+ $(man3_srcs) \
$(locale_srcs)
script = \
s&@@PACKAGE_NAME@@&$(package_name)&;\
s&@@PACKAGE_VERSION@@&$(package_version)&;\
+ s&@@PACKAGE_DESCRIPTION@@&$(package_description)&;\
s&@@BINDIR@@&$(bindir)&;\
s&@@PKGLIBDIR@@&$(pkglibdir)&;\
s&@@LIBOPKBUILD@@&$(libopkbuild)&;\
@@ -98,13 +108,20 @@ script = \
s&@@OPKHELPER_3_0@@&$(opkhelper_3_0)&;
.SUFFIXES:
-.SUFFIXES: .sh .sm .ms
-
+.SUFFIXES: .sh .sm .1in .1 .3in .3 .ms
+
+# XXX: Support for lists of multiple targets in inference rules doesn't appear
+# to be required by POSIX.1-2008 [1], but it exists in GNU Make and NetBSD
+# pmake. Expand this into separate rules if it is a problem with certain make
+# implementations.
+# [1]: Compare the inference and target rule definitions after fragments
+# <#tag_20_76_13_06> and <#tag_20_76_13_04> in
+# <http://pubs.opengroup.org/onlinepubs/9699919799/utilities/make.html>.
.sh:
@printf ' SED %s\n' '$@'
@sed '$(script)' '$(srcdir)/$?' >'$@'
@chmod 755 '$@'
-.sh.sm:
+.sh.sm .1in.1 .3in.3:
@printf ' SED %s\n' '$@'
@sed '$(script)' '$(srcdir)/$?' >'$@'
@chmod 644 '$@'
@@ -120,10 +137,9 @@ all-bin: $(bin)
all-pkglib: $(pkglib)
all-pkglibpackage: $(pkglibpackage)
all-pkglibmetadata: $(pkglibmetadata)
-all-data: all-man all-locale
-all-man:
- @printf 'Making manual pages...\n'
- @cd man && $(MAKE) $(MACROS) all
+all-data: all-man1 all-man3 all-locale
+all-man1: $(man1)
+all-man3: $(man3)
all-locale: $(locale)
clean:
diff --git a/man/local.mk b/man/local.mk
new file mode 100644
index 0000000..0a397bd
--- /dev/null
+++ b/man/local.mk
@@ -0,0 +1,54 @@
+# opkbuild
+# man/local.mk
+#
+# Copyright (C) 2012-2013 Patrick "P. J." McDermott
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+#man1_srcs = \
+# opkbuild.1in \
+# ob-checkbuilddeps.1in \
+# ob-buildenv.1in \
+# ob-unpacksource.1in \
+# ob-applypatches.1in \
+# ob-installplatconf.1in \
+# ob-installdocs.1in \
+# ob-gencontrol.1in \
+# ob-buildopk.1in \
+# ob-genchanges.1in
+#man3_srcs = \
+# ob_get_text_domain.3in \
+# ob_set_text_domain.3in \
+# ob_get_msg.3in \
+# ob_error.3in \
+# ob_warn.3in \
+# ob_info.3in \
+# ob_init_package.3in \
+# ob_parse_package_metadata.3in \
+# ob_get_binary_packages.3in \
+# ob_get_source_parameter.3in \
+# ob_get_binary_parameter.3in \
+# ob_summarize_package_arch.3in \
+# ob_summarize_package_plat.3in \
+# ob_parse_control.3in \
+# ob_parse_changelog.3in \
+# ob_validate_source_package_name.3in \
+# ob_validate_binary_package_name.3in \
+# ob_parse_version.3in \
+# ob_reduce_build_deps.3in \
+# ob_reduce_runinst_deps.3in \
+# ob_get_system_arch.3in \
+# ob_match_arch.3in \
+# ob_get_system_plat.3in \
+# ob_match_plat.3in