#1228 Installation of site-lisp/gnuplot-eldoc.el(c) even for --without-lisp-files

5.0
closed-fixed
nobody
None
5
2013-09-24
2013-04-09
Mojca Miklavec
No

There are two related tickets open already, #1219 (Compilation of docs/gnuplot-eldoc.el fails with XEmacs) and #1226 (gnuplot.texi fails to build), but another problem is that gnuplot would install site-lisp/gnuplot-eldoc.el(c) even when I compile it with --without-lisp-files.

The problem is that gnuplot.texi tries to be built independent of --without-lisp-files, it just checks whether EMACS=no and proceeds otherwise.

See also https://trac.macports.org/ticket/38656.

Current configuration strategy goes as follows:

  • test if emacs exists
    • if emacs doesn't exist, disable lisp
    • else enable lisp
  • if --without-lisp-files was given
    • disable lisp
  • if emacs exists
    • if some gnuplot.texi is missing, compile gnuplo-eldoc.el and do other magic to compile that file (even if --without-lisp-files)

But it could (for example) be something like:

  • if --without-lisp-files was given
    • disable testing for emacs, disable lisp, disable attempts to
      compile gnuplot.texi etc.
  • else test for emacs
    • if emacs doesn't exist, disable lips, and attempts to compile
      gnuplot.texi etc.
    • if emacs exists, set up lisp directories and everything else
    • if gnuplot.texi is missing, compile it

Two other problems/questions are:
Why is gnuplot.texi built in the first place if it already exists in source?
Why is it built during make install instead of make?

Discussion

1 2 > >> (Page 1 of 2)
  • Ethan Merritt
    Ethan Merritt
    2013-04-09

    Is this problem being reported in the case of building from the 4.6.2 tarball (or some other release tarball) or is it with regard to building from cvs? The copy of gnuplot.texi in a release tarball should always be detected as up-to-date and thus not needing to be rebuilt. But that isn't true when you are building from cvs.

    As to the configuration logic, I am uncertain whether or not the creation/installation of gnuplot.info is supposed to be independent of emacs. I originally thought that gnuplot.texi and gnuplot.info were only relevant for users who wanted to read documentation via "info", whereas the lisp-files configuration option was for users who wanted to run gnuplot from inside emacs. A recent comment attached to one of the bug reports implied that these two scenarios cannot be separated. Is that true? In other words, should configuration without-lisp-files prevent creation or installation of gnuplot.info? Why? Conversely, if info and makeinfo are not present should this prevent configuring with-lisp-files? Why?

     
    • Mojca Miklavec
      Mojca Miklavec
      2013-04-10

      A recent comment attached to one of the bug reports implied that these two scenarios cannot be separated. Is that true?

      I don't think so. (But it is true that the two are closely related from the prerequisites point of view: both need emacs and lispdir.)

      In other words, should configuration without-lisp-files prevent creation or installation of gnuplot.info?

      In my opinion not. However, it should prevent installation of

      /usr/local/share/emacs/site-lisp/gnuplot-eldoc.el
      

      for example. And it would be nice if installing gnuplot.info wouldn't require the presence of emacs when installing from distribution zip.

      Conversely, if info and makeinfo are not present should this prevent configuring with-lisp-files? Why?

      In my opinion not.

      But:

      • there should be an easy way to prevent rebuilding of gnuplot.texi (and/or it should be figured out why it rebuilds when there is no need for that).
      • lisp code and lisp code configuration needs a review in any case

      PS: I really really hate the fact that one cannot build TikZ support files and configure --with-texdir if tex isn't found since TeX is not needed to generate those files and user can happily select the desired destination folder. I hate the fact that one option depends on the other when there is no need. Maybe one should not repeat the same mistake for emacs and keep enough options open.

       
  • Mojca Miklavec
    Mojca Miklavec
    2013-04-10

    I agree that installing support files for emacs sand installing info files could/should be two separate configuration options, however the problem is that the following code

      @if test "$(EMACS)" != no; then \
          $(top_srcdir)/mkinstalldirs $(DESTDIR)$(infodir) $(DESTDIR)$(lispdir); \
          $(INSTALL_DATA) gnuplot.info $(DESTDIR)$(infodir)/gnuplot.info; \
          $(INSTALL_DATA) gnuplot-eldoc.el $(DESTDIR)$(lispdir)/gnuplot-eldoc.el; \
          $(INSTALL_DATA) gnuplot-eldoc.elc $(DESTDIR)$(lispdir)/gnuplot-eldoc.elc; \
    

    installs gnuplot-eldoc.el(c) to lispdir even when --without-lisp-files is selected and when user has absolutely zero configuration options to control where these files should actually go.

    One option (but not the best one) would be to provide another switch --with(out)-emacs-support to install emacs support, so that one could use --with-lisp-files=/path/to/lisp-dir --without-emacs-support.

    In any case, the last two lines above should be conditioned on lisp-files settings, not on $EMACS variable.

    I'm just speculating, but maybe one of the reasons why gnuplot.texi code is compiled is that the two other files gnuplot-eldoc.el(c) don't exist, so the whole block is run:

    gnuplot.texi $(srcdir)/gnuplot-eldoc.el $(srcdir)/gnuplot-eldoc.elc: $(srcdir)/doc2texi.el $(srcdir)/gnuplot.doc
      @echo "Creating texinfo and eldoc strings file"
      @if test "$(EMACS)" != no; then \
         test "$(top_srcdir)" = "$(top_builddir)" || echo "COPYING GNUPLOT.DOC" ; \
         test "$(top_srcdir)" = "$(top_builddir)" || cp $(srcdir)/gnuplot.doc . ; \
         $(EMACS) -batch -l $(srcdir)/doc2texi.el -f d2t-doc-to-texi ; \
         echo "Compiling gnuplot-eldoc.el" ; \
         $(EMACS) -batch --eval='(byte-compile-file "gnuplot-eldoc.el")' ; \
      else \
         echo "No emacs found - cannot create texinfo file" ; \
      fi
    

    Does my last speculation make any sense?

     
  • Ethan Merritt
    Ethan Merritt
    2013-04-10

    On Wed, Apr 10, 2013 at 5:38 AM, Mojca Miklavec mmiklavec@users.sf.net wrote:

    A recent comment attached to one of the bug reports implied that these two scenarios cannot be separated. Is that true?

    I don't think so. (But it is true that the two are closely related from the prerequisites point of view: both need emacs and lispdir.)

    Why does info need lispdir?

     
  • Mojca Miklavec
    Mojca Miklavec
    2013-04-10

    Info doesn't, but gnuplot-eldoc.el that is created together with info in

    "Creating texinfo and eldoc strings file"

    does. (My sentence was a bit oversimplified.)

    (Also, info doesn't/should't need emacs to be installed from the released zip.)

     
    Last edit: Mojca Miklavec 2013-04-10
  • Ethan Merritt
    Ethan Merritt
    2013-04-10

    While we're collecting problems with the lisp/emacs/info section of the build scripts....

    As it is, if you configure --without-lisp-files then any subsequent attempt to do "make distcheck" fails because even though the required files are present, the Makefile is missing the commands needed to create a directory to process them in.

     
    • Mojca Miklavec
      Mojca Miklavec
      2013-04-11

      Is the problematic directory $(DESTDIR)$(lispdir) as in (for example)

      $(INSTALL_DATA) gnuplot-eldoc.el $(DESTDIR)$(lispdir)/gnuplot-eldoc.el
      

      or something else? I'm just curious.

       
  • Ethan Merritt
    Ethan Merritt
    2013-04-11

    [1] ./configure --without-lisp-files
    ...
    [2] make dist
    ...
    make[3]: Entering directory /home/merritt/cvs/gnuplot-cvs/share/LaTeX' make[3]: Leaving directory/home/merritt/cvs/gnuplot-cvs/share/LaTeX'
    make[2]: Leaving directory `/home/merritt/cvs/gnuplot-cvs/share'
    make \ top_distdir="gnuplot-4.7" distdir="gnuplot-4.7" \ dist-hook
    make[2]: Entering directory '/home/merritt/cvs/gnuplot-cvs'
    /bin/sh: line 0: cd: gnuplot-4.7/lisp: No such file or directory
    make[2]: ### [dist-hook] Error 1
    make[2]: Leaving directory '/home/merritt/cvs/gnuplot-cvs'
    make[1]: ### [distdir] Error 2
    make[1]: Leaving directory '/home/merritt/cvs/gnuplot-cvs'
    make: ### [dist] Error 2


     
  • Ethan Merritt
    Ethan Merritt
    2013-07-04

    The xemacs issue has been fixed by a patch from Ulrich Müller.

    As to installation of *.el in the absence of emacs, I have mixed feelings. On the one hand it seems unnecessary, but on the other hand it doesn't hurt to install it so that it's there if the user installs emacs at a later time. It would be really annoying if you had to re-install gnuplot after installing emacs.

     
  • Ethan Merritt
    Ethan Merritt
    2013-07-04

    • status: open --> open-fixed
     
1 2 > >> (Page 1 of 2)