File: makefile.html

package info (click to toggle)
hsc 0.916-2
  • links: PTS
  • area: main
  • in suites: hamm, slink
  • size: 2,584 kB
  • ctags: 2,277
  • sloc: ansic: 17,375; makefile: 396
file content (125 lines) | stat: -rw-r--r-- 4,819 bytes parent folder | download
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE>hsc - Project Management - Makefile</TITLE>
<LINK REV="owns" TITLE="Thomas Aglassinger" HREF="mailto:agi@giga.or.at">
<LINK REL="Next" HREF="hscdepp.html">
<LINK REL="Copyright" HREF="../copy.html">
<LINK REL="Previous" HREF="make.html">
<META name="ROBOTS" content="NOINDEX, NOFOLLOW">
</HEAD>
<BODY>
<A HREF="../index.html"><IMG SRC="../image/main.gif" ALT="Contents" ALIGN="middle" WIDTH="70" HEIGHT="16"></A>
<IMG SRC="../image/noindex.gif" ALT="-----" ALIGN="middle" WIDTH="70" HEIGHT="16">
<A HREF="../copy.html"><IMG SRC="../image/copy.gif" ALT="Copyright" ALIGN="middle" WIDTH="70" HEIGHT="16"></A>
<A HREF="index.html"><IMG SRC="../image/back.gif" ALT="Up" ALIGN="middle" WIDTH="70" HEIGHT="16"></A>
<A HREF="make.html"><IMG SRC="../image/prev.gif" ALT="Previous" ALIGN="middle" WIDTH="70" HEIGHT="16"></A>
<A HREF="hscdepp.html"><IMG SRC="../image/next.gif" ALT="Next" ALIGN="middle" WIDTH="70" HEIGHT="16"></A>
<HR>
<H1>Makefile</H1>
Inside the <I>starter-project</I>-drawer, you can find an rather empty
<A HREF="../../starter-project/source/Makefile"><I>Makefile</I></A>
to be used for new projects. This will be a short explanation
of the symbols and rules defined in this <I>Makefile</I>.
<H2>Symbols</H2>

<PRE>
DESTDIR =/docs/
IGNORE  =ign=46
PRJFILE =hsc.project
STDINC  =inc/my_macros.hsc
HSCMISC =rplcent
</PRE>
<P><CODE>DESTDIR</CODE> describes the destination-directory for your
html-objects and is relative to the path where you invoke <KBD>make</KBD> (and
usually your hsc-sources are located, too). <CODE>IGNORE</CODE>
specifies which messages should be ignored,
<CODE>PRJFILE</CODE> is the project-file to be used both by <KBD>hsc</KBD> and
<KBD>hscdepp</KBD>. <CODE>STDINC</CODE> specifies include-files which should
be processed within the command-call invoking <KBD>hsc</KBD> from the
<I>Makefile</I>; these files will be included for all hsc-sources.
<CODE>HSCMISC</CODE> contains all other options and switches that
should be passed to <KBD>hsc</KBD>.</P>

<PRE>
HSC     =hsc
HSCFLAGS=$(HSCMISC) $(IGNORE) prjfile=$(PRJFILE) to=$(DESTDIR) $(STDINC)
</PRE>
<P><CODE>HSC</CODE> is the command to be used to invoke <KBD>hsc</KBD>; if it isn't
already in your search-path, you can also enter the full path here.
<CODE>HSCFLAGS</CODE> is computed from the values above and contains
all parameters for <KBD>hsc</KBD>, exept the main hsc-source.</P>

<PRE>
HSCDEPP =hscdepp
</PRE>
<P>This is the command to be used to invoke <KBD>hscdepp</KBD>.</P>
<H2>Rules</H2>
<PRE>
$(DESTDIR)%.html : %.hsc
        $(HSC) $(HSCFLAGS) $&lt;
</PRE>
<P>This is a pattern rule that will create a html-object in
<CODE>DESTDIR</CODE> using the corresponding hsc-source and the
options you specified above. The automatic variable
"<CODE>$&lt;</CODE>" contains the name of the first dependency,
normally this is the main hsc-source.</P>

<PRE>
depend :
        $(HSCDEPP) file=Makefile prjfile=$(PRJFILE) verbose
</PRE>
<P>This rule will invoke <KBD>hscdepp</KBD> and update your dependencies; this
will modify your <I>Makefile</I>.</P>

<PRE>
NEW :
        $(HSC) $(HSCFLAGS) $(INCLUDE) from=$(FILE)
</PRE>
<P>This rule can be useful to add new files to the project. You can
also use it to change the include-dependencies of an already existing
file. This just updates the project-file, but not the <I>Makefile</I>, so
make sure to invoke <KBD>make depend</KBD> afterwards.</P>
<P>For example, you could use</P>

<PRE>
       make NEW FILE=newfile.hsc
</PRE>
<P>to add <I>newfile.hsc</I> to the project.</P>
<H2>Pre- And Post Processing</H2>
<P>A fine thing about the pattern rule used above to create your
html-object is that it can be extended to do several things
before or after <KBD>hsc</KBD> performes its task.</P>
<P>For example, extending it to</P>

<PRE>
$(DESTDIR)%.html : %.hsc
        $(HSC) $(HSCFLAGS) $&lt;
        chmod 644 $@
</PRE>
<P>will make sure that the file-permission-bits are set to the usual
value required by w3-documents. This, of course, works only for
Unixoid systems.</P>
<P>If you are using AmigaOS and have AWeb running, you can use</P>

<PRE>
$(DESTDIR)%.html : %.hsc
        $(HSC) $(HSCFLAGS) $&lt;
        rx SendBrowser.rexx $@
</PRE>
<P>to immediately display updated documents in your browser. The
Rexx-Script <A
HREF="../../grafflwerk/SendBrowser.rexx">SendBrowser.rexx</A> can be
found in the <I>grafflwerk</I>-drawer of the hsc-archive.</P>
<P>You can also use a better syntax checker than <KBD>hsc</KBD> on your newly
created document:</P>

<PRE>
$(DESTDIR)%.html : %.hsc
        $(HSC) $(HSCFLAGS) $&lt;
        CheckHTLM $@
</PRE>
<P>Note that errors found during the second check are reported from
the html object and might be a bit difficult to backtrace in the hsc
source.</P>
</BODY></HTML>