summaryrefslogtreecommitdiff
path: root/web/glasgow/lit2x-0.16/literate/Jmakefile
blob: 09f11b31f3bf57cc0e06a09d701d8b0248146f59 (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
#define IHaveSubdirs

#if IncludeTestDirsInBuild == YES
#define __lit_tests_dir tests
#else
#define __lit_tests_dir /* nothing */
#endif

SUBDIRS =   __lit_tests_dir \
	    info-utils \
	    doc


LitSuffixRule(.lprl,.prl)
LitSuffixRule(.llex,.lex)

/* stuff to have before we get going */
MsubNeededHere(lit2stuff lit-inputter)

/* _must_ use special lit2pgm to re-build the lit2pgm source here */
LIT2PGM = ./lit2pgm.BOOT -Alit2pgm

LIT2PGM_OPTS = -q /* so we go fast; not really necessary (ToDo) */

/* BUILDING STUFF ================================================= */
/****** the driver script "lit2stuff" *******/

/* has host-platform type wired in, so in BIN, not SCRIPT, dir */

/* slam INSTLIBDIR_LITERATE, INSTDATADIR_LITERATE, TMPDIR from Makefile into lit2stuff */
MsubMakefileDependentProgramScriptTarget(PerlCmd,lit2stuff,lit2stuff.prl,/*no flags*/,/*Makefile*/)
/****** the names by which "lit2stuff" may be invoked */
LinkTarget(lit2pgm,lit2stuff)
LinkTarget(lit2texi,lit2stuff)
LinkTarget(lit2latex,lit2stuff)
LinkTarget(mkdependlit,lit2stuff)
LinkTarget(lit2changelog,lit2stuff)
LinkTarget(lit2text,lit2stuff)

/* and the mangled source... */
LitDocRootTargetWithNamedOutput(lit2stuff,lprl,lit2stuff-standalone)

/****** all the support code that is slurped in or fired up by "lit2stuff"
******/

/* these two (lit-deatify & lit-inputter) are executables: */
lit-deatify.c : lit-deatify.lex /* a flex program ... */
	$(RM) lit-deatify.c
	flex -t lit-deatify.lex > lit-deatify.c

BuildPgmFromCFiles(lit-deatify,lit-deatify.o,,)

MsubProgramScriptTarget(PerlCmd,lit-inputter,lit-inputter.prl,/*no flags*/,/**/)

/* LaTeX macros to support the enterprise;
 * not kept in the TeX directories because we want to
 * know where it is so we can be sure to \input the right version
*/
LITDATASTUFF =  lit-2changes.prl \
		lit-2depend.prl \
		lit-2doc-c.prl \
		lit-2doc-hs.prl \
		lit-2doc-jm.prl \
		lit-2doc-lex.prl \
		lit-2doc-none.prl \
		lit-2doc-prl.prl \
		lit-2doc.prl \
		lit-2latex-c.prl \
		lit-2latex-hs.prl \
		lit-2latex-jm.prl \
		lit-2latex-lex.prl \
		lit-2latex-none.prl \
		lit-2latex-prl.prl \
		lit-2latex.prl \
		lit-2pgm-c.prl \
		lit-2pgm-hs.prl \
		lit-2pgm-jm.prl \
		lit-2pgm-lex.prl \
		lit-2pgm-none.prl \
		lit-2pgm-prl.prl \
		lit-2pgm.prl \
		lit-2texi-c.prl \
		lit-2texi-hs.prl \
		lit-2texi-jm.prl \
		lit-2texi-lex.prl \
		lit-2texi-none.prl \
		lit-2texi-prl.prl \
		lit-2texi.prl \
		lit-2text.prl \
		lit-globals.prl \
		lit-link-globals.prl \
		lit-linker.prl \
		lit-reader.prl

AllTarget($(LITDATASTUFF))

litdatastuff : $(LITDATASTUFF)

/* all the rest of the things are built with the default .lprl->.prl rule */

/* INSTALLING STUFF =============================================== */

INSTDATADIR_LITERATE = $(INSTDATADIR)/literate
INSTLIBDIR_LITERATE  = $(INSTDATADIR_LITERATE)/$(HOSTPLATFORM)

MakeDirectories(install, $(INSTBINDIR) $(INSTLIBDIR_LITERATE) $(INSTDATADIR_LITERATE))

InstallMsubbedScriptTarget(PerlCmd,lit2stuff,lit2stuff.prl,$(INSTBINDIR))
InstallLinkTarget(lit2pgm,lit2stuff,$(INSTBINDIR))
InstallLinkTarget(lit2texi,lit2stuff,$(INSTBINDIR))
InstallLinkTarget(lit2latex,lit2stuff,$(INSTBINDIR))
InstallLinkTarget(mkdependlit,lit2stuff,$(INSTBINDIR))
InstallLinkTarget(lit2changelog,lit2stuff,$(INSTBINDIR))
InstallLinkTarget(lit2text,lit2stuff,$(INSTBINDIR))

InstallBinaryTarget(lit-deatify, $(INSTLIBDIR_LITERATE))
InstallScriptTarget(lit-inputter, $(INSTLIBDIR_LITERATE))

InstallDataTarget(lit-style.tex, $(INSTDATADIR_LITERATE))
InstallTarget(litdatastuff)
InstallMultNonExecTargets(litdatastuff, $(LITDATASTUFF), $(INSTDATADIR_LITERATE))

/* OTHER STUFF ==================================================== */
ExtraStuffToClean( lit2stuff.prl li-inputter.prl $(LITDATASTUFF) )

ClearTagsFile()
LITDATA_LPRLS = $(LITDATASTUFF:.prl=.lprl)
PerlTagsTarget( lit2stuff.lprl lit-inputter.lprl $(LITDATA_LPRLS) )
EtagsNeededHere(tags) /* need this to do "make tags" */
CTagsTarget( lit-deatify.lex )
/* LaTeX style file ? */