summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Scott <nathans@sgi.com>2002-04-01 08:28:34 +0000
committerNathan Scott <nathans@sgi.com>2002-04-01 08:28:34 +0000
commit8585d3fbb61731bfb4aa7cc72bb4c1a4be25802d (patch)
tree51711dfd9f034730ea6d4b65275df1367be32744
parent5bf7c3b7fc817a461c1892cf7a9c437e7526ba54 (diff)
downloadattr-8585d3fbb61731bfb4aa7cc72bb4c1a4be25802d.tar.gz
fix INSTALL_MAN macro so that mandoc style man pages are grokked also.
-rw-r--r--include/builddefs.in64
1 files changed, 34 insertions, 30 deletions
diff --git a/include/builddefs.in b/include/builddefs.in
index 871717e..b1aea59 100644
--- a/include/builddefs.in
+++ b/include/builddefs.in
@@ -64,6 +64,7 @@ LN_S = @LN_S@
ZIP = @zip@
TAR = @tar@
RPM = @rpm@
+MSGFMT = @msgfmt@
RPM_VERSION = @rpm_version@
HAVE_ZIPPED_MANPAGES = @have_zipped_manpages@
@@ -162,42 +163,45 @@ INSTALL_LTLIB_STATIC = \
../$(INSTALL) -m 644 -T old_lib $(LIBNAME).lai $(PKG_LIB_DIR)
INSTALL_MAN = \
- @for d in $(MAN_PAGES); do \
- first=true; \
- for m in `$(AWK) '/^\.SH NAME/ {ok=1; next} ok {print; exit}' $$d \
- | sed -e 's/,/ /g' -e 's/\\-.*//' -e 's/\\\f[0-9]//g' -e 's/ / /g;q'`; \
- do \
- [ -z "$$m" -o "$$m" = "\\" ] && continue; \
- t=$(MAN_DEST)/$$m.$(MAN_SECTION); \
- if $$first; then \
- if $(HAVE_ZIPPED_MANPAGES); then \
- $(ZIP) --best -c $$d > $$d.gz; _sfx=.gz; \
- fi; \
- u=$$m.$(MAN_SECTION)$$_sfx; \
- echo $(INSTALL) -m 644 $${d}$$_sfx $${t}$$_sfx; \
- $(INSTALL) -m 644 $${d}$$_sfx $${t}$$_sfx; \
- else \
- echo $(INSTALL) -S $$u $${t}$$_sfx; \
- $(INSTALL) -S $$u $${t}$$_sfx; \
- fi; \
- first=false; \
- done; \
- done
+ @for d in $(MAN_PAGES); do \
+ first=true; \
+ for m in `$(AWK) \
+ '/^\.S[h|H] NAME/ {ok=1; next} ok {print; exit}' $$d \
+ | $(SED) \
+ -e 's/^\.Nm //' -e 's/,/ /g' -e 's/\\-.*//' \
+ -e 's/\\\f[0-9]//g' -e 's/ / /g;q'`; \
+ do \
+ [ -z "$$m" -o "$$m" = "\\" ] && continue; \
+ t=$(MAN_DEST)/$$m.$(MAN_SECTION); \
+ if $$first; then \
+ if $(HAVE_ZIPPED_MANPAGES); then \
+ $(ZIP) -9 -c $$d > $$d.gz; _sfx=.gz; \
+ fi; \
+ u=$$m.$(MAN_SECTION)$$_sfx; \
+ echo $(INSTALL) -m 644 $${d}$$_sfx $${t}$$_sfx;\
+ $(INSTALL) -m 644 $${d}$$_sfx $${t}$$_sfx; \
+ else \
+ echo $(INSTALL) -S $$u $${t}$$_sfx; \
+ $(INSTALL) -S $$u $${t}$$_sfx; \
+ fi; \
+ first=false; \
+ done; \
+ done
SUBDIRS_MAKERULE = \
@for d in $(SUBDIRS) ""; do \
- if test -d "$$d" -a ! -z "$$d"; then \
- $(ECHO) === $$d ===; \
- $(MAKEF) -C $$d $@ || exit $$?; \
- fi; \
+ if test -d "$$d" -a ! -z "$$d"; then \
+ $(ECHO) === $$d ===; \
+ $(MAKEF) -C $$d $@ || exit $$?; \
+ fi; \
done
MAN_MAKERULE = \
- @for f in *.[12345678] ""; do \
- if test ! -z "$$f"; then \
- $(ZIP) --best -c < $$f > $$f.gz; \
- fi; \
- done
+ @for f in *.[12345678] ""; do \
+ if test ! -z "$$f"; then \
+ $(ZIP) --best -c < $$f > $$f.gz; \
+ fi; \
+ done
DIST_MAKERULE = \
$(MAKEF) -C build dist