|
2 | 2 | #
|
3 | 3 | # PostgreSQL documentation makefile
|
4 | 4 | #
|
5 |
| -# $PostgreSQL: pgsql/doc/src/sgml/Makefile,v 1.116 2009/06/19 19:14:25 petere Exp $ |
| 5 | +# $PostgreSQL: pgsql/doc/src/sgml/Makefile,v 1.117 2009/06/25 21:15:38 petere Exp $ |
6 | 6 | #
|
7 | 7 | #----------------------------------------------------------------------------
|
8 | 8 |
|
@@ -72,17 +72,20 @@ override SPFLAGS += -wall -wno-unused-param -wno-empty -wfully-tagged
|
72 | 72 | DEFAULTSECTION = l
|
73 | 73 |
|
74 | 74 | fix_man_xrefs =$(PERL) -npi -e 's{\[XRef to GUC-([A-Z0-9-]*)\]}{($$l = $$1) =~ tr/A-Z-/a-z_/, $$l}ge || s{\[XRef to [A-Z0-9-]*\]}{in the documentation}g'
|
| 75 | +lowercase = tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' |
75 | 76 |
|
76 | 77 | man: postgres.sgml$(ALLSGML)
|
77 |
| -$(NSGMLS)$(NSGMLS_FLAGS)$(SGMLINCLUDE)$<|$(SGMLSPL)$(D2MSCRIPT) --section$(DEFAULTSECTION) --date"`date'+%Y-%m-%d'`" |
| 78 | +$(NSGMLS)$(NSGMLS_FLAGS)$(SGMLINCLUDE)$<|$(SGMLSPL)$(D2MSCRIPT) --lowercase --section$(DEFAULTSECTION) --date"`date'+%Y-%m-%d'`" |
78 | 79 | # One more time, to resolve cross-references
|
79 |
| -$(NSGMLS) $(NSGMLS_FLAGS) $(SGMLINCLUDE) $< | $(SGMLSPL) $(D2MSCRIPT) --section $(DEFAULTSECTION) --date "`date '+%Y-%m-%d'`" |
| 80 | +$(NSGMLS) $(NSGMLS_FLAGS) $(SGMLINCLUDE) $< | $(SGMLSPL) $(D2MSCRIPT) --lowercase --section $(DEFAULTSECTION) --date "`date '+%Y-%m-%d'`" |
80 | 81 | $(fix_man_xrefs) *.1 *.7
|
81 | 82 | $(mkinstalldirs) man1 man7
|
82 | 83 | $(D2MLINKS) < manpage.links
|
83 | 84 | mv *.1 man1/
|
84 | 85 | mv *.7 man7/
|
85 | 86 | rm *.$(DEFAULTSECTION)
|
| 87 | +# manpage.links doesn't handle lowercase, needs fixups |
| 88 | +cd man7 && for file in `awk '{ print $$2 }' ../manpage.links`; do $(lowercase) <$$file >`echo $$file | $(lowercase)` && rm $$file || exit; done |
86 | 89 |
|
87 | 90 |
|
88 | 91 | ##
|
|