summaryrefslogtreecommitdiff
path: root/support/imaketex/X11R5.rules
blob: 0052fda3841cffbfa8a97a1800edb9d30fd0783d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
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 */