Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Make Files

14 views
Skip to first unread message

Gary E. Learned

unread,
Nov 23, 1998, 3:00:00 AM11/23/98
to
Is anyone using 'make' to manage their site building? I've thought
about it a few times, and it seems like it would make sense as far as
building common pages and code includes.

Just a thought,
Ed

Patrick Mueller

unread,
Nov 26, 1998, 3:00:00 AM11/26/98
to
Hi !

Yes, i'm using make for creating my site.
I write all my code by hand with an normal html-editor,
in this html-code i also use a preprocessor, so that i can use
e.g. includes, macros, conditions, etc. and then all the site is
maintained with gnumake.
This way i'm sure, that only the really new pages are made.

If u wanna know more, just contact me.

Many greetinx from germany
Patrick

--
Table-Tennis in the Police Sports Club Karlsruhe e.V.
http://ourworld.compuserve.com/homepages/pepino/psv.htm

Darin McGrew

unread,
Nov 28, 1998, 3:00:00 AM11/28/98
to
Gary E. Learned <lea...@iname.com> wrote:
> Is anyone using 'make' to manage their site building? I've thought
> about it a few times, and it seems like it would make sense as far as
> building common pages and code includes.

Yep. I use makefiles that define

make all run HTML preprocessor to create documents
make valid validate documents (depends on `make all`)
make install install documents (depends on `make validate`)

It works great.
--
Darin McGrew, mcg...@alumni.stanford.org, http://www.rahul.net/mcgrew/

"The man who never makes mistakes never makes much of anything."
-- Waite Phillips

Amit Patel

unread,
Dec 7, 1998, 3:00:00 AM12/7/98
to
lea...@iname.com (Gary E. Learned) writes:

> Is anyone using 'make' to manage their site building? I've thought
> about it a few times, and it seems like it would make sense as far as
> building common pages and code includes.

Yeah, I'm using make and the C pre-processor (!!) for my pages,
although I admit that I'm not really doing a whole lot.

The C preprocessor lets me #include other files, which I use to
provide navigation links at the bottom of each page.

Here's my somewhat icky makefile:

______________________________________________________________________
SHELL = /bin/sh
DEST = $(shell echo *.web | sed -e 's@\.web@\.html@g')
DEPENDENCIES = $(shell echo *.web.h)

all: $(DEST)

%.html: %.web $(DEPENDENCIES)
D=`/usr/5bin/date +"%a %d %h 19%y"`; sed -e "s/'/\&apostrophe;/g" -e "s.//.\&slashslash;.g" $< >/tmp/amitp.webpage; gcc -x c -I . -C -E -P -undef /tmp/amitp.webpage | sed -e "s.&slashslash;.//.g" -e "s/&apostrophe;/'/g" -e "s/&date;/$$D/g" >$@; #rm /tmp/amitp.webpage
chmod a+r $@

simblob_size.dat: simblob.zip
/bin/csh -f ./calc_simblob_size.sh

games.html: games.web $(DEPENDENCIES) simblob_size.dat

interesting.web: interesting.txt
python interesting.py
______________________________________________________________________

Some comments:

DEST figures out what the source files are (*.web) and then changes
their extensions to *.html. Then the 'all' rule says that I want to
make all the html files.

To make a .html file from a .web file, I do some icky stuff:

a. Change apostrophes into &apostrophe; because the
C preprocessor doesn't like them. (It thinks they
are 'c'haracter literals, and wants them in pairs.)

b. Change // (common in URLs!) into &slashslash; because
the C preprocessor treats them as C++ comments, and
removes them. Oops!

c. Run the C preprocessor.

d. Change &slashslash; and &apostrophe; back.

e. Change &date; into the current date & time.

The other rules are specific to my pages. Whenever the downloadable
file (simblob.zip) changes, I want to recompute the size and produce
html to report the size in games.html. games.web will #include
simblob_size.dat. Also, interesting.web is itself generated by
interesting.py, which reads interesting.txt (a text file full of
links).

My pages are at http://www-cs-students.stanford.edu/~amitp/
and the *.web files are readable. Feel free to steal parts of my
Makefile for your own use.

- Amit

--
Amit J Patel, Computer Science Department, Stanford University
``Parkinson's Other Law: Perfection is achieved only
at the point of collapse.''

0 new messages