axiom-developer
[Top][All Lists]
Advanced

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

[Axiom-developer] findSpadFiles problem


From: root
Subject: [Axiom-developer] findSpadFiles problem
Date: Sun, 1 Jan 2006 20:25:53 -0500

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]