[Date Index][Thread Index]
[Date Prev][Date Next][Thread Prev][Thread Next]

Placing files




Xose Manoel Ramos writes:
 > Hi!
 > 
 > I just wanted a tip...
 > 
 > When creating web pages using WML... What to do?
 > 
 >   * Mix the .html files in the same directory where the .wml files
 >   are
 > 
 >   * Have the .wml files in one directory, and the .html in other
 > 
 >   * Create test .html files mixed with the .wml, and then move them
 >   to it's own directory
 > 
 > Probably that's not a big deal, but I am just beginning with a few
 > pages, probably in the future this kind of decissions will avoid
 > having a mess.  
 > 

I have a top level directory, that has a makefile. 

I have a src directory, that contains the .wml files, also .cgi files
(some that I run through wml) and also image files.  

I run the image files through interlace and color minimization
filters, to make my page easier for folks to view with slow
connections.

I have a rel directory, that is built and populated by the makefile.

I use mirror to copy my rel directory to my actual web server. I've
modified the mirror script to retain the executable nature of the cgi
scripts.

I use cvs to provide revision control on the Makefile and the src
directory.

This allows me to be certain that what is on my web site can be built
from my source, and that my source can be reclaimed from revision
control.

Tricks in the Makefile are included below.  By ... I mean fill in more
of your file names.

dirs = $(addprefix rel/, img cgi SC ... ) 

WMLOPTS=-q --includefile=../defs.h -DROOT~. 

HTML= index.html company.html news.html  ...
HTMLR:=$(addprefix rel/, $(HTML))
TXT:=   $(addprefix rel/, ChangeLog.txt .htaccess) \
HTMLCGIR :=$(addprefix rel/, cgi/pela.cgi cgi/license.cgi cgi/bug.cgi ) 

# The gifs are run through interlace
GIFS=$(addprefix rel/img/, \
	sfv1logo.gif sfv2logo.gif sfvlogo.gif \
	check.gif ... )
JPGS=$(addprefix rel/img/, newback.jpg ... )
COPYLIST=$(JPGS) $(TXT) $(PASS) $(DATA) $(RELEASES)

# public targets
release: $(dirs) $(COPYLIST) $(GIFS) $(HTMLR) $(HTMLCGIR) 
	@echo "Web pages released"
clean:
	rm -rf rel
install: release
	@echo "installing Mac's released web page"
	mirror -pextwebpage
# workhorse routines
GDEP=defs.h Makefile $(addprefix rel/img/, $(BUTTONGIFS))
$(HTMLR): rel/% : src/% $(GDEP)
	(cd src; wml ../$< $(WMLOPTS) --o ../$@ )
$(HTMLCGIR): rel/% : src/% $(GDEP)
	(cd src; wml ../$< $(WMLOPTS) --o ../$@ )
	chmod 755 $@ 
$(CGI): rel/% : src/% 
	cp $< $@
	chmod 755 $@ 
$(COPYLIST): rel/% : src/% 
	cp -fp $< $@
$(GIFS): rel/% : src/% 
	interlace $< > $@
$(dirs) : 
	-mkdir -m 755 -p $@




______________________________________________________________________
Website META Language (WML)                www.engelschall.com/sw/wml/
Official Support Mailing List                   sw-wml@engelschall.com
Automated List Manager                       majordomo@engelschall.com