Makefile revision 12780
6fe48fb46e53ffc37542853a1edb74cb481b7d94Automatic Updater# Makefile for generateing man page tarballs that are used in each of the
7a2a1b8b14fc804ac80612d7b98064095e445be5Automatic Updater# 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.
6c6a121295b30772cbf3dd75a51fb9d883051a0eAutomatic Updater# "make check-version" : Prints current man page tarball version
9cd5eb6fe0f26d65724b99216cb31dcdd12e4afdAutomatic Updater# "make $(PACKAGE)-manpages-$(MANPAGE_VERSION).tar.gz
bbde8dc56605130058a1540609264fa109da3b63Automatic Updater# e.g. "make SUNWgnome-panel-manpages-0.1.tar.gz"
bbde8dc56605130058a1540609264fa109da3b63Automatic Updater# will only generate SUNWgnome-panel's man page tarball
e130ab53e992670e2a2ecf043976ac09f21358d1Automatic Updater# 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.
bbde8dc56605130058a1540609264fa109da3b63Automatic Updater# - Add Package name to PACKAGES Variable
bbde8dc56605130058a1540609264fa109da3b63Automatic Updater# 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)
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater# 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
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater# 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.
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark AndrewsSUNWdbus-bindings.PAGES: $(SUNWdbus-bindings_PAGES)
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic UpdaterSUNWevolution-exchange.PAGES: $(SUNWevolution-exchange_PAGES)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterSUNWevolution-data-server.PAGES: $(SUNWevolution-data-server_PAGES)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonSUNWgnome-a11y-dasher.PAGES: $(SUNWgnome-a11y-dasher_PAGES)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonSUNWgnome-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)
aa1d397c4736cd86540555193d71e55fa3b37b2aMark AndrewsSUNWgnome-base-libs.PAGES: $(SUNWgnome-base-libs_PAGES)
099b86fb8136a7dff81df85cf395978c16eb254cAutomatic UpdaterSUNWgnome-base-libs-java.PAGES: $(SUNWgnome-base-libs-java_PAGES)
a308b69ac66fadf66863484f301314d6e6a3f1d2Automatic UpdaterSUNWgnome-calculator.PAGES: $(SUNWgnome-calculator_PAGES)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterSUNWgnome-cd-burner.PAGES: $(SUNWgnome-cd-burner_PAGES)
3de6db3208d51de1e138b63b9670430c03f99694Automatic UpdaterSUNWgnome-character-map.PAGES: $(SUNWgnome-character-map_PAGES)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonSUNWgnome-common-devel.PAGES: $(SUNWgnome-common-devel_PAGES)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonSUNWgnome-component.PAGES: $(SUNWgnome-component_PAGES)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonSUNWgnome-config-editor.PAGES: $(SUNWgnome-config-editor_PAGES)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterSUNWgnome-config.PAGES: $(SUNWgnome-config_PAGES)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonSUNWgnome-crash-report.PAGES: $(SUNWgnome-crash-report_PAGES)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington 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)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterSUNWgnome-display-mgr.PAGES: $(SUNWgnome-display-mgr_PAGES)
56effd2e3f579fd77b1fb37d47871d1bf1286bc4Automatic Updater man1/nautilus-file-management-properties.1
42bee07ebb8152a6ec2f87f4790d87368c24704cAutomatic UpdaterSUNWgnome-file-mgr.PAGES: $(SUNWgnome-file-mgr_PAGES)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonSUNWgnome-gtksourceview.PAGES: $(SUNWgnome-gtksourceview_PAGES)
7adcb4de92bf4383a4c5624c4ed256736d02bc6dMark AndrewsSUNWgnome-help-viewer.PAGES: $(SUNWgnome-help-viewer_PAGES)
7adcb4de92bf4383a4c5624c4ed256736d02bc6dMark AndrewsSUNWgnome-hex-editor.PAGES: $(SUNWgnome-hex-editor_PAGES)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonSUNWgnome-im-client.PAGES: $(SUNWgnome-im-client_PAGES)
8ccd7da886e93cd490fcb6f4c4e98a6514f35820Automatic UpdaterSUNWgnome-meeting.PAGES: $(SUNWgnome-meeting_PAGES)
84a18c72b9f05a7d2aabbc50886de494251d1719Automatic UpdaterSUNWgnome-img-viewer.PAGES: $(SUNWgnome-img-viewer_PAGES)
cc5a9ce75af9870f2cb9e2bf00548c2f7e6398d6Automatic Updater man1/scrollkeeper-get-extended-content-list.1 \
cc5a9ce75af9870f2cb9e2bf00548c2f7e6398d6Automatic Updater man1/scrollkeeper-get-index-from-docpath.1 \
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater man1/scrollkeeper-get-toc-from-docpath.1 \
665ba746c0585088d0c314dcfc4671aa2c7b2dc1Automatic UpdaterSUNWgnome-libs.PAGES: $(SUNWgnome-libs_PAGES)
44e3b272904bfd85556771d30cf1bc6fa539dd03Automatic 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)
31a540386a9abaf681d8952f1b2cdf5c75a0ba6cAutomatic UpdaterSUNWgnome-print.PAGES: $(SUNWgnome-print_PAGES)
bf8c3776f1bf1a1270e5e0443ae5a8df022632a8Mark AndrewsSUNWgnome-removable-media.PAGES: $(SUNWgnome-removable-media_PAGES)
31a540386a9abaf681d8952f1b2cdf5c75a0ba6cAutomatic UpdaterSUNWgnome-remote-desktop.PAGES: $(SUNWgnome-remote-desktop_PAGES)
60d5d17479b47c03b9c7c86f54269718103750b8Automatic UpdaterSUNWgnome-session.PAGES: $(SUNWgnome-session_PAGES)
60d5d17479b47c03b9c7c86f54269718103750b8Automatic UpdaterSUNWgnome-sys-suspend.PAGES: $(SUNWgnome-sys-suspend_PAGES)
31a540386a9abaf681d8952f1b2cdf5c75a0ba6cAutomatic UpdaterSUNWgnome-system-tools.PAGES: $(SUNWgnome-system-tools_PAGES)
ff8ec39ce4afc2d774ce99f2386474d2c8539cd4Automatic UpdaterSUNWgnome-system-monitor.PAGES: $(SUNWgnome-system-monitor_PAGES)
a308b69ac66fadf66863484f301314d6e6a3f1d2Automatic UpdaterSUNWgnome-terminal.PAGES: $(SUNWgnome-terminal_PAGES)
ff8ec39ce4afc2d774ce99f2386474d2c8539cd4Automatic UpdaterSUNWgnome-text-editor.PAGES: $(SUNWgnome-text-editor_PAGES)
7dd02af3c9350553e1d52d980a7812425b3f1295Automatic UpdaterSUNWgnome-ui-designer.PAGES: $(SUNWgnome-ui-designer_PAGES)
ec8755f605d7dcb2de1076040e77bc2d7ec33b4aTinderbox UserSUNWgnome-utils.PAGES: $(SUNWgnome-utils_PAGES)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterSUNWgnome-vfs.PAGES: $(SUNWgnome-vfs_PAGES)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterSUNWogg-vorbis.PAGES: $(SUNWogg-vorbis_PAGES)
88d58d79c5bc7ce3c20a42461a5070116c736836Automatic UpdaterSUNWrealplayer.PAGES: $(SUNWrealplayer_PAGES)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterSUNWthunderbird.PAGES: $(SUNWthunderbird_PAGES)
7f814b8b164ae04916a8487cdc5e88ee3ff51a58Automatic UpdaterSUNWgnome-devhelp.PAGES: $(SUNWgnome-devhelp_PAGES)
7f814b8b164ae04916a8487cdc5e88ee3ff51a58Automatic UpdaterSUNWgnome-power-manager.PAGES: $(SUNWgnome-manager_PAGES)
1959fd489a8832e4e3d311670f64ae18e5d08156Automatic UpdaterSUNWprint-monitor.PAGES: $(SUNWprint-monitor_PAGES)
1959fd489a8832e4e3d311670f64ae18e5d08156Automatic UpdaterSUNWvirt-manager.PAGES: $(SUNWvirt-manager_PAGES)
8bc194b266a17f89e6c54469d4dfbb408070f39eMark AndrewsSUNWxdg-user-dirs.PAGES: $(SUNWxdg-user-dirs_PAGES)
6e26c3b13483e042e44d213bc9995957720e5e15Automatic UpdaterSUNWxdg-user-dirs-gtk.PAGES: $(SUNWxdg-user-dirs-gtk_PAGES)
8711e5c73ca872d59810760af0332194cbdd619bAutomatic Updater.SUFFIXES: -manpages-$(MANPAGE_VERSION).tar.gz .PAGES
b886b04d8d2b085cbf3e1bf4442dee87f43ba5e4Tinderbox UserTARBALLS = $(TARBALL_DIR)/$(addsuffix -$(MANPAGE_VERSION).tar.bz2, $(PACKAGES))
8a50411a003d24e8a6e6d4e922a2205c83201038Automatic Updater @test -d $(TARBALL_DIR) || mkdir -p "$(TARBALL_DIR)"
f7a71eef29bcbf892270460269c79664f600cffdAutomatic Updater @test -x $(SGML2ROFF) || echo "sgml2roff utility not found"
fe84edc17e0d582cf7b4270f8df9d4742a107b1cAutomatic Updater @test -x $(GZIP) || echo "gzip utility not found"
e5bf83fe0bbca838a0749e9071bd76d9ee0fb59bFrancis Dupont $(MAKE) MAKE=\"$(MAKE)\" $$package-manpages-$(MANPAGE_VERSION).tar.gz; \
4dca64bb8991502db368028aeeba2f832d3b971dAutomatic Updater%-manpages-$(MANPAGE_VERSION).tar.gz: %.PAGES
e5bf83fe0bbca838a0749e9071bd76d9ee0fb59bFrancis Dupont @test -d $(TARBALL_DIR) || mkdir -p "$(TARBALL_DIR)"
4dca64bb8991502db368028aeeba2f832d3b971dAutomatic Updater @if test -f $(TARBALL_DIR)/$@; then \
ead8aa3182c5805fccb6c7c1636cede6a24a5fc1Automatic Updater @test -d $(MANPAGE_DIR) || mkdir -p "$(MANPAGE_DIR)"
ead8aa3182c5805fccb6c7c1636cede6a24a5fc1Automatic Updater @echo "Converting manpages for $@"
ead8aa3182c5805fccb6c7c1636cede6a24a5fc1Automatic Updater @for manpage in $($(subst .PAGES,_PAGES,$<)); do \
7169f76a893666eb20fc7750782e7f411db742d6Tinderbox User suffix=`expr "$$base_manpage" : '.*\.\([^./]*\)$'`; \
ead8aa3182c5805fccb6c7c1636cede6a24a5fc1Automatic Updater $(SGML2ROFF) $$manpage > $(MANPAGE_DIR)/$$base_manpage; \
ead8aa3182c5805fccb6c7c1636cede6a24a5fc1Automatic Updater echo $$base_manpage >> $(MANPAGE_DIR)/$$suffix; \
ead8aa3182c5805fccb6c7c1636cede6a24a5fc1Automatic Updater @cp Makefile.template $(MANPAGE_DIR)/Makefile
ead8aa3182c5805fccb6c7c1636cede6a24a5fc1Automatic Updater mv $(MANPAGE_DIR)/ent $(MANPAGE_DIR)/entities; \
ead8aa3182c5805fccb6c7c1636cede6a24a5fc1Automatic Updater @for mantype in entities 1 1m 3 3tiff 4 5; do \
229ea4644b3a7d9c7fdaa43888e7f55ba01e2ee3Automatic Updater echo "MAN"$$mantype"PAGES = \\" >> $(MANPAGE_DIR)/Makefile; \
665ba746c0585088d0c314dcfc4671aa2c7b2dc1Automatic Updater if (length(saved_page) > 0) \
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater print " " saved_page " \\"; \
44e3b272904bfd85556771d30cf1bc6fa539dd03Automatic Updater saved_page=$$0; \
665ba746c0585088d0c314dcfc4671aa2c7b2dc1Automatic Updater print " " saved_page; \
7af91d15b2ce1ce32f7320f6d5cc3b83621c241aAutomatic Updater }' $(MANPAGE_DIR)/$$mantype >> $(MANPAGE_DIR)/Makefile; \
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater @for mantype in entities 1 1m 3 3tiff 4 5; do \
da82e232161d67b77df2d67898bdac693f647be1Automatic Updater if test -f $(MANPAGE_DIR)/$$mantype; then \
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater echo " install -d $$(DESTDIR)$$(MAN"$$mantype"DIR)" >> $(MANPAGE_DIR)/Makefile; \
2da2220fe7af2c45724b50b0187523b1fab0cf08Rob Austein echo " for mp in $$(MAN"$$mantype"PAGES); do \\" >> $(MANPAGE_DIR)/Makefile; \
af9cf290cea6ada6ce27b51c724ab77ad5d73fa0Tinderbox User echo " install --mode=0644 \$$\$$mp $$(DESTDIR)$$(MAN"$$mantype"DIR); \\" >> $(MANPAGE_DIR)/Makefile; \
e171a4137c6ba348957e61b7c4c3541493c0da02Automatic Updater echo " done" >> $(MANPAGE_DIR)/Makefile; \
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater @tarball=`basename "$@" .gz`; echo "Making tarball $$tarball"; \
5acd63107041b5b0bed444e2bc29f4bca0c13e28Automatic Updater $(TAR) -cf $(TARBALL_DIR)/$$tarball $(MANPAGE_DIR); \
7af91d15b2ce1ce32f7320f6d5cc3b83621c241aAutomatic Updater @test -d check-used-manpages || mkdir -p "check-used-manpages"
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater @test -d check-all-manpages || mkdir -p "check-all-manpages"
af9cf290cea6ada6ce27b51c724ab77ad5d73fa0Tinderbox User $(MAKE) MAKE=\"$(MAKE)\" $$package.check-used; \
7af91d15b2ce1ce32f7320f6d5cc3b83621c241aAutomatic Updater @all_manpages=`ls check-all-manpages/*`; \
7af91d15b2ce1ce32f7320f6d5cc3b83621c241aAutomatic Updater if test -f check-used-manpages/$$base_manpage; then \
7af91d15b2ce1ce32f7320f6d5cc3b83621c241aAutomatic Updater echo " "$$base_manpage >> unused-manpages.txt; \
4104e236f71eb5108fcfda6711878a97f6f4a8e7Automatic Updater @if test -f unused-manpages.txt; then \
6fe48fb46e53ffc37542853a1edb74cb481b7d94Automatic Updater echo "Following Manpages are not being used in any SUNW package :"; \
af9cf290cea6ada6ce27b51c724ab77ad5d73fa0Tinderbox User echo "All man pages are being used"; \
229ea4644b3a7d9c7fdaa43888e7f55ba01e2ee3Automatic Updater @for manpage in $($(subst .PAGES,_PAGES,$<)); do \