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

Re: cvs development



>>>>> Gregory Leblanc <GLeblanc@cu-portland.edu> writes:

> Ah, yeah, I see your point.  This does pose some dificulties to what
> we were thinking the other day.  The plan was to have the CVS
> read/write repository hosted by Serek in Poland, and for metalab to
> mirror that nightly.  The scripts were to be run on metalab, and not
> on Serek's server.  If things were to be set up this way, then it
> would be impossible to have the scripts create the output on CVS
> commits.

I think the build-on-commit model is nicer in terms of total
computation, but it does mean that somone who does checkout to mirror
the thing (ie, the obvious method), will not be guaranteed the correct
results, at least for my bizzare document.

I think what I'll do is eliminate my difficulty by dual-versioning my
HOWTO.  I'll have a version for the document, plus a separate
versioned list-o-printers as one section.  I'll just setup a cron job
to periodically checkin a new sgml snippet version of the
list-o-printers, and that's that.

> If we want to process documents when they're committed to CVS, then
> that has to be done on the CVS server, and not on a read-only
> mirror.  This will sifignantly increase the ammount of data that's
> going from Serek's server to metalab once a day.

I'm not worth these problems; I'll change my versioning scheme as
described above.

> I don't know if that's a problem or not, but it is something to
> think about.  Are there any volunteers to write the Makefiles that
> will be needed to process documents when they're committed to CVS?

I can offer my existing makefile as a starting point.  I've cleaned
this up a bit to be more generic; the whole EXTRA mechanism is rather
half-basked at the moment but would be straightforward to extend to
handle figures.

Note that this does an "evil" checkout when you do make install; this
*destroys* the $...$ RCS tags, replacing $Version$ with only the
version number and so on for $Date$ as well.  This results in 
presentable output, but you can't edit or check the document back in
because it's mangled.  I only do make install from my CVS commit
handler, with this somewhat poor script:

------- "install_module" ---------
#! /bin/sh

cd /tmp
mkdir work.$$
cd work.$$

cvs co $1
cd $1
make install
cd /tmp/work.$$
yes | cvs release -d $1
cd /tmp
rm -rf work.$$

For clarification, we should change the target to "automagicbuild" or
something no human would run.

Here's a makefile.  Note that I've edited it somewhat for increased
generality, but not tested it since those edits.  My mailer also
religiously detabs things, although I think I was careful to explicity
tabify this properly.  Basically all the indented-seeming lines need
real tabs at the front...

------- "makefile" ---------
# The basename of your sgml file
# 
NAME=pht
INSTALLDIR=/home/gtaylor/public_html/pht/current

LDP=ldp-submit@lists.linuxdoc.org
TRANS=jeanne@mbox.kyoto-inet.or.jp roman.maurer@hermes.si henryjen@mail.net.tw chmoreira@yahoo.com

# tadokoro@ask.or.jp   Japanese?

# extra files that the results depend on.  
EXTRA=printers.sgml

# The extra macro can have various common include types handled for
# all output types.  Ie, the pdf version can depend on every name in
# EXTRA ending in .fig ith the ending changed to .pdf; this then will
# invoke rules to turn fig into eps and eps into pdf.  Etc...


# BEGIN stuff that ought to be in an included file so you can change
#       it or everyone as we go

# default target for `make', a combination of ps, html, txt, or dvi
#
all: ps html txt dvi

everything: co ps dvi html txt

##################################################
#
# You shouldn't need to change anything below here
#
##################################################
#
# shortcut targets
#
# funky evil checkout...
co: 
	(cd .. ; cvs co -kv pht/src.sgml)

html: $(NAME).html

ps: $(NAME).ps

dvi: $(NAME).dvi

txt: $(NAME).txt

ascii: $(NAME).txt

clean: 
	rm -f $(NAME).ps *.html $(NAME).txt *~ *.log *.dvi \
		$(NAME).aux $(NAME).tex $(NAME).toc \
		$(EXTRA) \
		pht.sgml


%.ps: %.sgml $(EXTRA)
	sgml2latex -o ps $<

%.dvi: %.sgml $(EXTRA)
      	sgml2latex -o dvi $<

%.txt: %.sgml $(EXTRA)
	sgml2txt -f $<

%.html: %.sgml $(EXTRA)
	sgml2html $<

# END stuff that ought to be in an included file so you can change
#     it or everyone as we go

# This is all particular to my howto
# The install rule, in particular, should come from the "standard"
# rules included from elsewhere.

pht.sgml: src.sgml printers.sgml
	./embed src.sgml > pht.sgml

printers.sgml: distill_printers
	./distill_printers > printers.sgml

install: everything
	rm -f $(INSTALLDIR)/$(NAME).sgml
	cp $(NAME).sgml *.html $(NAME).dvi $(NAME).ps printers.sgml\
		$(INSTALLDIR)
	cat -s $(NAME).txt > $(INSTALLDIR)/$(NAME).txt
	/usr/bin/mail -s "New version of the Printing-HOWTO" $(LDP) < \
		$(INSTALLDIR)/$(NAME).sgml
	/usr/bin/mail -s "New version of the Printing-HOWTO" $(TRANS) < \
		$(INSTALLDIR)/$(NAME).sgml

# Other fun rules for pdftex and XFig figures
%.pdf: %.eps
	epstopdf $< --outfile=$@

%.eps: %.fig
	fig2dev -L eps $< $@

--
Grant Taylor - gtaylor@picante.com - http://www.picante.com/~gtaylor/
    Linux Printing HOWTO:  http://www.picante.com/~gtaylor/pht/


--  
To UNSUBSCRIBE, email to ldp-discuss-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org