[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GT] Makefile for TeX conversion
On Wed, 12 Mar 2008, Robert A. Schmied wrote:
fast and low reply as I am on the way out the door for the day. ...
yowza, i'd hate to have caught you early in the morning, when you had
the whole day to ponder on it ;-)
heh -- email gets read once, mebbe, 'round here.
Why bother? -- It is only a 'co' away to replace and it
really clutters the Makefile quite badly; if you wish,
check for latex in the $PATH || die
i'm missing how to mechanize that inside a makefile, but i
like it ...
me neither, too asl to formally 'die'ing; I am not immediately
clear on makefile way to attain the later perl-ism, but as a
makefile expedient this works to address your concern:
@$(LATEX) -v && rm -f *.pdf
i like that $(DEBUG) macro. hadn't come across that yet, it
is slick
It is original to me so far as I know; possibly non-portable
to non- /bin/sh shells [but there are so few of those worth
learning ;) and I forced the latest Makefile to use such.]
PDF content back trivially.
and be rather annoyed having to do so ...
.. an inexpensive lesson that will larn 'em to run scripts
they have not read ;)
only checked for latex and that to avoid removing something the user
really wants to keep unless it can be remade. an alternate would be
to move it aside, and if successfully rebuilt, remove the aside.
"Fail early and loudly" is 'good enuf' for me; starting down
the error detection and recovery path is rejected by me for
the same reason that 'co' is 'good enough'.
but that is making it a mountain when 'latex --version'
solves the problem.
... later
would
# Contributed to GeniusTrader
be accurate, acceptable and appropriate?
as I amended, it would be .. .I dunno that a second copyright
notice has meaning or is accurate there in the proposed
variant.
Also I would limit myself a line under 80 char, as I am of
an older era;
ah! another gray beard -- aloha
Never grey as no beard since college. I learned on these:
http://www.owlriver.com/issa/cs1.PNG
and then moved to ASR-33's -- as a result I typed at 10 CPS
for the longest time.
if one cannot see code or a linebreak indication, one has to make
assumptions about what is out of sight or where a wrap is happening;
assumptions lead to errors
i'm thinking you're running into a unix2mac line termination issue.
original lines ended only with <cr> (0x0d)
naw, but I saw a nasty one at EOF -- my preferred editor makes
lines as long as a tab card, and does not wrap; I run in lots
of 80x24 (glass tty) X terms all day; X is nice for you can
have LOTS of tty's in lots of panels ;)
Current working directory /usr/local/src/genius_trader/Scripts
yikes -- that path!! Building as (or at least properly owned
by) root; /me makes a sign against daemons ;0
line length wise, you will be one unhappy camper when you start
poking around in the perl code ;-)
not really -- perltidy laves a multitude of sin.
http://perltidy.sourceforge.net/
The explicit redefine to 'gmake' is wrong as it destroys
generality
oops -- that one was for my benefit (and those of us
(un)lucky enough to be using a plat with the standard att
make).
a 'plat'? Standard ATT 'make' is still kicking around in any
'in support' OS? Solaris and HP-UX are about it of the old
big iron Unix variants left. ('Chassis badges, we don' need
no ...') and anyone using one of those with a recent 'perl'
installed probably don't need no steenkin' 'gmake' any more.
;)
actually the macro def is a force of habit, probably
unneeded, but not using the $(MAKE) macro in the commands
is, in my opinion, poor makesmanship.
If a 'make' is not in the path, a Makefile is useless anyway;
I don't see that objection.
Welcome to Darwin!
emac:~ herrold$ which gmake
no gmake in /bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/texbin
emac:~ herrold$
... later
That 'help' cruft is beyond fugly
humm -- well as soon as time goes by know one will remember
to hunt down you email and the info will be lost.
*cough* *cough* The only reason for much of this hoop jumping
(and thus the need for 'instructions' at all) is the presence
of the PDF in the VCS, which I think is the wrong place for
it, and about which I commented at the onset ...
further, i really don't like have to read a makefile to
uncover its targets, a little help goes a long way. but if
you've got a better idea i'm all for it.
yeah -- Pull the product (the PDF) out of the VCS ;) Build
the PDF locally, and push updated 'courtesy' copies' into a
website with 'rsync'; or place a copy in a tarbll but, and
extract it from the tarball on the fly when a new one is
rolled, and place it on the website; We follow both
approaches with the 'trading shim'
http://www.trading-shim.org/
but the decision is really properly in the release process
with the tarball roller
_could_ check for, but simply dying early and loudly is enough;
documentation belongs elsewhere.
that kinda-sorta flies in the face of of the perl philosophy:
"pod in the same file" and avoid the multiple file management issue.
Indeed pod can live perfectly well in a 'here' doc contruct
and 'perldoc' handles it just fine (this trick works for shell
scripts). But bury it at the bottom, marked up in proper
perldoc fashion, if you feel the need. fugly .. my eyes, my
eyes ... /me feels for the beach bottle ...
At a minimum, I would make it less unsightly with a 'here'
document when there is nothing but a series of printf
equivalents ;)
ya know, i've tried once or twice (maybe not hard or smart enough)
to get make (gmake) and /bin/sh (not bash) cooperate on a here doc,
but never had much luck -- pointers?
I don't know off the top of my head how to include
such in a Makefile. Interesting question.
-- Russ herrold
#
# Makefile for GT documentation (GT/Docs)
#
# We support building an index in the future, although not yet
# in the early versions
#
# Copyright (c) 2008 R P Herrold <info
AT
owlriver.com>
# This file is distributed under the terms of the General Public License
# version 2 or (at your option) any later version.
# $Id: Makefile,v 1.2 2008/03/13 22:02:15 herrold Exp herrold $
SHELL = /bin/sh
TEXSRC = Writing_an_Indicator_Cookbook
ECHO = echo
GREP = grep
LATEX = latex
RM = rm
TOUCH = touch
DEBUG =
# comment out the next line to debug errors
DEBUG = > /dev/null 2>&1
all: ;
make clean
make docs
make vcs
clean: ;
make vcs
@$(LATEX) -v && rm -f *.pdf
#
# we have to build it twice to get page numbers right for an index
docs: ;
@$(TOUCH) $(TEXSRC).ind $(TEXSRC).idx
@$(LATEX) -interaction=batchmode $(TEXSRC) $(DEBUG)
makeindex $(TEXSRC)
@$(LATEX) -interaction=batchmode $(TEXSRC) $(DEBUG)
dvips $(TEXSRC).dvi -o $(TEXSRC).ps
ps2pdf $(TEXSRC).ps $(TEXSRC).pdf
make vcs
# comment out the 'make vcs' line above to see intermediate build files
#
# we leave the .pdf in the VCS as a courtesy
vcs: ;
@$(RM) -f *.aux *.dvi *.log *.out *.ps *.ind *.ilg *.idx
### EOF
- References:
- [GT] Writing indicators cookbook, Weigert, Thomas (2008/03/07)
- Re: [GT] Writing indicators cookbook, Robert A. Schmied (2008/03/07)
- [GT] Re: gt-d] Writing indicators cookbook, R P Herrold (2008/03/08)
- Re: [GT] Re: gt-d] Writing indicators cookbook, Robert A. Schmied (2008/03/08)
- [GT] TeX conversion; was Writing indicators cookbook, R P Herrold (2008/03/08)
- [GT] Makefile for TeX conversion, R P Herrold (2008/03/12)
- Re: [GT] Makefile for TeX conversion, Robert A. Schmied (2008/03/12)
- [GT] Makefile for TeX conversion, R P Herrold (2008/03/12)
- Re: [GT] Makefile for TeX conversion, Robert A. Schmied (2008/03/13)