axiom-developer
[Top][All Lists]
Advanced

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

[Axiom-developer] RE: findSpadFiles problem


From: Bill Page
Subject: [Axiom-developer] RE: findSpadFiles problem
Date: Sun, 1 Jan 2006 21:13:54 -0500

Tim,

I think your analysis and suggested change is correct.

And Happy New Year!

Cheers,
Bill Page.

> -----Original Message-----
> From: root [mailto:address@hidden 
> Sent: January 1, 2006 8:26 PM
> To: Bill Page
> Cc: address@hidden; address@hidden
> Subject: findSpadFiles problem
> 
> 
> Bill,
> 
> I'm building Axiom for another release and I've discovered a problem
> that needs to be fixed. The findSpadFiles routine in the
> src/algebra/Makefile.pamphlet file is generating duplicate targets
> resulting in the error messages:
> 
> Makefile: NNNN: warning: ignoring old commands for target `.....`
> 
> after investigating the problem it appears that there is a built-in
> assumption that the chunk names are unique. However, a document style
> I use has violated that. This is the first time I've used it in the
> algebra so it never happened before. 
> 
> In noweb you can say
> 
> 
> mumble, mumble, ...
> <<foo>>=
>   chunk, 
>   chunk
> @
> 
> more words
>  
> <<foo>>=
>   continued chunk
> @
> 
> etc. That is, you can insert documentation inline in a chunk by 
> just using the same chunkname. The second chunk gets concatenated
> with the first. In src/algebra/combfunc.spad.pamphlet I've done:
> 
> <<package COMBF CominatorialFunction>>=
>  .....
> @
> words to explain the change
> <<package COMBF CominatorialFunction>>=
>  .....
> @
> 
> The findSpadFiles stanza reads:
> 
> 
> egrep '@<<(domain|package|category) .*>>=' *.spad.pamphlet | \
> awk -F: '{
>   chunk=substr($2,3,length($2)-5);
>   split(chunk,part," ");
>   spadfile="\${MID}/"part[2]".spad";
>   print spadfile": \${IN}/"$1;
>   print "address@hidden -R\""chunk"\" \${IN}/"$1">"spadfile;
>   print "";
> }'
> 
> and I'm tempted to rewrite it to include a call to 'uniq' thus:
> 
> 
> egrep '@<<(domain|package|category) .*>>=' *.spad.pamphlet | uniq | \
> awk -F: '{
>   chunk=substr($2,3,length($2)-5);
>   split(chunk,part," ");
>   spadfile="\${MID}/"part[2]".spad";
>   print spadfile": \${IN}/"$1;
>   print "address@hidden -R\""chunk"\" \${IN}/"$1">"spadfile;
>   print "";
> }'
> 
> Comments?
> 
> Tim
> 
> 






reply via email to

[Prev in Thread] Current Thread [Next in Thread]