diff: add tutorial to WWW page

Fergus Henderson fjh at cs.mu.OZ.AU
Sat Mar 6 03:39:27 AEDT 1999


Estimated hours taken: 0.75

Add Ralph Becket's Mercury tutorial to our WWW page.

w3/news/newsdb.inc:
	Add an item mentioning the Mercury tutorial.

w3/information/include/documentation.inc:
	Add a link to the Mercury tutorial.
	
w3/bin/install_webpages:
	Add code to checkout the `tutorial' directory.

w3/Makefile:
	Add `tutorial' to the list of subdirectories to install.

tutorial/Makefile:
	Add rules for `make clean' and `make install'.

Index: tutorial/Makefile
===================================================================
RCS file: /home/staff/zs/imp/tutorial/Makefile,v
retrieving revision 1.1
diff -u -r1.1 Makefile
--- Makefile	1999/03/05 14:46:34	1.1
+++ Makefile	1999/03/05 16:36:24
@@ -1,21 +1,39 @@
+#-----------------------------------------------------------------------------#
 
-
-
-all: hello-world.html sums-n-things.html lists-n-things.html \
+HTML = hello-world.html sums-n-things.html lists-n-things.html \
 	determinism-etc.html miscellany.html modes-n-insts.html \
 	types-n-things.html name-spaces.html index.html
 
+SRC = src/*.m
 
+#-----------------------------------------------------------------------------#
 
-tgz:
-	(cd ..; tar zcvf tutorial.tgz tutorial)
+all: $(HTML)
+
+html: $(HTML)
 
+install: all
+	[ -n "$(INSTALL_WEBDIR)" ] || {					\
+		echo "You must set INSTALL_WEBDIR before running"	\
+			"make install" 1>&2;				\
+		exit 1;							\
+	}
+	[ -d "$(INSTALL_WEBDIR)/tutorial" ] || \
+		mkdir -p "$(INSTALL_WEBDIR)/tutorial"
+	cp -af $(HTML) $(INSTALL_WEBDIR)/tutorial
 
+clean:
+	rm -f $(HTML)
 
+tgz:
+	(cd ..; tar zcvf tutorial.tgz tutorial)
+
 tar:
 	(cd ..; tar cvf tutorial.tar tutorial; gzip tutorial.tar)
 
+#-----------------------------------------------------------------------------#
 
-
-%.html: %.m4 defs.m4
+%.html: %.m4 defs.m4 $(SRC)
 	sed 's/</\</g; s/^$$/<p>/' $< | m4 | sed 's/^#.*//' > $@
+
+#-----------------------------------------------------------------------------#
Index: w3/Makefile
===================================================================
RCS file: /home/staff/zs/imp/w3/Makefile,v
retrieving revision 1.8
diff -u -r1.8 Makefile
--- Makefile	1998/11/19 07:54:44	1.8
+++ Makefile	1999/03/05 16:26:14
@@ -13,7 +13,7 @@
 	applications.html	\
 	search.html
 
-DIRS=contact download information mailing-lists
+DIRS=contact download information mailing-lists tutorial
 ROOT=.
 
 #-----------------------------------------------------------------------------#
Index: w3/bin/install_webpages
===================================================================
RCS file: /home/staff/zs/imp/w3/bin/install_webpages,v
retrieving revision 1.7
diff -u -r1.7 install_webpages
--- install_webpages	1999/02/25 21:18:31	1.7
+++ install_webpages	1999/03/05 15:36:55
@@ -44,6 +44,7 @@
     # Install the web pages
     #
 cvs update .
+cvs checkout tutorial
 make install
 
     #
Index: w3/information/include/documentation.inc
===================================================================
RCS file: /home/staff/zs/imp/w3/information/include/documentation.inc,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 documentation.inc
--- documentation.inc	1998/09/01 02:41:10	1.1.1.1
+++ documentation.inc	1999/03/05 16:27:00
@@ -6,6 +6,17 @@
 in a4 format.
 <p>
 <ul>
+	<li> <a href="mailto:rwab1 at cam.sri.com">Ralph Becket</a>'s
+	     <strong>Mercury tutorial</strong><br>
+	A beginner's introduction to Mercury.
+	This is still under development. 
+	Feedback would be appreciated.
+	<p>
+
+	Available in
+	<a href="../tutorial/index.html">HTML</a> only.
+	<p>
+
 	<li> <strong>Mercury Language Reference Manual</strong> <br>
 	Information on the Mercury programming language
 	itself, including syntax, types and modes, determinism, 
Index: w3/news/newsdb.inc
===================================================================
RCS file: /home/staff/zs/imp/w3/news/newsdb.inc,v
retrieving revision 1.20
diff -u -r1.20 newsdb.inc
--- newsdb.inc	1999/01/17 13:56:15	1.20
+++ newsdb.inc	1999/03/05 16:25:27
@@ -13,10 +13,17 @@
 ** Make sure you put a comma between each item, and an arrow
 ** between the date and the news.
 ** 
-** ALSO the date's must be distinct.
+** ALSO the dates must be distinct.
 */
 
 $newsdb = array(
+
+"16 Mar 1999" => array("Mercury Tutorial",
+"<a href=\"mailto:rwab1 at cam.sri.com\">Ralph Becket</a>
+has kindly written a
+<A HREF=\"http://www.cs.mu.oz.au/research/mercury/tutorial/index.html\">Mercury Tutorial</A>.  
+This is still under development.  Feedback would be appreciated."
+),
 
 "18 Jan 1999" => array("Coding Challenge - Battleships",
 

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.



More information about the developers mailing list