summaryrefslogtreecommitdiff
path: root/support/imaketex/X11R5.rules
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /support/imaketex/X11R5.rules
Initial commit
Diffstat (limited to 'support/imaketex/X11R5.rules')
-rw-r--r--support/imaketex/X11R5.rules68
1 files changed, 68 insertions, 0 deletions
diff --git a/support/imaketex/X11R5.rules b/support/imaketex/X11R5.rules
new file mode 100644
index 0000000000..0052fda384
--- /dev/null
+++ b/support/imaketex/X11R5.rules
@@ -0,0 +1,68 @@
+#ifndef XCOMM
+#define XCOMM #
+#endif
+
+XCOMM Imake rules for those without X11R5
+XCOMM
+XCOMM Copyright 1993 Rainer Klute, Dortmund University
+XCOMM <klute@irb.informatik.uni-dortmund.de>
+XCOMM
+XCOMM $Id: X11R5.rules,v 0.96 1993/05/04 15:18:45 klute Exp klute $
+
+#ifdef CppScriptTarget
+#undef CppScriptTarget
+#endif
+
+/*
+ * 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.
+ * Also delete line numbers from the cpp output (-P is not portable, I guess).
+ */
+#ifndef CppSedMagic
+#define CppSedMagic sed -e '/^# *[0-9][0-9]* *.*$$/d' \
+ -e '/^XCOMM$$/s//#/' \
+ -e '/^XCOMM[^a-zA-Z0-9_]/s/^XCOMM/#/'
+#endif /* CppSedMagic */
+
+/*
+ * CppScriptTarget - generate rules to create a shell script by running the
+ * input through cpp. If the ExecableScripts configuration parameter is not
+ * set, then make sure that the first line begins with a colon.
+ */
+#ifndef CppScriptTarget
+#if ExecableScripts /* can use #! instead of colon */
+#define CppScriptTarget(dst,src,defs,deplist) @@\
+dst:: src deplist @@\
+ $(RM) $@ @@\
+ $(CPP) defs <src | CppSedMagic >$@ @@\
+ chmod a+x $@
+#else
+#define CppScriptTarget(dst,src,defs,deplist) @@\
+dst:: src deplist @@\
+ $(RM) $@ @@\
+ echo \: >$@ @@\
+ sed '1d' src | $(CPP) defs | CppSedMagic >>$@ @@\
+ chmod a+x $@
+#endif /* ExecableScripts */
+#endif /* CppScriptTarget */
+
+
+/* if [ -d ] or [ ! -d ] causes make to fail, define this as - */
+#ifndef DirFailPrefix
+#define DirFailPrefix
+#endif
+
+#ifndef MakeDir
+#define MakeDir(dir) DirFailPrefix@if [ -d dir ]; then set +x; \ @@\
+ else (set -x; $(MKDIRHIER) dir); fi
+#endif
+
+/*
+ * InstallNonExecFile - generate rules to install a data file
+ */
+#ifndef InstallNonExecFile
+#define InstallNonExecFile(file,dest) @@\
+install:: file @@\
+ MakeDir($(DESTDIR)dest) @@\
+ $(INSTALL) -c $(INSTDATFLAGS) file $(DESTDIR)dest
+#endif /* InstallNonExecFile */