diff options
author | Alan Coopersmith <alan.coopersmith@sun.com> | 2007-08-28 15:42:17 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@sun.com> | 2007-08-28 15:42:17 -0700 |
commit | dead50b7452214a0501e2ea73f8499b2f30e69f1 (patch) | |
tree | f0350c932b32d33e975e4afa3af34eca2955642c | |
parent | 7a0d1eb783cf541250ccd2a4618d8bb8af30178e (diff) |
Update man page generation to match current X.Org conventions
-rw-r--r-- | Makefile.am | 39 | ||||
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | constype.man | 2 |
3 files changed, 25 insertions, 17 deletions
diff --git a/Makefile.am b/Makefile.am index db46058..844f4e2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -34,31 +34,38 @@ bin_PROGRAMS = constype constype_SOURCES = constype.c -man1_MANS = constype.man +appman_PRE = constype.man -CLEANFILES = $(man1_MANS) +appmandir = $(APP_MAN_DIR) -all-local: $(man1_MANS) +appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@) -# Rules for generating files using the C pre-processor -# (Replaces CppFileTarget from Imake) +EXTRA_DIST = $(appman_PRE) +CLEANFILES = $(appman_DATA) SED = sed -SUFFIXES = .1 .man - -# Delete line numbers from the cpp output (-P is not portable, I guess). - -CPP_SED_MAGIC = $(SED) -e '/^\# *[0-9][0-9]* *.*$$/d' \ - -e '/^\#line *[0-9][0-9]* *.*$$/d' - +# Strings to replace in man pages XORGRELSTRING = @PACKAGE_STRING@ XORGMANNAME = X Version 11 -CPP_FILES_FLAGS = -D__xorgversion__="\"$(XORGRELSTRING)\" \"$(XORGMANNAME)\"" - -.man.1: - $(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $< | $(CPP_SED_MAGIC) > $@ +MAN_SUBSTS = \ + -e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \ + -e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \ + -e 's|__xservername__|Xorg|g' \ + -e 's|__xconfigfile__|xorg.conf|g' \ + -e 's|__projectroot__|$(prefix)|g' \ + -e 's|__apploaddir__|$(appdefaultdir)|' \ + -e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \ + -e 's|__libmansuffix__|$(LIB_MAN_SUFFIX)|g' \ + -e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \ + -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \ + -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g' + +SUFFIXES = .$(APP_MAN_SUFFIX) .man + +.man.$(APP_MAN_SUFFIX): + $(SED) $(MAN_SUBSTS) < $< > $@ if LINT ALL_LINT_FLAGS=$(LINT_FLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ diff --git a/configure.ac b/configure.ac index da57723..1bd5bdc 100644 --- a/configure.ac +++ b/configure.ac @@ -53,6 +53,7 @@ AC_CHECK_HEADERS([sys/visual_io.h sys/fbio.h machine/fbio.h sun/fbio.h], AM_CONDITIONAL(BUILD_CONSTYPE, [test x$BUILD_CONSTYPE = xyes]) XORG_WITH_LINT +XORG_MANPAGE_SECTIONS XORG_RELEASE_VERSION AC_OUTPUT([Makefile]) diff --git a/constype.man b/constype.man index 4da1e9f..abad85b 100644 --- a/constype.man +++ b/constype.man @@ -2,7 +2,7 @@ .\" $XdotOrg: $ .\" $XFree86$ .\" -.TH CONSTYPE 1 __xorgversion__ +.TH CONSTYPE __appmansuffix__ __xorgversion__ .SH NAME constype \- print type of Sun console .SH SYNOPSIS |