Makefile revision 15317
##
# Makefile for generateing man page tarballs that are used in each of the
# SUNW*.spec files
#
# Generates : $(PACKAGE)-manpages-$(MANPAGE_VERSION).tar.gz
#
# Usage :
# "make" : Rebuilds all man page tarballs
#
# "make check-used" : Outputs list of man pages not being used.
#
# "make check-version" : Prints current man page tarball version
#
# "make $(PACKAGE)-manpages-$(MANPAGE_VERSION).tar.gz
# e.g. "make SUNWgnome-panel-manpages-0.1.tar.gz"
# will only generate SUNWgnome-panel's man page tarball
#
# For each package that contains man pages.
# - Ensure all relevant man pages for your package are located under the
# correct man page section dir i.e.
# - Add Package name to PACKAGES Variable
# e.g. PACKAGES = \
# SUNWgnome-panel \
# SUNWyour-package
#
# - Add two package specific variables
# PACKAGE_PAGES - Full path of all manpages for this package
# e.g. SUNWgnome-panel_PAGES = man1/gnome-panel.1 etc...
# PACKAGE.PAGES - Assigned to $(PACKAGE_PAGES).
# e.g. SUNWgnome-panel.PAGES: $(SUNWgnome-panel_PAGES)
#
#
# To Add new man pages to existing packages
# -----------------------------------------
# Put very simply, all that is required from engineers is to make some changes
# and commit in SVN.
#
# - Ensure the man page exists in SVN under the relevant man page section sub
# dir
# - Add man page to the SUNW<package>_PAGES Makefile variable
# e.g. For a new gnome-panel man page it would be added to
# SUNWgnome-panel_PAGES
# - Remake tarballs
# $ make
# This will re-generate all man page tarballs.
# - Copy newly generated tarball from sun-manpage-tarballs to package build
# install correctly.
# - New man page tarball will be generated by RE for each nightly, and for each
# milestone build.
#
#
# MANPAGE_VERSION is maintained by RE and only gets bumped when spec-files gets
# branched. PLEASE do not change this.
#
MANPAGE_VERSION=0.1
PACKAGES = \
SUNWTiff \
SUNWdbus \
SUNWgnome-cd \
SUNWgnome-print \
SUNWjpg \
SUNWpng \
SUNWw3m \
SUNWTiff_PAGES = \
SUNWcheese_PAGES = \
SUNWdbus_PAGES = \
SUNWgnome-audio_PAGES = \
SUNWgnome-cd-burner_PAGES = \
SUNWgnome-gvfs_PAGES = \
SUNWgnome-libs_PAGES = \
SUNWgnome-media_PAGES = \
SUNWgnome-panel_PAGES = \
SUNWgnome-pilot_PAGES = \
SUNWpilot-link_PAGES = \
SUNWgnome-print_PAGES = \
SUNWgnome-utils_PAGES = \
SUNWjpg_PAGES = \
SUNWogg-vorbis_PAGES = \
SUNWpng_PAGES = \
SUNWfsexam_PAGES = \
SUNWgnome-games_PAGES = \
SUNWxdg-user-dirs-gtk.PAGES: $(SUNWxdg-user-dirs-gtk_PAGES)
SUNWgamin_PAGES = \
SUNWgnome-spell_PAGES = \
SUNWglibmm_PAGES = \
SUNWsigcpp_PAGES = \
SUNWgnutls_PAGES = \
SUNWgtkmm_PAGES = \
SUNWespeak_PAGES = \
SUNWw3m_PAGES = \
SUNWlibgsf_PAGES = \
SUNWdia_PAGES = \
@test -x $(SGML2ROFF) || echo "sgml2roff utility not found"
@test -x $(GZIP) || echo "gzip utility not found"
done
@if test -f $(TARBALL_DIR)/$@; then \
rm -f $(TARBALL_DIR)/$@; \
fi
@echo "Converting manpages for $@"
base_manpage=`basename $$manpage`; \
echo " $$base_manpage"; \
if [ $$suffix = "ent" ]; then \
else \
idx1 = index($$0, "ARC "); \
idx2 = index($$0, "-->"); \
if (idx1 > 0 && idx2 > 0) { \
print "...\\\" " substr($$0, idx1+6, idx2-(idx1+6)); \
} \
fi;\
done
@if test -f $(MANPAGE_DIR)/ent; then \
fi
if test -f $(MANPAGE_DIR)/$$mantype; then \
$(AWK) '{ \
if (length(saved_page) > 0) \
print " " saved_page " \\"; \
saved_page=$$0; \
} \
END { \
print " " saved_page; \
fi; \
done
if test -f $(MANPAGE_DIR)/$$mantype; then \
echo " install --mode=0644 \$$\$$mp \$$(DESTDIR)\$$(MAN"$$mantype"DIR); \\" >> $(MANPAGE_DIR)/Makefile; \
fi; \
done
done
@all_manpages=`ls check-all-manpages/*`; \
base_manpage=`basename $$manpage`; \
else \
fi; \
done
@if test -f unused-manpages.txt; then \
echo "Following Manpages are not being used in any SUNW package :"; \
rm -f unused-manpages.txt; \
else \
echo "All man pages are being used"; \
fi
done
@echo $(MANPAGE_VERSION)