Starlink / starlink

Starlink Software Collection
162 stars 53 forks source link

Echomop SUN/152 install of latex documents is non-standard #9

Closed timj closed 11 years ago

timj commented 11 years ago

Echomop builds a tar file of all the tex support documents and installs that into the documentation tree as sun152.latex_tar. Leaving aside that the other documents install the EPS files explicitly rather than using a tar file (it could be argued that it would be more convenient if the other documents used the tar scheme instead), the tar file is not correct:

sun152.htx/
sun152.htx/*.*
sun152.tex
sun152_01.eps
sun152_02.eps
sun152_03.eps
sun152_04.eps
sun152_05.eps
sun152_06.eps
sun152_07.eps
sun152_08.eps
sun152_cover.eps
sun152_glossy1.eps
sun152_glossy2.eps

and includes the HTX component which is already installed (I haven't listed the contents of the HTX directory but the tar file includes them all). The HTX files should not be there.

In some sense I'm not sure why we continue to install the document source since it's all in the git repository. The only reason I can think of would be for grepping but the PDF files are searchable.

nxg commented 11 years ago

Odd. I just tried this with

% git log -1 
commit 7f75a9e7ee5b27fec8c7ffa2a3133288ecabe1b0
Author: Tim Jenness <tim.jenness@gmail.com>

(presuming that git pull origin master is what I have to do to get my checkout up to date). Then make sun152.latex_tar produces...

% tar tvf sun152.latex_tar
-rw-r--r--  0 norman admin  324858 12 Aug 15:45 sun152.tex
-rw-r--r--  0 norman admin   22755  6 Aug 10:44 sun152_01.eps
-rw-r--r--  0 norman admin   54290  6 Aug 10:44 sun152_02.eps
-rw-r--r--  0 norman admin   29165  6 Aug 10:44 sun152_03.eps
-rw-r--r--  0 norman admin   29800  6 Aug 10:44 sun152_04.eps
-rw-r--r--  0 norman admin   42770  6 Aug 10:44 sun152_05.eps
-rw-r--r--  0 norman admin  126658  6 Aug 10:44 sun152_06.eps
-rw-r--r--  0 norman admin   24907  6 Aug 10:44 sun152_07.eps
-rw-r--r--  0 norman admin  320847  6 Aug 10:44 sun152_08.eps
-rw-r--r--  0 norman admin  972593  6 Aug 10:44 sun152_cover.eps
-rw-r--r--  0 norman admin   42765  6 Aug 10:44 sun152_glossy1.eps
-rw-r--r--  0 norman admin  244560  6 Aug 10:44 sun152_glossy2.eps

The makefile looks OK, so I've no idea how it would have produced the tarball you describe.

I can't see much present-day rationale for installing the LaTeX source, either.

timj commented 11 years ago

I did actually check on multiple machines before mentioning it. At JAC the latex_tar file also contains the HTX directory (on at least three linux builds that I looked at).

A clean build of echomop gives me:

cd sun152; tar cf ../sun152.htx_tar sun152.htx
ln -s doc/sun152.htx_tar sun152.htx_tar
rm -f sun152.latex_tar
cd doc; test -f sun152.latex_tar || make sun152.latex_tar
cd sun152; tar cf ../sun152.latex_tar sun152*
ln -s doc/sun152.latex_tar sun152.latex_tar
rm -f echomop_hyper.tar
cd doc; test -f echomop_hyper.tar || make echomop_hyper.tar
cd htmlhelp; tar cf ../echomop_hyper.tar *
ln -s doc/echomop_hyper.tar echomop_hyper.tar

and of course the reason it works for you is that you didn't do a full echomop build. The latextar creation step uses the sun152* wildcard which matches sun152.htx directory in the full build but that directory is not present for you yet. I think it would be better for the target to use `sun152.tex sun152(could usesun152_.eps` but then would have to change it when we switch to PDF).

nxg commented 11 years ago

Doh! Sorry: I was looking at doc/sun152/Makefile, which includes tar cf $@ sun152.tex sun152*eps for $(LATEX_DOCS), and I couldn't understand how that could possibly go wrong, and I build the docs in that directory just to double-check.

Probably a better rule would be

$(LATEX_DOCS): sun152/sun152.tex
    cd sun152; $(MAKE) $(LATEX_DOCS)
    mv $(LATEX_DOCS) .

...since that keeps the rules in one place

timj commented 11 years ago

I did the minimalist fix of fixing the middle Makefile. It is obviously still a bit weird that both makefiles know how to build the latex_tar file.