axiom-developer
[Top][All Lists]
Advanced

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

[Axiom-developer] Makefile and CVS


From: root
Subject: [Axiom-developer] Makefile and CVS
Date: Wed, 27 Nov 2002 13:54:56 -0500

The CVS change worked fine. Please move your comments from the
generated Makefile to the text block above and write them so
a new developer could understand the issue and why the change
exists. They might, for example, have the MKS toolkit which
includes strip.exe. So, for example, instead of:

<<noweb>>=
# Changed to comment out strip symbol table since    -WSP
# executables have a .exe. extension under Windows.   - WSP
...

which was the old "in code" comment model. We now have a tool
for deeply explaining changes in real text. So a better form is:

Fixed the stupid bug
<<noweb>>=
...

Just kidding. But the whole reason for using literate programming and
latex is that we are creating a living document around the "compiled"
form of the Makefile. Makefile files are just machine-generated
output. They shouldn't include comments as the machine won't care and
humans should not be reading them.
 
So a better suggestion (in fuller detail) might be to mark your
changes as a code chunk, create them out of line and document the
need for the change thus:


.........


The noweb makefile will attempt to remove the symbol table of
the constructed executable using the strip program. This program
does not exist on Windows so we cannot use it. Since noweb is
a package maintained outside of Axiom's control we cannot change
the Makefile directly. Instead we apply the following patch:

<<strip fix for windows>>=
        sed 's/strip/#strip/g;s/ELISP=\/dev\/null/ELISP=\/tmp\/null/' makefile 
> makefile.tmp ; \
        mv makefile makefile.old ; \
        mv makefile.tmp makefile ; \
        sed 's/strip/#strip/g;s/ELISP=\/dev\/null/ELISP=\/tmp\/null/' 
makefile.nw > makefile.nw.tmp ; \
        mv makefile.nw makefile.nw.old ; \
        mv makefile.nw.tmp makefile.nw ; \
@

<<noweb>>=
noweb:
        @echo 13 making noweb
        @mkdir -p ${OBJ}/noweb
        @mkdir -p ${TMP}
        @mkdir -p ${MNT}/${SYS}/bin
        @( cd ${OBJ}/noweb ; \
<<strip fix for windows>>
        tar -zxf ${ZIPS}/noweb-2.10a.tgz ; \
        cd ${OBJ}/noweb/src ; \
        ./awkname gawk ; \
        ${MAKE} BIN=${MNT}/${SYS}/bin LIB=${MNT}/${SYS}/bin/lib \
                MAN=${MNT}/${SYS}/bin/man \
                TEXINPUTS=${MNT}/${SYS}/bin/tex all install >${TMP}/trace )
        @echo The file marks the fact that noweb has been made > noweb

..........


Notice that the explanation will no longer show up in the Makefile.
It will explain why we need to "reach into" another Makefile rather
than change it directly. It takes the patch "out of line" so other
people can remove it later if they wish (by creating a <<noweb-nopatch>>
stanza or some such that they include in their platform files.

Also, just to be painful about this but this change might better
be applied as follows:

(1)
cd ${OBJ}/noweb/src
change the makefile
diff -Naur makefile makefile.wsp >makefile.noweb.strip

(2)
copy makefile.noweb.strip to the $SPAD/zips directory

(3)
modify the <<noweb>>= stanza to read

<<noweb>>=
noweb:
        @echo 13 making noweb
        @mkdir -p ${OBJ}/noweb
        @mkdir -p ${TMP}
        @mkdir -p ${MNT}/${SYS}/bin
        @( cd ${OBJ}/noweb ; \
        patch < ${ZIPS}/makefile.noweb.strip
        tar -zxf ${ZIPS}/noweb-2.10a.tgz ; \
        cd ${OBJ}/noweb/src ; \
        ./awkname gawk ; \
        ${MAKE} BIN=${MNT}/${SYS}/bin LIB=${MNT}/${SYS}/bin/lib \
                MAN=${MNT}/${SYS}/bin/man \
                TEXINPUTS=${MNT}/${SYS}/bin/tex all install >${TMP}/trace )
        @echo The file marks the fact that noweb has been made > noweb

I have a patch to noweb I'll be applying in the same way so I'll
end up rewriting your patch. Patch is preferred to sed because
patch handles context and is marginally easier to use since you
can "hand patch" the changes if you wish.

I can "export" patch files back to the original projects like
noweb and GCL where they can easily apply them.

And I expect to receive changes in patch form from people who
do not have write access to the CVS. Patch files are automatically
handled by a few tools like emacs.

Patches may also be used between minor versions, although I'm
undecided about that. The shower-committee debate still rages.

Changes to things we actually control, of course, will just get
made to CVS.

I'm being verbose about the suggested changes more for the
developer community benefit than yours. I want to document the
"guidelines" for future reference.

Feel free to argue.


Tim






reply via email to

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