Makefile revision 13409
6fe48fb46e53ffc37542853a1edb74cb481b7d94Automatic Updater# Makefile for generateing man page tarballs that are used in each of the
c7ef13f6c9ef4436bc804b150e0a93307b11fa27Tinderbox User# SUNW*.spec files
1167fc7904c5f0a472f8df207ac46dd52c7f1ec8Automatic Updater# Generates : $(PACKAGE)-manpages-$(MANPAGE_VERSION).tar.gz
0c39b3ed9409ecb277d5e32fa763a4e4d6598df8Automatic Updater# e.g. sun-manpage-tarballs/*.tar.gz
fe84edc17e0d582cf7b4270f8df9d4742a107b1cAutomatic Updater# "make" : Rebuilds all man page tarballs
3349f0044fda807e1fd6681c833d3593a22dad86Tinderbox User# "make check-used" : Outputs list of man pages not being used.
b253dcf9668f95e141bce9556dc88e30d3305a1dTinderbox User# "make check-version" : Prints current man page tarball version
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User# "make $(PACKAGE)-manpages-$(MANPAGE_VERSION).tar.gz
e20309353e6246485c521278131d3fced73d7957Tinderbox User# e.g. "make SUNWgnome-panel-manpages-0.1.tar.gz"
e20309353e6246485c521278131d3fced73d7957Tinderbox User# will only generate SUNWgnome-panel's man page tarball
6c910bd5e4a85a56e3a61fdf7b237a45bb2553eeTinderbox User# For each package that contains man pages.
3cc98b8ecedcbc8465f1cf2740b966b315662430Automatic Updater# - Ensure all relevant man pages for your package are located under the
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# correct man page section dir i.e.
e20309353e6246485c521278131d3fced73d7957Tinderbox User# - Add Package name to PACKAGES Variable
e20309353e6246485c521278131d3fced73d7957Tinderbox User# e.g. PACKAGES = \
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# SUNWgnome-panel \
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater# SUNWyour-package
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater# - Add two package specific variables
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson# PACKAGE_PAGES - Full path of all manpages for this package
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater# e.g. SUNWgnome-panel_PAGES = man1/gnome-panel.1 etc...
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater# PACKAGE.PAGES - Assigned to $(PACKAGE_PAGES).
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson# e.g. SUNWgnome-panel.PAGES: $(SUNWgnome-panel_PAGES)
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User# To Add new man pages to existing packages
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan Hunt# -----------------------------------------
e130ab53e992670e2a2ecf043976ac09f21358d1Automatic Updater# Put very simply, all that is required from engineers is to make some changes
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater# and commit in SVN.
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater# - Ensure the man page exists in SVN under the relevant man page section sub
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater# - Add man page to the SUNW<package>_PAGES Makefile variable
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan Hunt# e.g. For a new gnome-panel man page it would be added to
e130ab53e992670e2a2ecf043976ac09f21358d1Automatic Updater# SUNWgnome-panel_PAGES
2d2dc37599979c83495510f8af8d1756753aa2c5Automatic Updater# - Remake tarballs
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User# This will re-generate all man page tarballs.
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater# - Copy newly generated tarball from sun-manpage-tarballs to package build
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater# sources e.g. /jds/packages/SOURCES, and ensure package builds and manpages
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater# install correctly.
cdfc81e048bd34c1d628380247bda6b80a89e20eAutomatic Updater# - New man page tarball will be generated by RE for each nightly, and for each
cdfc81e048bd34c1d628380247bda6b80a89e20eAutomatic Updater# milestone build.
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater# - Commit change back to subverison, e.g. new/amended man pagees,
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater# Solaris/manpages/Makefile, Solaris/S*.spec files if affected.
eabc9c3c07cd956d3c436bd7614cb162dabdda76Mark Andrews# MANPAGE_VERSION is maintained by RE and only gets bumped when spec-files gets
eabc9c3c07cd956d3c436bd7614cb162dabdda76Mark Andrews# branched. PLEASE do not change this.
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox UserSUNWdbus-bindings.PAGES: $(SUNWdbus-bindings_PAGES)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterSUNWevolution-exchange.PAGES: $(SUNWevolution-exchange_PAGES)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterSUNWevolution.PAGES: $(SUNWevolution_PAGES)
b886b04d8d2b085cbf3e1bf4442dee87f43ba5e4Tinderbox UserSUNWevolution-data-server.PAGES: $(SUNWevolution-data-server_PAGES)
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox UserSUNWgnome-a11y-dasher.PAGES: $(SUNWgnome-a11y-dasher_PAGES)
bc0a4c01beede169df81a3ee5b614ed9e82339dbAutomatic UpdaterSUNWgnome-a11y-gok.PAGES: $(SUNWgnome-a11y-gok_PAGES)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonSUNWgnome-a11y-libs.PAGES: $(SUNWgnome-a11y-libs_PAGES)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonSUNWgnome-a11y-reader.PAGES: $(SUNWgnome-a11y-reader_PAGES)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonSUNWgnome-a11y-poke.PAGES: $(SUNWgnome-a11y-poke_PAGES)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonSUNWgnome-archive-mgr.PAGES: $(SUNWgnome-archive-mgr_PAGES)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonSUNWgnome-audio.PAGES: $(SUNWgnome-audio_PAGES)
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian WellingtonSUNWgnome-base-libs.PAGES: $(SUNWgnome-base-libs_PAGES)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonSUNWgnome-base-libs-java.PAGES: $(SUNWgnome-base-libs-java_PAGES)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonSUNWgnome-calculator.PAGES: $(SUNWgnome-calculator_PAGES)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonSUNWgnome-cd-burner.PAGES: $(SUNWgnome-cd-burner_PAGES)
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox UserSUNWgnome-character-map.PAGES: $(SUNWgnome-character-map_PAGES)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterSUNWgnome-common-devel.PAGES: $(SUNWgnome-common-devel_PAGES)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonSUNWgnome-component.PAGES: $(SUNWgnome-component_PAGES)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonSUNWgnome-config-editor.PAGES: $(SUNWgnome-config-editor_PAGES)
7adcb4de92bf4383a4c5624c4ed256736d02bc6dMark AndrewsSUNWgnome-config.PAGES: $(SUNWgnome-config_PAGES)
e130ab53e992670e2a2ecf043976ac09f21358d1Automatic UpdaterSUNWgnome-crash-report.PAGES: $(SUNWgnome-crash-report_PAGES)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater man1/gnome-accessibility-keyboard-properties.1 \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington man1/gnome-default-applications-properties.1 \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonSUNWgnome-desktop-prefs.PAGES: $(SUNWgnome-desktop-prefs_PAGES)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonSUNWgnome-dialog.PAGES: $(SUNWgnome-dialog_PAGES)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonSUNWgnome-display-mgr.PAGES: $(SUNWgnome-display-mgr_PAGES)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater man1/nautilus-file-management-properties.1
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterSUNWgnome-file-mgr.PAGES: $(SUNWgnome-file-mgr_PAGES)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterSUNWgnome-gtksourceview.PAGES: $(SUNWgnome-gtksourceview_PAGES)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonSUNWgnome-gvfs.PAGES: $(SUNWgnome-gvfs_PAGES)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonSUNWgnome-help-viewer.PAGES: $(SUNWgnome-help-viewer_PAGES)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonSUNWgnome-hex-editor.PAGES: $(SUNWgnome-hex-editor_PAGES)
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox UserSUNWgnome-im-client.PAGES: $(SUNWgnome-im-client_PAGES)
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox UserSUNWgnome-meeting.PAGES: $(SUNWgnome-meeting_PAGES)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterSUNWgnome-img-viewer.PAGES: $(SUNWgnome-img-viewer_PAGES)
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User man1/scrollkeeper-get-extended-content-list.1 \
665ba746c0585088d0c314dcfc4671aa2c7b2dc1Automatic UpdaterSUNWgnome-media-apps.PAGES: $(SUNWgnome-media-apps_PAGES)
44e3b272904bfd85556771d30cf1bc6fa539dd03Automatic UpdaterSUNWgnome-media-player.PAGES: $(SUNWgnome-media-player_PAGES)
44e3b272904bfd85556771d30cf1bc6fa539dd03Automatic UpdaterSUNWgnome-media.PAGES: $(SUNWgnome-media_PAGES)
44e3b272904bfd85556771d30cf1bc6fa539dd03Automatic UpdaterSUNWgnome-menu-editor.PAGES: $(SUNWgnome-menu-editor_PAGES)
44e3b272904bfd85556771d30cf1bc6fa539dd03Automatic UpdaterSUNWgnome-panel.PAGES: $(SUNWgnome-panel_PAGES)
44e3b272904bfd85556771d30cf1bc6fa539dd03Automatic UpdaterSUNWgnome-pdf-viewer.PAGES: $(SUNWgnome-pdf-viewer_PAGES)
44e3b272904bfd85556771d30cf1bc6fa539dd03Automatic UpdaterSUNWgnome-pilot.PAGES: $(SUNWgnome-pilot_PAGES)
44e3b272904bfd85556771d30cf1bc6fa539dd03Automatic UpdaterSUNWgnome-print.PAGES: $(SUNWgnome-print_PAGES)
a382ca49c874d38ad3ac8995b49f9f27128e4ca9Automatic UpdaterSUNWgnome-removable-media.PAGES: $(SUNWgnome-removable-media_PAGES)
bf8c3776f1bf1a1270e5e0443ae5a8df022632a8Mark AndrewsSUNWgnome-remote-desktop.PAGES: $(SUNWgnome-remote-desktop_PAGES)
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox UserSUNWgnome-session.PAGES: $(SUNWgnome-session_PAGES)
4ea3649f028ea6a1e42377082a7ccf8f789fb950Automatic UpdaterSUNWgnome-sys-suspend.PAGES: $(SUNWgnome-sys-suspend_PAGES)
ff8ec39ce4afc2d774ce99f2386474d2c8539cd4Automatic UpdaterSUNWgnome-system-tools.PAGES: $(SUNWgnome-system-tools_PAGES)
ff8ec39ce4afc2d774ce99f2386474d2c8539cd4Automatic UpdaterSUNWgnome-system-monitor.PAGES: $(SUNWgnome-system-monitor_PAGES)
ff8ec39ce4afc2d774ce99f2386474d2c8539cd4Automatic UpdaterSUNWgnome-terminal.PAGES: $(SUNWgnome-terminal_PAGES)
a308b69ac66fadf66863484f301314d6e6a3f1d2Automatic UpdaterSUNWgnome-text-editor.PAGES: $(SUNWgnome-text-editor_PAGES)
31a540386a9abaf681d8952f1b2cdf5c75a0ba6cAutomatic UpdaterSUNWgnome-ui-designer.PAGES: $(SUNWgnome-ui-designer_PAGES)
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian WellingtonSUNWgnome-utils.PAGES: $(SUNWgnome-utils_PAGES)
fd7c65dce9c2b1a3d12ca4df9074cd38019fdb5fAutomatic UpdaterSUNWogg-vorbis.PAGES: $(SUNWogg-vorbis_PAGES)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterSUNWthunderbird.PAGES: $(SUNWthunderbird_PAGES)
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox UserSUNWgnome-devhelp.PAGES: $(SUNWgnome-devhelp_PAGES)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterSUNWgnome-power-manager.PAGES: $(SUNWgnome-manager_PAGES)
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox UserSUNWprint-monitor.PAGES: $(SUNWprint-monitor_PAGES)
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox UserSUNWvirt-manager.PAGES: $(SUNWvirt-manager_PAGES)
48b36fa08b2b5bc0d552dc2a4425b3f7007b3d59Automatic UpdaterSUNWgnome-games.PAGES: $(SUNWgnome-games_PAGES)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterSUNWxdg-user-dirs.PAGES: $(SUNWxdg-user-dirs_PAGES)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterSUNWxdg-user-dirs-gtk.PAGES: $(SUNWxdg-user-dirs-gtk_PAGES)
1959fd489a8832e4e3d311670f64ae18e5d08156Automatic UpdaterSUNWlibtasn1.PAGES: $(SUNWgnome-manager_PAGES)
1959fd489a8832e4e3d311670f64ae18e5d08156Automatic Updater.SUFFIXES: -manpages-$(MANPAGE_VERSION).tar.gz .PAGES
b6561016dc8a813bfd91cef5b876b3dfc3f08ffaTinderbox UserTARBALLS = $(TARBALL_DIR)/$(addsuffix -$(MANPAGE_VERSION).tar.bz2, $(PACKAGES))
8bc194b266a17f89e6c54469d4dfbb408070f39eMark Andrews @test -d $(TARBALL_DIR) || mkdir -p "$(TARBALL_DIR)"
8bc194b266a17f89e6c54469d4dfbb408070f39eMark Andrews @test -x $(SGML2ROFF) || echo "sgml2roff utility not found"
e6fc17ec5ad5ba1c4bf5730b2b97c82d1f2b8f3cMark Andrews @test -x $(GZIP) || echo "gzip utility not found"
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User $(MAKE) MAKE=\"$(MAKE)\" $$package-manpages-$(MANPAGE_VERSION).tar.gz; \
8711e5c73ca872d59810760af0332194cbdd619bAutomatic Updater%-manpages-$(MANPAGE_VERSION).tar.gz: %.PAGES
f751b1576ee6fef4023bf7101d10167e4fe520f3Tinderbox User @test -d $(TARBALL_DIR) || mkdir -p "$(TARBALL_DIR)"
8711e5c73ca872d59810760af0332194cbdd619bAutomatic Updater @if test -f $(TARBALL_DIR)/$@; then \
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User @test -d $(MANPAGE_DIR) || mkdir -p "$(MANPAGE_DIR)"
dc5552b4df5e3821783821c8d4e734c1608c446eTinderbox User @echo "Converting manpages for $@"
e6fc17ec5ad5ba1c4bf5730b2b97c82d1f2b8f3cMark Andrews @for manpage in $($(subst .PAGES,_PAGES,$<)); do \
e6fc17ec5ad5ba1c4bf5730b2b97c82d1f2b8f3cMark Andrews suffix=`expr "$$base_manpage" : '.*\.\([^./]*\)$'`; \
e6fc17ec5ad5ba1c4bf5730b2b97c82d1f2b8f3cMark Andrews $(SGML2ROFF) $$manpage > $(MANPAGE_DIR)/$$base_manpage; \
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User echo $$base_manpage >> $(MANPAGE_DIR)/$$suffix; \
e5bf83fe0bbca838a0749e9071bd76d9ee0fb59bFrancis Dupont @cp Makefile.template $(MANPAGE_DIR)/Makefile
4dca64bb8991502db368028aeeba2f832d3b971dAutomatic Updater mv $(MANPAGE_DIR)/ent $(MANPAGE_DIR)/entities; \
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User @for mantype in entities 1 1m 3 3tiff 4 5; do \
ead8aa3182c5805fccb6c7c1636cede6a24a5fc1Automatic Updater echo "MAN"$$mantype"PAGES = \\" >> $(MANPAGE_DIR)/Makefile; \
ead8aa3182c5805fccb6c7c1636cede6a24a5fc1Automatic Updater if (length(saved_page) > 0) \
ead8aa3182c5805fccb6c7c1636cede6a24a5fc1Automatic Updater print " " saved_page " \\"; \
ead8aa3182c5805fccb6c7c1636cede6a24a5fc1Automatic Updater saved_page=$$0; \
7169f76a893666eb20fc7750782e7f411db742d6Tinderbox User print " " saved_page; \
7169f76a893666eb20fc7750782e7f411db742d6Tinderbox User }' $(MANPAGE_DIR)/$$mantype >> $(MANPAGE_DIR)/Makefile; \
ead8aa3182c5805fccb6c7c1636cede6a24a5fc1Automatic Updater @echo "install:" >> $(MANPAGE_DIR)/Makefile
ead8aa3182c5805fccb6c7c1636cede6a24a5fc1Automatic Updater @for mantype in entities 1 1m 3 3tiff 4 5; do \
ead8aa3182c5805fccb6c7c1636cede6a24a5fc1Automatic Updater echo " install -d \$$(DESTDIR)\$$(MAN"$$mantype"DIR)" >> $(MANPAGE_DIR)/Makefile; \
ead8aa3182c5805fccb6c7c1636cede6a24a5fc1Automatic Updater echo " for mp in \$$(MAN"$$mantype"PAGES); do \\" >> $(MANPAGE_DIR)/Makefile; \
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User echo " install --mode=0644 \$$\$$mp \$$(DESTDIR)\$$(MAN"$$mantype"DIR); \\" >> $(MANPAGE_DIR)/Makefile; \
229ea4644b3a7d9c7fdaa43888e7f55ba01e2ee3Automatic Updater @tarball=`basename "$@" .gz`; echo "Making tarball $$tarball"; \
e20309353e6246485c521278131d3fced73d7957Tinderbox User $(TAR) -cf $(TARBALL_DIR)/$$tarball $(MANPAGE_DIR); \
44e3b272904bfd85556771d30cf1bc6fa539dd03Automatic Updater @test -d check-used-manpages || mkdir -p "check-used-manpages"
665ba746c0585088d0c314dcfc4671aa2c7b2dc1Automatic Updater @test -d check-all-manpages || mkdir -p "check-all-manpages"
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater $(MAKE) MAKE=\"$(MAKE)\" $$package.check-used; \
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater @all_manpages=`ls check-all-manpages/*`; \
2da2220fe7af2c45724b50b0187523b1fab0cf08Rob Austein if test -f check-used-manpages/$$base_manpage; then \
c53a6f37deaa396660adb6a4ca600c4a58adfd3fAutomatic Updater echo " "$$base_manpage >> unused-manpages.txt; \
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater @if test -f unused-manpages.txt; then \
19ad308d84cbf446a144e5a91f2032389a9d65c1Tinderbox User echo "Following Manpages are not being used in any SUNW package :"; \
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater echo "All man pages are being used"; \
7af91d15b2ce1ce32f7320f6d5cc3b83621c241aAutomatic Updater @for manpage in $($(subst .PAGES,_PAGES,$<)); do \