Makefile revision 13623
885f47576842cf3c569315b9a48bd9f0ca03f203Automatic Updater# Makefile for generateing man page tarballs that are used in each of the
71bd43eebd9d6e42dbcae62b730f5b6508d5acd8Automatic Updater# SUNW*.spec files
59528addd704f8d5757b54e540520f74e588a7c7Automatic Updater# Generates : $(PACKAGE)-manpages-$(MANPAGE_VERSION).tar.gz
2bb3422dc683c013db7042f5736240de6b86f182Automatic Updater# e.g. sun-manpage-tarballs/*.tar.gz
59528addd704f8d5757b54e540520f74e588a7c7Automatic Updater# "make" : Rebuilds all man page tarballs
90ff38a0d8deaf5f9c2aa5916d99b2e572d28738Automatic Updater# "make check-used" : Outputs list of man pages not being used.
ac4e70ff8955669341f435bc0a734a17c01af124Mark Andrews# "make check-version" : Prints current man page tarball version
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# "make $(PACKAGE)-manpages-$(MANPAGE_VERSION).tar.gz
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater# e.g. "make SUNWgnome-panel-manpages-0.1.tar.gz"
bc0a53583d92309bebcf93c408e2f3247ebd3d3cAutomatic Updater# will only generate SUNWgnome-panel's man page tarball
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# For each package that contains man pages.
96713299d08c0735c18ebe8772dd2cc1ecd4356aAutomatic Updater# - Ensure all relevant man pages for your package are located under the
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrews# correct man page section dir i.e.
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# - Add Package name to PACKAGES Variable
96713299d08c0735c18ebe8772dd2cc1ecd4356aAutomatic Updater# e.g. PACKAGES = \
80faf1588895fd26490f82f95a7a1b771df1c324Automatic Updater# SUNWgnome-panel \
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# SUNWyour-package
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews# - Add two package specific variables
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews# PACKAGE_PAGES - Full path of all manpages for this package
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson# e.g. SUNWgnome-panel_PAGES = man1/gnome-panel.1 etc...
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews# PACKAGE.PAGES - Assigned to $(PACKAGE_PAGES).
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews# e.g. SUNWgnome-panel.PAGES: $(SUNWgnome-panel_PAGES)
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater# To Add new man pages to existing packages
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater# -----------------------------------------
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan Hunt# Put very simply, all that is required from engineers is to make some changes
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater# and commit in SVN.
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan Hunt# - 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
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater# e.g. For a new gnome-panel man page it would be added to
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan Hunt# SUNWgnome-panel_PAGES
2d2dc37599979c83495510f8af8d1756753aa2c5Automatic Updater# - Remake tarballs
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan Hunt# 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.
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater# - New man page tarball will be generated by RE for each nightly, and for each
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater# milestone build.
cdfc81e048bd34c1d628380247bda6b80a89e20eAutomatic Updater# - Commit change back to subverison, e.g. new/amended man pagees,
cdfc81e048bd34c1d628380247bda6b80a89e20eAutomatic Updater# Solaris/manpages/Makefile, Solaris/S*.spec files if affected.
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater# MANPAGE_VERSION is maintained by RE and only gets bumped when spec-files gets
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater# branched. PLEASE do not change this.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonSUNWdbus-bindings.PAGES: $(SUNWdbus-bindings_PAGES)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonSUNWevolution-exchange.PAGES: $(SUNWevolution-exchange_PAGES)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonSUNWevolution-data-server.PAGES: $(SUNWevolution-data-server_PAGES)
a26b22914b7bf25f065afb8cdef983766dcd672bAutomatic UpdaterSUNWgnome-a11y-dasher.PAGES: $(SUNWgnome-a11y-dasher_PAGES)
ae7e54b14c946e0984c191554db9abb4893f9349Automatic UpdaterSUNWgnome-a11y-gok.PAGES: $(SUNWgnome-a11y-gok_PAGES)
ae7e54b14c946e0984c191554db9abb4893f9349Automatic UpdaterSUNWgnome-a11y-libs.PAGES: $(SUNWgnome-a11y-libs_PAGES)
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian WellingtonSUNWgnome-a11y-reader.PAGES: $(SUNWgnome-a11y-reader_PAGES)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonSUNWgnome-a11y-poke.PAGES: $(SUNWgnome-a11y-poke_PAGES)
6c6a121295b30772cbf3dd75a51fb9d883051a0eAutomatic UpdaterSUNWgnome-archive-mgr.PAGES: $(SUNWgnome-archive-mgr_PAGES)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterSUNWgnome-audio.PAGES: $(SUNWgnome-audio_PAGES)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonSUNWgnome-base-libs.PAGES: $(SUNWgnome-base-libs_PAGES)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterSUNWgnome-base-libs-java.PAGES: $(SUNWgnome-base-libs-java_PAGES)
7adcb4de92bf4383a4c5624c4ed256736d02bc6dMark AndrewsSUNWgnome-calculator.PAGES: $(SUNWgnome-calculator_PAGES)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonSUNWgnome-cd-burner.PAGES: $(SUNWgnome-cd-burner_PAGES)
7adcb4de92bf4383a4c5624c4ed256736d02bc6dMark AndrewsSUNWgnome-character-map.PAGES: $(SUNWgnome-character-map_PAGES)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonSUNWgnome-common-devel.PAGES: $(SUNWgnome-common-devel_PAGES)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterSUNWgnome-component.PAGES: $(SUNWgnome-component_PAGES)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterSUNWgnome-config-editor.PAGES: $(SUNWgnome-config-editor_PAGES)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterSUNWgnome-config.PAGES: $(SUNWgnome-config_PAGES)
7adcb4de92bf4383a4c5624c4ed256736d02bc6dMark AndrewsSUNWgnome-crash-report.PAGES: $(SUNWgnome-crash-report_PAGES)
7adcb4de92bf4383a4c5624c4ed256736d02bc6dMark Andrews man1/gnome-accessibility-keyboard-properties.1 \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonSUNWgnome-desktop-prefs.PAGES: $(SUNWgnome-desktop-prefs_PAGES)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterSUNWgnome-dialog.PAGES: $(SUNWgnome-dialog_PAGES)
7af91d15b2ce1ce32f7320f6d5cc3b83621c241aAutomatic UpdaterSUNWgnome-display-mgr.PAGES: $(SUNWgnome-display-mgr_PAGES)
532d27b39244fadfcf8d8b4593f4c65434c9c664Automatic Updater man1/nautilus-file-management-properties.1
532d27b39244fadfcf8d8b4593f4c65434c9c664Automatic UpdaterSUNWgnome-file-mgr.PAGES: $(SUNWgnome-file-mgr_PAGES)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterSUNWgnome-gtksourceview.PAGES: $(SUNWgnome-gtksourceview_PAGES)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterSUNWgnome-gvfs.PAGES: $(SUNWgnome-gvfs_PAGES)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterSUNWgnome-help-viewer.PAGES: $(SUNWgnome-help-viewer_PAGES)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterSUNWgnome-hex-editor.PAGES: $(SUNWgnome-hex-editor_PAGES)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterSUNWgnome-im-client.PAGES: $(SUNWgnome-im-client_PAGES)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterSUNWgnome-meeting.PAGES: $(SUNWgnome-meeting_PAGES)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterSUNWgnome-img-viewer.PAGES: $(SUNWgnome-img-viewer_PAGES)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater man1/scrollkeeper-get-extended-content-list.1 \
fd7c65dce9c2b1a3d12ca4df9074cd38019fdb5fAutomatic Updater man1/scrollkeeper-get-index-from-docpath.1 \
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater man1/scrollkeeper-get-toc-from-docpath.1 \
7af91d15b2ce1ce32f7320f6d5cc3b83621c241aAutomatic UpdaterSUNWgnome-libs.PAGES: $(SUNWgnome-libs_PAGES)
2da2220fe7af2c45724b50b0187523b1fab0cf08Rob AusteinSUNWgnome-media-apps.PAGES: $(SUNWgnome-media-apps_PAGES)
7af91d15b2ce1ce32f7320f6d5cc3b83621c241aAutomatic UpdaterSUNWgnome-media-player.PAGES: $(SUNWgnome-media-player_PAGES)
7af91d15b2ce1ce32f7320f6d5cc3b83621c241aAutomatic UpdaterSUNWgnome-media.PAGES: $(SUNWgnome-media_PAGES)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonSUNWgnome-menu-editor.PAGES: $(SUNWgnome-menu-editor_PAGES)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonSUNWgnome-panel.PAGES: $(SUNWgnome-panel_PAGES)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonSUNWgnome-pdf-viewer.PAGES: $(SUNWgnome-pdf-viewer_PAGES)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterSUNWgnome-pilot.PAGES: $(SUNWgnome-pilot_PAGES)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterSUNWgnome-print.PAGES: $(SUNWgnome-print_PAGES)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterSUNWgnome-removable-media.PAGES: $(SUNWgnome-removable-media_PAGES)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterSUNWgnome-remote-desktop.PAGES: $(SUNWgnome-remote-desktop_PAGES)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterSUNWgnome-session.PAGES: $(SUNWgnome-session_PAGES)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterSUNWgnome-sys-suspend.PAGES: $(SUNWgnome-sys-suspend_PAGES)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonSUNWgnome-system-tools.PAGES: $(SUNWgnome-system-tools_PAGES)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterSUNWgnome-system-monitor.PAGES: $(SUNWgnome-system-monitor_PAGES)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterSUNWgnome-terminal.PAGES: $(SUNWgnome-terminal_PAGES)
d145b64cacc8d9cda51f9924ec70cd4661c3e2cfAutomatic UpdaterSUNWgnome-text-editor.PAGES: $(SUNWgnome-text-editor_PAGES)
d145b64cacc8d9cda51f9924ec70cd4661c3e2cfAutomatic UpdaterSUNWgnome-ui-designer.PAGES: $(SUNWgnome-ui-designer_PAGES)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterSUNWgnome-utils.PAGES: $(SUNWgnome-utils_PAGES)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterSUNWogg-vorbis.PAGES: $(SUNWogg-vorbis_PAGES)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonSUNWrealplayer.PAGES: $(SUNWrealplayer_PAGES)
53aed64e0f8553762fc0c380ee41cb42f514c7d5Brian WellingtonSUNWthunderbird.PAGES: $(SUNWthunderbird_PAGES)
6de27e27ad6056d7c049feb912df5a6b9a56d1b8Automatic UpdaterSUNWgnome-devhelp.PAGES: $(SUNWgnome-devhelp_PAGES)
af3e516f771c8ba376a8cd954a7233badfce8cdcAutomatic UpdaterSUNWgnome-power-manager.PAGES: $(SUNWgnome-manager_PAGES)
7e1a8f402e3881388db37152f71c698cb1f1c426Mark AndrewsSUNWprint-monitor.PAGES: $(SUNWprint-monitor_PAGES)
7e1a8f402e3881388db37152f71c698cb1f1c426Mark AndrewsSUNWvirt-manager.PAGES: $(SUNWvirt-manager_PAGES)
7e1a8f402e3881388db37152f71c698cb1f1c426Mark AndrewsSUNWxdg-user-dirs.PAGES: $(SUNWxdg-user-dirs_PAGES)
fd7c65dce9c2b1a3d12ca4df9074cd38019fdb5fAutomatic UpdaterSUNWxdg-user-dirs-gtk.PAGES: $(SUNWxdg-user-dirs-gtk_PAGES)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterSUNWlibtasn1.PAGES: $(SUNWgnome-manager_PAGES)
5ae0e2c8b72fa44237edeb37d1945b1c3535ca39Automatic Updater.SUFFIXES: -manpages-$(MANPAGE_VERSION).tar.gz .PAGES
f55369d776907119cd8699a4119d9c80daa7cae4Mark AndrewsTARBALLS = $(TARBALL_DIR)/$(addsuffix -$(MANPAGE_VERSION).tar.bz2, $(PACKAGES))
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater @test -d $(TARBALL_DIR) || mkdir -p "$(TARBALL_DIR)"
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater @test -x $(SGML2ROFF) || echo "sgml2roff utility not found"
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington @test -x $(GZIP) || echo "gzip utility not found"
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington $(MAKE) MAKE=\"$(MAKE)\" $$package-manpages-$(MANPAGE_VERSION).tar.gz; \
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater%-manpages-$(MANPAGE_VERSION).tar.gz: %.PAGES
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater @test -d $(TARBALL_DIR) || mkdir -p "$(TARBALL_DIR)"
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater @if test -f $(TARBALL_DIR)/$@; then \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington @test -d $(MANPAGE_DIR) || mkdir -p "$(MANPAGE_DIR)"
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater @echo "Converting manpages for $@"
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater @for manpage in $($(subst .PAGES,_PAGES,$<)); do \
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater suffix=`expr "$$base_manpage" : '.*\.\([^./]*\)$'`; \
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater $(SGML2ROFF) $$manpage > $(MANPAGE_DIR)/$$base_manpage; \
73eb75dc212911e4da58a3ce0a4672d3910193ebBrian Wellington idx1 = index($$0, "ARC "); \
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater idx2 = index($$0, "-->"); \
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater if (idx1 > 0 && idx2 > 0) { \
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater print "...\\\" " substr($$0, idx1+6, idx2-(idx1+6)); \
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater echo $$base_manpage >> $(MANPAGE_DIR)/$$suffix; \
6c6a121295b30772cbf3dd75a51fb9d883051a0eAutomatic Updater @cp Makefile.template $(MANPAGE_DIR)/Makefile
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater mv $(MANPAGE_DIR)/ent $(MANPAGE_DIR)/entities; \
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater @for mantype in entities 1 1m 3 3tiff 4 5; do \
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater if test -f $(MANPAGE_DIR)/$$mantype; then \
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater echo "MAN"$$mantype"PAGES = \\" >> $(MANPAGE_DIR)/Makefile; \
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater if (length(saved_page) > 0) \
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater print " " saved_page " \\"; \
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater saved_page=$$0; \
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater print " " saved_page; \
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater }' $(MANPAGE_DIR)/$$mantype >> $(MANPAGE_DIR)/Makefile; \
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater @echo "install:" >> $(MANPAGE_DIR)/Makefile
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington @for mantype in entities 1 1m 3 3tiff 4 5; do \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington if test -f $(MANPAGE_DIR)/$$mantype; then \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington echo " install -d \$$(DESTDIR)\$$(MAN"$$mantype"DIR)" >> $(MANPAGE_DIR)/Makefile; \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington echo " for mp in \$$(MAN"$$mantype"PAGES); do \\" >> $(MANPAGE_DIR)/Makefile; \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington echo " install --mode=0644 \$$\$$mp \$$(DESTDIR)\$$(MAN"$$mantype"DIR); \\" >> $(MANPAGE_DIR)/Makefile; \
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater echo " done" >> $(MANPAGE_DIR)/Makefile; \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington @tarball=`basename "$@" .gz`; echo "Making tarball $$tarball"; \
fd7c65dce9c2b1a3d12ca4df9074cd38019fdb5fAutomatic Updater $(TAR) -cf $(TARBALL_DIR)/$$tarball $(MANPAGE_DIR); \
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater @test -d check-used-manpages || mkdir -p "check-used-manpages"
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater @test -d check-all-manpages || mkdir -p "check-all-manpages"
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater $(MAKE) MAKE=\"$(MAKE)\" $$package.check-used; \
8227257b1c0224a7991e04bb79dc5059d5062dfbAndreas Gustafsson @all_manpages=`ls check-all-manpages/*`; \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington if test -f check-used-manpages/$$base_manpage; then \
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater echo " "$$base_manpage >> unused-manpages.txt; \
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater @if test -f unused-manpages.txt; then \
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater echo "Following Manpages are not being used in any SUNW package :"; \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington echo "All man pages are being used"; \
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater @for manpage in $($(subst .PAGES,_PAGES,$<)); do \