[Top][All Lists]

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

Makefile minor issues

From: Ikumi Keita
Subject: Makefile minor issues
Date: Tue, 10 Dec 2019 17:45:37 +0900

Hi all,

I noticed some minor issues about Makefiles of AUCTeX.

(A) Makefile in latex/ subdirectory
The "all" target of latex/Makefile(.in) includes "preview.pdf" in its
dependencies, so "make all" generates preview.pdf.  However, preview.pdf
is not used at all during a normal AUCTeX install process.  It is just
generated and left alone.  Instead, preview.dvi is installed in local
texmf tree.  Unless I looked over something, preview.pdf is used only
when preview package is uploaded to CTAN, i.e., "make preview-ball".

In addition, the rules of "clean" target of the top level Makefile(.in)
ignore latex/ subdirectory, so all the files generated under latex/
during a normal install process are left behind after "make clean".  In
fact, rm command in the rules of the "clean" target of
latex/Makefile(.in) does not have preview.pdf in its arguments, so
preview.pdf survives even after "make clean" is issued directly in
latex/ subdirectory.

Comparing preview.pdf and preview.dvi, the former has less amount of
information because the relevant lines in latex/Makefile(.in) are
preview.dvi: preview.drv preview.dtx preview.sty
        $(LATEX) '\nonstopmode \input preview.drv'
preview.pdf: preview.drv preview.dtx preview.sty
        $(PDFLATEX) '\nonstopmode 

I feel that something is unfinished about this situation.  In which way
should we treat preview.pdf and preview.dvi, in addtion to adding "rm
preview.pdf" in the rule of "clean" target of latex/Makefile(.in)?
   1. Remove "preview.pdf" from dependencies of "all" target of
   2. Stop generating preview.dvi and install preview.pdf instead
      during a normal install process.
       2-1. Remove "\AtBeginDocument{\OnlyDescription}" at generation
            of preview.pdf and give it full detail of preview.drv, as
            the current preview.dvi has.
            In this case, the preview package uploaded in CTAN would 
            have preview.pdf with the same amount of full detail.
       2-2. Just install preview.pdf of the same content as the current
            In this case, the detail of preview.drv would not be
            accessible in local texmf tree.
   3. Other.

(B) Clean targets in Makefiles
Speaking of "clean" targets in Makefiles, I observe some other
deficiencies as well:
   1. The "clean" target and alikes in the top level Makefile(.in)
      ignore tests/, in addition to latex/, subdirectory.  So even "make
      extraclean" does not delete logs and garbages generated under
      tests/ .  I think "make maintainer-clean" should do "make clean"
      in tests/ subdirectory.
   2. latex/Makefile(.in) lacks "distclean" target.  It should exist and
      delete Makefile at least.
   3. The "maintainer-clean" target of doc/Makefile(.in) tries to delete
      However, they are no longer generated in doc/ subdirectory but
      in the parent (top) directory.  So the argument "$(DISTTEXTS)" is
      enough for the intended purpose.
   4. Of cource the "clean" target and alikes in top level Makefile(.in)
      should have rules such as "cd latex && $(MAKE) clean" (and
      dependencies on latex/Makefile).

I think that it is straightforward to sort out (B), but (A) is not so
trivial.  What do you think about them?

Ikumi Keita

reply via email to

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