From ca64aab609c3585234410cd8d908f8e1efe5c788 Mon Sep 17 00:00:00 2001 From: Kevin E Martin Date: Tue, 27 Sep 2005 14:09:31 +0000 Subject: [PATCH] Add build system for building docs and fix setuid issues. Add build system for sgml docs. --- ChangeLog | 12 ++++++++ configure.ac | 23 ++++++++++++++- hw/dmx/Makefile.am | 6 +++- hw/dmx/doc/Makefile.am | 52 +++++++++++++++++++++++++++++++++ hw/xfree86/Makefile.am | 10 +++++-- hw/xfree86/doc/Makefile.am | 1 + hw/xfree86/doc/sgml/Makefile.am | 52 +++++++++++++++++++++++++++++++++ 7 files changed, 152 insertions(+), 4 deletions(-) create mode 100644 hw/dmx/doc/Makefile.am create mode 100644 hw/xfree86/doc/Makefile.am create mode 100644 hw/xfree86/doc/sgml/Makefile.am diff --git a/ChangeLog b/ChangeLog index 0f030a9ab..48a281044 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2005-09-27 Kevin E. Martin + + * configure.ac: + Add build system for building docs and fix setuid issues. + + * hw/dmx/Makefile.am: + * hw/dmx/doc/Makefile.am: + * hw/xfree86/Makefile.am: + * hw/xfree86/doc/Makefile.am: + * hw/xfree86/doc/sgml/Makefile.am: + Add build system for sgml docs. + 2005-09-26 Alan Coopersmith * configure.ac: diff --git a/configure.ac b/configure.ac index 7411a6e7c..db6b5c130 100644 --- a/configure.ac +++ b/configure.ac @@ -317,6 +317,9 @@ AC_ARG_WITH(xkb-output, [ --with-xkb-output=PATH ], AC_ARG_WITH(rgb-path, [ --with-rgb-path=PATH ], [ RGBPATH="$withval" ], [ RGBPATH="${datadir}/X11/rgb" ]) +AC_ARG_ENABLE(builddocs, [ --enable-builddocs ], + [BUILDDOCS=$enableval], + [BUILDDOCS=no]) dnl Extensions. AC_ARG_ENABLE(composite, [ --disable-composite ], [COMPOSITE=$enableval], [COMPOSITE=yes]) @@ -350,6 +353,7 @@ AC_ARG_ENABLE(install-setuid, AS_HELP_STRING([--enable-install-setuid], [Install Xorg server as owned by root with setuid bit (default: auto)]), [SETUID=$enableval], [SETUID=auto]) +AC_MSG_CHECKING([to see if we can install the Xorg server as root]) if test "x$SETUID" = "xauto" ; then case $host_os in darwin*) SETUID="no" ;; @@ -359,7 +363,13 @@ if test "x$SETUID" = "xauto" ; then *) SETUID="yes" ;; esac esac + if test "x$SETUID" = xyes; then + touch testfile + chown root testfile > /dev/null 2>&1 || SETUID="no" + rm -f testfile + fi fi +AC_MSG_RESULT([$SETUID]) AM_CONDITIONAL(INSTALL_SETUID, [test "x$SETUID" = "xyes"]) dnl Issue an error if xtrans.m4 was not found and XTRANS_CONNECTION_FLAGS macro @@ -385,6 +395,14 @@ if test "x$INT10" = xyes; then AC_CHECK_HEADERS([sys/vm86.h sys/io.h]) fi +dnl Handle building documentation +AM_CONDITIONAL(BUILDDOCS, test "x$BUILDDOCS" = xyes) +if test "x$BUILDDOCS" = xyes; then + dnl Only build sgml docs when linuxdoc is available + AC_PATH_PROG(LINUXDOC, linuxdoc) +fi +AM_CONDITIONAL(BUILDSGMLDOCS, test "x$LINUXDOC" != x) + dnl --------------------------------------------------------------------------- dnl Extension section dnl --------------------------------------------------------------------------- @@ -852,7 +870,7 @@ if test "x$XORG" = xyes; then AC_DEFINE(__XSERVERNAME__, "Xorg", [Name of X server]) # XXX HACK! if anyone cares about elfloader in 7.0 you need to # XXX do something smarter here. - AC_DEFINE(DLOPEN_HACK, 1, [Prefer dlloader modules to elfloader]) + AC_DEFINE(DLOPEN_HACK, 1, [Prefer dlloader modules to elfloader]) AC_DEFINE(DLOPEN_SUPPORT, 1, [Use libdl-based loader]) AC_DEFINE(WITH_VGAHW, 1, [Building vgahw module]) AC_DEFINE(DRIVERS, {}, [Built-in output drivers (none)]) @@ -1089,6 +1107,8 @@ hw/xfree86/common/xf86Build.h hw/xfree86/ddc/Makefile hw/xfree86/dixmods/Makefile hw/xfree86/dixmods/extmod/Makefile +hw/xfree86/doc/Makefile +hw/xfree86/doc/sgml/Makefile hw/xfree86/dri/Makefile hw/xfree86/dummylib/Makefile hw/xfree86/exa/Makefile @@ -1124,6 +1144,7 @@ hw/xfree86/utils/scanpci/Makefile hw/xfree86/utils/xorgcfg/Makefile hw/xfree86/utils/xorgconfig/Makefile hw/dmx/config/Makefile +hw/dmx/doc/Makefile hw/dmx/input/Makefile hw/dmx/glxProxy/Makefile hw/dmx/Makefile diff --git a/hw/dmx/Makefile.am b/hw/dmx/Makefile.am index 046580567..951489b85 100644 --- a/hw/dmx/Makefile.am +++ b/hw/dmx/Makefile.am @@ -1,4 +1,4 @@ -DIST_SUBDIRS = input config glxProxy +DIST_SUBDIRS = input config glxProxy doc SUBDIRS = input config bin_PROGRAMS = Xdmx @@ -14,6 +14,10 @@ GLX_SRCS = $(PANORAMIX_SRCS) dmx_glxvisuals.c dmx_glxvisuals.h GLX_INCS = -I$(top_srcdir)/hw/xfree86/dixmods/extmod endif +if BUILDDOCS +SUBDIRS += doc +endif + Xdmx_SOURCES = dmx.c \ dmxcb.c \ dmxcb.h \ diff --git a/hw/dmx/doc/Makefile.am b/hw/dmx/doc/Makefile.am new file mode 100644 index 000000000..f921795af --- /dev/null +++ b/hw/dmx/doc/Makefile.am @@ -0,0 +1,52 @@ +# Copyright 2005 Red Hat, Inc. +# +# 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, and that the name of Red Hat +# not be used in advertising or publicity pertaining to distribution +# of the software without specific, written prior permission. Red +# Hat makes no representations about the suitability of this software +# for any purpose. It is provided "as is" without express or implied +# warranty. +# +# RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN +# NO EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR +# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +# OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, +# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +# CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +SGML_FILES = dmx.sgml scaled.sgml + +TXT_FILES = $(SGML_FILES:%.sgml=%.txt) +PS_FILES = $(SGML_FILES:%.sgml=%.ps) +PDF_FILES = $(SGML_FILES:%.sgml=%.pdf) +HTML_FILES = $(SGML_FILES:%.sgml=%.html) + +SUFFIXES = .sgml .txt .html .ps .pdf + +if BUILDSGMLDOCS +.sgml.txt: + @rm -f $@ + GROFF_NO_SGR= $(LINUXDOC) -B txt $^ + +.sgml.ps: + @rm -f $@ + $(LINUXDOC) -B latex --papersize=letter --output=ps $^ + +.sgml.pdf: + @rm -f $@ + $(LINUXDOC) -B latex --papersize=letter --output=pdf $^ + +.sgml.html: + @rm -f $@ + $(LINUXDOC) -B html --split=0 $^ + +noinst_DATA = $(TXT_FILES) $(PS_FILES) $(PDF_FILES) $(HTML_FILES) +CLEANFILES = $(PS_FILES) $(PDF_FILES) $(HTML_FILES) +endif + +EXTRA_DIST = $(SGML_FILES) $(TXT_FILES) diff --git a/hw/xfree86/Makefile.am b/hw/xfree86/Makefile.am index 490d2d41e..ffe24f5f7 100644 --- a/hw/xfree86/Makefile.am +++ b/hw/xfree86/Makefile.am @@ -2,14 +2,20 @@ if DRI DRI_SUBDIR = dri endif +if BUILDDOCS +DOC_SUBDIR = doc +endif + + SUBDIRS = common ddc dummylib i2c x86emu int10 fbdevhw os-support parser rac \ ramdac shadowfb vbe vgahw xaa xf1bpp xf4bpp xf8_16bpp \ - xf8_32bpp xf8_32wid loader scanpci dixmods exa $(DRI_SUBDIR) utils + xf8_32bpp xf8_32wid loader scanpci dixmods exa $(DRI_SUBDIR) utils \ + $(DOC_SUBDIR) DIST_SUBDIRS = common ddc dummylib i2c x86emu int10 fbdevhw os-support \ parser rac ramdac shadowfb vbe vgahw xaa xf1bpp xf4bpp \ xf8_16bpp xf8_32bpp xf8_32wid loader scanpci dixmods dri exa \ - utils + utils doc bin_PROGRAMS = Xorg diff --git a/hw/xfree86/doc/Makefile.am b/hw/xfree86/doc/Makefile.am new file mode 100644 index 000000000..a474b3994 --- /dev/null +++ b/hw/xfree86/doc/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = sgml diff --git a/hw/xfree86/doc/sgml/Makefile.am b/hw/xfree86/doc/sgml/Makefile.am new file mode 100644 index 000000000..b9817d959 --- /dev/null +++ b/hw/xfree86/doc/sgml/Makefile.am @@ -0,0 +1,52 @@ +# Copyright 2005 Red Hat, Inc. +# +# 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, and that the name of Red Hat +# not be used in advertising or publicity pertaining to distribution +# of the software without specific, written prior permission. Red +# Hat makes no representations about the suitability of this software +# for any purpose. It is provided "as is" without express or implied +# warranty. +# +# RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN +# NO EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR +# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +# OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, +# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +# CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +SGML_FILES = DESIGN.sgml + +TXT_FILES = $(SGML_FILES:%.sgml=%.txt) +PS_FILES = $(SGML_FILES:%.sgml=%.ps) +PDF_FILES = $(SGML_FILES:%.sgml=%.pdf) +HTML_FILES = $(SGML_FILES:%.sgml=%.html) + +SUFFIXES = .sgml .txt .html .ps .pdf + +if BUILDSGMLDOCS +.sgml.txt: + @rm -f $@ + GROFF_NO_SGR= $(LINUXDOC) -B txt $^ + +.sgml.ps: + @rm -f $@ + $(LINUXDOC) -B latex --papersize=letter --output=ps $^ + +.sgml.pdf: + @rm -f $@ + $(LINUXDOC) -B latex --papersize=letter --output=pdf $^ + +.sgml.html: + @rm -f $@ + $(LINUXDOC) -B html --split=0 $^ + +noinst_DATA = $(TXT_FILES) $(PS_FILES) $(PDF_FILES) $(HTML_FILES) +CLEANFILES = $(PS_FILES) $(PDF_FILES) $(HTML_FILES) +endif + +EXTRA_DIST = $(SGML_FILES) $(TXT_FILES)