aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/config/cf/lnxdoc.rules
diff options
context:
space:
mode:
authorReinhard Tartler <siretart@tauware.de>2011-10-10 17:43:39 +0200
committerReinhard Tartler <siretart@tauware.de>2011-10-10 17:43:39 +0200
commitf4092abdf94af6a99aff944d6264bc1284e8bdd4 (patch)
tree2ac1c9cc16ceb93edb2c4382c088dac5aeafdf0f /nx-X11/config/cf/lnxdoc.rules
parenta840692edc9c6d19cd7c057f68e39c7d95eb767d (diff)
downloadnx-libs-f4092abdf94af6a99aff944d6264bc1284e8bdd4.tar.gz
nx-libs-f4092abdf94af6a99aff944d6264bc1284e8bdd4.tar.bz2
nx-libs-f4092abdf94af6a99aff944d6264bc1284e8bdd4.zip
Imported nx-X11-3.1.0-1.tar.gznx-X11/3.1.0-1
Summary: Imported nx-X11-3.1.0-1.tar.gz Keywords: Imported nx-X11-3.1.0-1.tar.gz into Git repository
Diffstat (limited to 'nx-X11/config/cf/lnxdoc.rules')
-rw-r--r--nx-X11/config/cf/lnxdoc.rules145
1 files changed, 145 insertions, 0 deletions
diff --git a/nx-X11/config/cf/lnxdoc.rules b/nx-X11/config/cf/lnxdoc.rules
new file mode 100644
index 000000000..a538920df
--- /dev/null
+++ b/nx-X11/config/cf/lnxdoc.rules
@@ -0,0 +1,145 @@
+XCOMM $XFree86: xc/config/cf/lnxdoc.rules,v 3.27 2003/01/15 03:17:29 dawes Exp $
+XCOMM
+XCOMM Rules for formatting Linuxdoc-SGML documentation
+XCOMM
+
+#include <lnxdoc.tmpl>
+
+#ifdef DontInstallLinuxDoc
+#define LinuxDocInstall(file,dest) /* do nothing */
+#define LinuxDocInstallMultiple(files,dest) /* do nothing */
+#define LinuxDocInstallIfExists(file,dest) /* do nothing */
+#else
+#define LinuxDocInstall(file,dest) InstallNonExecFile(file,dest)
+#define LinuxDocInstallMultiple(files,dest) @@\
+InstallMultipleDest(install,files,dest)
+
+#define LinuxDocInstallIfExists(file,dir) @@\
+install:: @@\
+ MakeDir($(DESTDIR)dir) @@\
+ @if [ -f file ]; then set -x; \ @@\
+ $(INSTALL) $(INSTALLFLAGS) $(INSTDATFLAGS) \ @@\
+ file $(DESTDIR)dir; \ @@\
+ fi
+#endif
+
+/* Version for sgmlfmt */
+
+#if BuildLinuxDocPS
+#define LinuxDocSgmlToPs(sgmlfile,base) @@\
+all:: base.ps PdfTarget(base) @@\
+ @@\
+base.ps: sgmlfile $(SGMLDEPENDS) @@\
+ RemoveFile(_$@ $@) @@\
+ @(BASE=`basename sgmlfile .sgml`;\ @@\
+ set -x;\ @@\
+ RemoveFile($$BASE.ps);\ @@\
+ $(SGMLFMTCMD) -f ps sgmlfile && \ @@\
+ $(MV) $$BASE.ps _$@ && $(MV) _$@ $@) @@\
+ @@\
+LinuxDocInstall(base.ps,$(XFREE86PSDOCDIR)) @@\
+ @@\
+ConvertPsToPdf(base) @@\
+ @@\
+LinuxDocInstallIfExists(base.pdf,$(XFREE86PDFDOCDIR)) @@\
+ @@\
+clean:: @@\
+ RemoveFile(Concat(_,base.ps) base.ps)
+#else
+#define LinuxDocSgmlToPs(sgmlfile,base) /**/
+#endif
+
+#if BuildLinuxDocText
+#define LinuxDocSgmlToText(sgmlfile,textfile) @@\
+AllTarget(textfile) @@\
+ @@\
+textfile: sgmlfile $(SGMLDEPENDS) @@\
+ RemoveFiles(_$@ $@) @@\
+ @(BASE=`basename sgmlfile .sgml`;\ @@\
+ set -x;\ @@\
+ RemoveFile($$BASE.latin1);\ @@\
+ $(SGMLFMTCMD) -f latin1 -b -n sgmlfile && \ @@\
+ $(CVSIDENTFIX) < $$BASE.latin1 | $(XORGIDENTFIX) | $(XFREE86IDENTFIX) > _$@ && $(MV) _$@ $@ && \ @@\
+ RemoveFile($$BASE.latin1)) @@\
+ @@\
+LinuxDocInstall(textfile,$(XFREE86DOCDIR)) @@\
+ @@\
+clean:: @@\
+ @(file=textfile; set -x; RemoveFiles(_$$file $$file))
+#else
+#define LinuxDocSgmlToText(sgmlfile,textfile) /**/
+#endif
+
+#if BuildLinuxDocHtml
+#define LinuxDocSgmlToHtml(sgmlfile,base) @@\
+AllTarget(base.html) @@\
+ @@\
+base.html: sgmlfile $(SGMLDEPENDS) @@\
+ @if [ sgmlfile != base.sgml ]; then $(LN) sgmlfile base.sgml; fi @@\
+ RemoveFiles(base*.html) @@\
+ $(SGMLFMTCMD) -f html base.sgml || RemoveFile($@) @@\
+ @if [ sgmlfile != base.sgml ]; then RemoveFile(base.sgml); fi @@\
+ @@\
+LinuxDocInstallMultiple(base*.html,$(XFREE86HTMLDOCDIR)) @@\
+ @@\
+clean:: @@\
+ RemoveFiles(base*.html)
+#else
+#define LinuxDocSgmlToHtml(sgmlfile,base) /**/
+#endif
+
+/*
+ * Rule for maintainers to use to updated formatted copies of docs in the
+ * source tree. Use with care.
+ */
+
+#ifndef UpdateFormattedDocLong
+#define UpdateFormattedDocLong(textfile,dstdir,dstfile) @@\
+update.docs:: textfile @@\
+ -@if [ -f dstdir/dstfile ]; then \ @@\
+ if [ "$(FORCEUPDATE)" = yes ]; then set -x; \ @@\
+ if [ "$(FOLLOWLINK)" = no ]; then \ @@\
+ $(RM) dstdir/dstfile; \ @@\
+ fi; \ @@\
+ cp textfile dstdir/dstfile; \ @@\
+ echo "" >> dstdir/dstfile; \ @@\
+ echo "\$$XdotOrg\$$" >> dstdir/dstfile; \ @@\
+ else \ @@\
+ $(RM) __tmp1__ __tmp2__; \ @@\
+ fgrep -v "\$$XdotOrg:" textfile > __tmp1__; \ @@\
+ fgrep -v "\$$XdotOrg:" dstdir/dstfile > __tmp2__; \ @@\
+ if diff -B __tmp1__ __tmp2__ > /dev/null 2>&1; then :; \ @@\
+ else set -x; \ @@\
+ if [ "$(FOLLOWLINK)" = no ]; then \ @@\
+ $(RM) dstdir/dstfile; \ @@\
+ fi; \ @@\
+ cp textfile dstdir/dstfile ; \ @@\
+ echo "" >> dstdir/dstfile; \ @@\
+ echo "\$$XdotOrg"": \$$" >> dstdir/dstfile; \ @@\
+ fi; \ @@\
+ fi; \ @@\
+ fi @@\
+ @$(RM) __tmp1__ __tmp2__
+#endif
+
+#ifndef UpdateFormattedDoc
+#define UpdateFormattedDoc(textfile,dstdir) @@\
+UpdateFormattedDocLong(textfile,dstdir,textfile)
+#endif
+
+/*
+ * Avoid using LinuxDocTargetLong with base != sgmlfile because HTML
+ * index generation assumes that base == sgmlfile.
+ */
+#define LinuxDocTargetLong(sgmlfile,textfile,base) @@\
+LinuxDocSgmlToText(sgmlfile,textfile) @@\
+LinuxDocSgmlToHtml(sgmlfile,base) @@\
+LinuxDocSgmlToPs(sgmlfile,base) @@\
+UpdateFormattedDoc(textfile,$(FORMATTEDDIR))
+
+#define LinuxDocReadmeTarget(base) @@\
+LinuxDocTargetLong(base.sgml,ReadmeFile(base),base)
+
+#define LinuxDocTarget(base) @@\
+LinuxDocTargetLong(base.sgml,base,base)
+