summaryrefslogtreecommitdiff
path: root/cde.rules
blob: 31504720710c250ce0592e56072b07276b76942f (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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
/* 
 *  @OSF_COPYRIGHT@
 *  COPYRIGHT NOTICE
 *  Copyright (c) 1990, 1991, 1992, 1993, 1998 The Open Group , Inc.
 *  ALL RIGHTS RESERVED (MOTIF). See the file named COPYRIGHT.MOTIF for
 *  the full copyright text.
 *
 * (c) Copyright 1996 Digital Equipment Corporation.
 * (c) Copyright 1996 Hewlett-Packard Company.
 * (c) Copyright 1996 International Business Machines Corp.
 * (c) Copyright 1996 Sun Microsystems, Inc.
 * (c) Copyright 1996 Novell, Inc. 
 * (c) Copyright 1996 FUJITSU LIMITED.
 * (c) Copyright 1996 Hitachi.
 */ 
XCOMM $Xorg: cde.rules,v 1.3 2000/08/17 19:41:47 cpqbld Exp $

/* Note whether we are the top level project. */
#ifndef SeenTopLevelProject
# define SeenTopLevelProject	YES
# define CDEIsTopLevelProject	YES
#else
# define CDEIsTopLevelProject	NO
#endif

/* Include the Motif project rules file. */
#include <Motif.rules>


/* Use the in-tree CDE by default. */
#ifndef UseInstalledCDE
# define UseInstalledCDE	NO
#endif
#ifdef UseInstalled
# undef UseInstalledCDE
# define UseInstalledCDE	YES
#endif

#ifndef ImportCDE
# ifdef UseImports
#  define ImportCDE		YES
# else
#  define ImportCDE		NO
# endif
#endif
#if UseInstalledCDE
# undef ImportCDE
# define ImportCDE		NO
#endif

/* If CDE has a different ProjectRoot we need to search the regular ones too. */
#ifdef CDEProjectRoot
# define CUsrLibDirPath	Concat(MUsrLibDirPath,:$(CDEPROJECTROOT)/lib)
#else
# define CUsrLibDirPath	MUsrLibDirPath
#endif
#ifdef UsrLibDirPath
# undef UsrLibDirPath
#endif
#define UsrLibDirPath	CUsrLibDirPath

#if ImportCDE
# define CLdPreLibs	-L$(CDELIBSRC)
#elif defined(UseInstalledCDE) && defined(CDEProjectRoot)
# define CLdPreLibs	-L$(CDEPROJECTROOT)/lib
#else
# define CLdPreLibs	/**/
#endif
#ifdef LdPreLibs
# undef LdPreLibs
#endif
#define LdPreLibs	LdPreLib CLdPreLibs MLdPreLibs XLdPreLibs

#ifdef CDEProjectRoot
# define CLdPostLibs	-L$(CDEPROJECTROOT)/lib
#else
# define CLdPostLibs	/**/
#endif
#ifdef LdPostLibs
# undef LdPostLibs
#endif
#define LdPostLibs	LdPostLib CLdPostLibs MLdPostLibs XLdPostLibs

#ifdef TopIncludes
# undef TopIncludes
#endif
#define TopIncludes	TopInclude $(TOP_CDE_INCLUDES) $(TOP_MOTIF_INCLUDES) $(TOP_X_INCLUDES)

#if UseInstalledCDE && defined(CDEProjectRoot)
# define CDEBuildLibPath	$(CDEPROJECTROOT)/lib
#elif UseInstalledCDE
# define CDEBuildLibPath	$(USRLIBDIR)
#elif ImportCDE
# define CDEBuildLibPath	$(CDELIBSRC)
#else
# define CDEBuildLibPath	$(TOP)/exports/lib
#endif
#ifdef BuildLibPath
# undef BuildLibPath
#endif
#ifdef SystemBuildLibPath
# define BuildLibPath		\
$(DTENVLIBDIR):$(MOTIFENVLIBDIR):$(XENVLIBDIR):$(SYSTEMENVLIBDIR)
#else
# define BuildLibPath		$(DTENVLIBDIR):$(MOTIFENVLIBDIR):$(XENVLIBDIR)
#endif


#ifndef CdeInstallationTop
# define CdeInstallationTop	/usr/dt
#endif
#ifndef CdeConfigurationTop
# define CdeConfigurationTop	/etc/dt
#endif
#ifndef CdeLogFilesTop
# define CdeLogFilesTop		/var/dt
#endif
#ifndef CdeUserTop
# define CdeUserTop		.dt
#endif

#ifndef CdeProjectDefines
# define CdeProjectDefines	\
	-DANSICPP -DMULTIBYTE -DNLS16 \
	-DOSMAJORVERSION=OSMajorVersion -DOSMINORVERSION=OSMinorVersion
#endif
#ifdef ProjectDefines
# undef ProjectDefines
#endif
#define ProjectDefines	X11ProjectDefines MotifProjectDefines CdeProjectDefines

#ifndef CdeCplusplusProjectDefines
# define CdeCplusplusProjectDefines	CdeProjectDefines
#endif
#ifdef CplusplusProjectDefines
# undef CplusplusProjectDefines
#endif
#define CplusplusProjectDefines	\
	X11CplusplusProjectDefines MotifCplusplusProjectDefines CdeCplusplusProjectDefines

/*
 * Doc build rules
 */

/*
 * MakeSdlVolume - generate rules to create an SDL volume, in the specified
 * directory, from an SGML source doc.
 * Note: the volume name must match the directory name.
 */
#ifndef MakeSdlVolume
#define MakeSdlVolume(vol,dir,env,opts,dep)				@@\
all:: dir/vol.sdl							@@\
									@@\
dir/vol.sdl: dep							@@\
	MakeDir(dir)							@@\
	env $(DTDOCBOOK) $(DTDOCBOOKOPTIONS) opts -o dir/vol.sdl vol/book.sgm	@@\
									@@\
clean::									@@\
	$(RM) dir/vol.sdl vol/book.log
#endif

/*
 * MakeTocFile - generate rules to create an SGML TOC file.
 * Note: the volume name must match the directory name.
 */
#ifndef MakeTocFile
#define MakeTocFile(vol,env,opts,ttle,ident,dep)					@@\
all:: vol/TOC.sgm							@@\
									@@\
vol/TOC.sgm: dep							@@\
	MakeDir($(DTINFOGENTMPDIR))					@@\
	env $(DTINFOGEN) tocgen -T $(DTINFOGENTMPDIR) $(DTINFOGENOPTIONS) opts -f vol/TOC.sgm -id ident -title ttle vol/book.sgm	@@\
									@@\
clean::									@@\
	$(RM) vol/TOC.sgm
#endif

#ifndef MakeTocFile3
#define MakeTocFile3(vol,env,opts,ttle,ident,dep1,dep2,dep3)			@@\
all:: vol/TOC.sgm							@@\
									@@\
vol/TOC.sgm: dep1							@@\
vol/TOC.sgm: dep2							@@\
vol/TOC.sgm: dep3							@@\
	MakeDir($(DTINFOGENTMPDIR))					@@\
	env $(DTINFOGEN) tocgen -T $(DTINFOGENTMPDIR) $(DTINFOGENOPTIONS) opts -f vol/TOC.sgm -id ident -title ttle vol/book.sgm	@@\
									@@\
clean::									@@\
	$(RM) vol/TOC.sgm
#endif

/*
 * TocFileDep - generate TOC file dependency rule
 */
#ifndef TocFileDep
#define TocFileDep(vol,dep)						@@\
vol/TOC.sgm: dep
#endif

/*
 * MakeInfolib - generate rules to create an infolib.
 */
#ifndef MakeInfolib
#define MakeInfolib(infolib,bkcase,env,opts,dep)			@@\
all:: infolib/bkcase/dtsearch/dtsearch.ocf				@@\
									@@\
infolib/bkcase/dtsearch/dtsearch.ocf: dep				@@\
	MakeDir($(DTINFOGENTMPDIR))					@@\
	MakeDir(infolib)						@@\
	env $(DTINFOGEN) build -T $(DTINFOGENTMPDIR) $(DTINFOGENOPTIONS) opts -l infolib bookcase.bc
#endif

/*
 * InfolibDep - generate infolib dependency rule - Highly depending on MMDB!
 */
#ifndef InfolibDep
#define InfolibDep(infolib,bkcase,dep)					@@\
infolib/bkcase/dtsearch/dtsearch.ocf: dep
#endif

#ifndef InfolibDep3
#define InfolibDep3(infolib,bkcase,dep1,dep2,dep3)			@@\
infolib/bkcase/dtsearch/dtsearch.ocf: dep1				@@\
infolib/bkcase/dtsearch/dtsearch.ocf: dep2				@@\
infolib/bkcase/dtsearch/dtsearch.ocf: dep3
#endif