The MinGW.org Windows System Libraries
Revisão | 1612b9f8989f8927c10f3b9e33b8fec5f553f4f7 (tree) |
---|---|
Hora | 2020-04-08 19:02:23 |
Autor | Keith Marshall <keith@user...> |
Commiter | Keith Marshall |
Automatically enumerate manpages for publication.
@@ -1,3 +1,12 @@ | ||
1 | +2020-04-08 Keith Marshall <keith@users.osdn.me> | |
2 | + | |
3 | + Automatically enumerate manpages for publication. | |
4 | + | |
5 | + * Makefile.in (manpages): New macro; define, and use it... | |
6 | + (mingwrt-man3): ...for this, to enumerate associated manpage sources. | |
7 | + (manpage_copy, mancopy, manpage_ref): New macros; define them, and... | |
8 | + (basename.3, getdelim.3): ...use them. | |
9 | + | |
1 | 10 | 2020-04-07 Keith Marshall <keith@users.osdn.me> |
2 | 11 | |
3 | 12 | Document MinGW MBCS/wide character conversion functions. |
@@ -839,9 +839,13 @@ install-%-optional-dll: %.dll.a bindir libdir | ||
839 | 839 | # Install manpages. |
840 | 840 | # |
841 | 841 | vpath %.man ${mingwrt_srcdir}/man |
842 | +manpages = $(basename $(notdir $(wildcard $1/man/*.$2.man))) | |
843 | +mancopy = $(call manpage_ref,$1,$2.man)$(eval $1: %: %.$0-recursive) | |
844 | +manpage_ref = $(eval $1: export reference_manpage = $2) | |
845 | + | |
842 | 846 | install-man install-manpages: install-mingwrt-manpages |
843 | -mingwrt-man$(man3ext): $(addsuffix .$(man3ext),basename dirname getline getdelim) | |
844 | -install-mingwrt-manpages: mandir mingwrt-man3 | |
847 | +mingwrt-man$(man3ext): $(call manpages,${mingwrt_srcdir},$(man3ext)) | |
848 | +install-mingwrt-manpages: mandir mingwrt-man$(man3ext) | |
845 | 849 | |
846 | 850 | mingwrt-man%: |
847 | 851 | $(call mkinstalldirs,,${man$*dir}) |
@@ -854,11 +858,9 @@ mingwrt-man%: | ||
854 | 858 | format_manpage = sed \ |
855 | 859 | -e "s/%PAGEREF%/`echo $1 | tr a-z A-Z` $(2:.%=%) `date -r $3 +%d-%b-%Y`/" |
856 | 860 | |
857 | -basename.$(man3ext): export reference_manpage = dirname.$(man3ext).man | |
858 | -basename.$(man3ext): %: %.mancopy-recursive | |
859 | - | |
860 | -getdelim.$(man3ext): export reference_manpage = getline.$(man3ext).man | |
861 | -getdelim.$(man3ext): %: %.mancopy-recursive | |
861 | +manpage_copy = $(eval $1$3: $2.$3)$(call mancopy,$2.$3,$4) | |
862 | +$(call manpage_copy,mingwrt-man,basename,$(man3ext),dirname.$(man3ext)) | |
863 | +$(call manpage_copy,mingwrt-man,getdelim,$(man3ext),getline.$(man3ext)) | |
862 | 864 | |
863 | 865 | %.mancopy-recursive: |
864 | 866 | $(MAKE) --no-print-directory $*.mancopy |