73 lines
2.8 KiB
Makefile
73 lines
2.8 KiB
Makefile
#
|
|
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
|
|
#
|
|
# Permission to use, copy, modify, distribute, and sell this software and its
|
|
# documentation for any purpose is hereby granted without fee, provided that
|
|
# the above copyright notice appear in all copies and that both that
|
|
# copyright notice and this permission notice appear in supporting
|
|
# documentation.
|
|
#
|
|
# The above copyright notice and this permission notice shall be included
|
|
# in all copies or substantial portions of the Software.
|
|
#
|
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
# IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
# OTHER DEALINGS IN THE SOFTWARE.
|
|
#
|
|
# Except as contained in this notice, the name of the copyright holders shall
|
|
# not be used in advertising or otherwise to promote the sale, use or
|
|
# other dealings in this Software without prior written authorization
|
|
# from the copyright holders.
|
|
#
|
|
|
|
drivermandir = $(DRIVER_MAN_DIR)
|
|
|
|
driverman_PRE = @DRIVER_NAME@.man
|
|
|
|
driverman_DATA = $(driverman_PRE:man=@DRIVER_MAN_SUFFIX@)
|
|
|
|
EXTRA_DIST = @DRIVER_NAME@.man
|
|
|
|
CLEANFILES = $(driverman_DATA)
|
|
|
|
SED = sed
|
|
|
|
# Strings to replace in man pages
|
|
XORGRELSTRING = @PACKAGE_STRING@
|
|
XORGMANNAME = X Version 11
|
|
|
|
MANDEFS = \
|
|
-D__vendorversion__="\"$(XORGRELSTRING)\" \"$(XORGMANNAME)\"" \
|
|
-D__appmansuffix__=$(APP_MAN_SUFFIX) \
|
|
-D__filemansuffix__=$(FILE_MAN_SUFFIX) \
|
|
-D__libmansuffix__=$(LIB_MAN_SUFFIX) \
|
|
-D__miscmansuffix__=$(MISC_MAN_SUFFIX) \
|
|
-D__drivermansuffix__=$(DRIVER_MAN_SUFFIX) \
|
|
-D__adminmansuffix__=$(ADMIN_MAN_SUFFIX) \
|
|
-D__xconfigfile__=xorg.conf \
|
|
-D__xservername__=Xorg
|
|
|
|
# Translate XCOMM into pound sign with sed, rather than passing -DXCOMM=XCOMM
|
|
# to cpp, because that trick does not work on all ANSI C preprocessors.
|
|
# Delete line numbers from the cpp output (-P is not portable, I guess).
|
|
# Allow XCOMM to be preceded by whitespace and provide a means of generating
|
|
# output lines with trailing backslashes.
|
|
# Allow XHASH to always be substituted, even in cases where XCOMM isn't.
|
|
|
|
CPP_SED_MAGIC = $(SED) -e '/^\# *[0-9][0-9]* *.*$$/d' \
|
|
-e '/^\#line *[0-9][0-9]* *.*$$/d' \
|
|
-e '/^[ ]*XCOMM$$/s/XCOMM/\#/' \
|
|
-e '/^[ ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/\#/' \
|
|
-e '/^[ ]*XHASH/s/XHASH/\#/' \
|
|
-e '/\@\@$$/s/\@\@$$/\\/'
|
|
|
|
SUFFIXES = .$(DRIVER_MAN_SUFFIX) .man
|
|
|
|
.man.$(DRIVER_MAN_SUFFIX):
|
|
$(RAWCPP) $(RAWCPPFLAGS) $(MANDEFS) $(EXTRAMANDEFS) < $< | $(CPP_SED_MAGIC) > $@
|
|
|