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

Re: [GT] Makefile for TeX conversion



R P Herrold wrote:
On Wed, 12 Mar 2008, Robert A. Schmied wrote:

thanks for that work -- i tweaked it a bit to better suit my non-linux platform, hopefully making it a bit more adaptable to other plats as well. also hopefully added a bit of user-self protection by aborting before removing *.pdf if there isn't a latex found.


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 ;-)


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 ...

i like that $(DEBUG) macro. hadn't come across that yet, it is slick


A user who can get a VCS retrieval working in the first place can get the PDF content back trivially.

and be rather annoyed having to do so ...


Beyond that we would be on a fool's errand to try to check for each and every needed binary here; that _may_ be a job for an autotools setup, which would then need to pick up a Makefile.in

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.

but that is making it a mountain when 'latex --version' solves the problem.


The copyright related addition is simply wrong,
"# Based on and for GeniusTrader (C) 2000-2002 Rapha?? Hertzog, Fabien Fulhaber" as my offered makefile was based on nothing but new content of my own creation.

sorry -- that was an automato and will be corrected

would
# Contributed to GeniusTrader (C) 2000-2002 Raphaël Hertzog, Fabien Fulhaber
be accurate, acceptable and appropriate?


Also I would limit myself a line under 80 char, as I am of an older era;

ah! another gray beard -- aloha

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)
with the untweaked version i kept getting
%     gmake -f ../GT/Docs/Makefile
make clean ; make docs ; make vcs
make: Fatal error in reader: makefile, line 3: Unexpected end of line seen
Current working directory /usr/local/src/genius_trader/Scripts
make: Fatal error in reader: makefile, line 3: Unexpected end of line seen
Current working directory /usr/local/src/genius_trader/Scripts
make: Fatal error in reader: makefile, line 3: Unexpected end of line seen
Current working directory /usr/local/src/genius_trader/Scripts
gmake: *** [all] Error 1

but firing up vi i saw the line term issue and changed them to end with
<lf> (0x0a). that may have solved the issue for some, while doing the
opposite for others :-\

line length wise, you will be one unhappy camper when you start
poking around in the perl code ;-)

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). 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.


Welcome to Darwin!
emac:~ herrold$ which gmake
no gmake in /bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/texbin
emac:~ herrold$

added a help target the content of which is mostly your instructions


That 'help' cruft is beyond fugly -- there are a multitude of things we

humm -- well as soon as time goes by know one will remember to hunt down
you email and the info will be lost. 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.

i toyed with commenting in your words of guidance, but they fit so well
into the help i just left them there.

but with help as the first target only maintainers, and the curious few,
will actually throw the makefile onto a terminal to see the "beyond fugly
cruft". if you want to isolate your good name from it's taint, i'll gladly
put a wrapper around it id'ed as a ras hack, which it is ;-)

_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.

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?


yelp if i did things badly, i don't have a (la)tex install to check it against.


I would not check in untested code; it is too easy to have a typo.

not yet committed if that's what you mean. i try to wait a week or so
to let people
 a)  have their say
 b)  make changes
 c)  make improvements
 d)  run tests ...

and with that, here's a tiny set of diffs for the stuff i can (maybe) correct:

--- Makefile    2008/03/12 20:45:53     1.12
+++ Makefile    2008/03/13 00:23:59
@@ -5,18 +5,16 @@
#       in the early versions
#
#       Copyright (c) 2008 R P Herrold <info
AT
owlriver.com>
-# Based on and for GeniusTrader (C) 2000-2002 Raphaël Hertzog, Fabien Fulhaber
# This file is distributed under the terms of the General Public License
# version 2 or (at your option) any later version.
#
# ras hacks adds help target, user protection and maybe some additional portability
-# $Id: Makefile,v 1.12 2008/03/12 20:45:53 ras Exp $
+# $Id: Makefile,v 1.13 2008/03/13 00:23:59 ras Exp ras $
#

TEXSRC   = Writing_an_Indicator_Cookbook

LATEX   = latex
-MAKE    = gmake
RM      = rm
TOUCH   = touch
DEBUG   =



aloha

ras


with my regards,

-- Russ herrold