auctex-devel
[Top][All Lists]
Advanced

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

Re: [can't compile the main branch]


From: Stefan Monnier
Subject: Re: [can't compile the main branch]
Date: Tue, 23 Apr 2024 17:10:58 -0400
User-agent: Gnus/5.13 (Gnus v5.13)

> fatal: not a git repository (or any of the parent directories): .git
> fatal: not a git repository (or any of the parent directories): .git
> fatal: not a git repository (or any of the parent directories): .git
> fatal: not a git repository (or any of the parent directories): .git
> (cd doc; makeinfo -D rawfile --no-headers intro.texi --output -) >README
> (cd doc; makeinfo -D rawfile --no-headers preview-readme.texi --output -) >> 
> README
> sed -e 's|@lisppackagelispdir@|(file-name-directory load-file-name)|'\
>     -e 's|@lisppackagedatadir@|(file-name-directory load-file-name)|'\
>     -e 's|@lispautodir@|(if (file-writable-p "/usr/local/var/auctex") 
> "/usr/local/var/auctex" "~/.emacs.d/auctex")|'\
>     -e 's|@AUCTEXVERSION@|.|'\
>     -e 's|@AUCTEXDATE@||'\
>     tex-site.el.in >tex-site.el
> make: *** No rule to make target 'ChangeLog', needed by 'doc/version.texi'.  
> Stop.
>
> Now why on earth should I have a git parent directory or directories?

The GNUmakefile tries to find the date of the commit you're building,
and that's only available from the VCS metadata.  The patch below should
make it fallback to using the current date.

Git's also used to figure out if the current commit is a release.
I defaulted to "not a release" in the patch.

> There is also no configure option more, since I have various emacs
> versions installed (the one Ubuntu ships, the one or two I have compiled
> from master (and which end up in /opt/emacs29 or /opt/emacs30)
> So I have to to edit the makefile manually?

You could use `make ... EMACS=...` but that was rather inconvenient
since the `EMACS=...` arg needed several specific options.  In the patch
below I introduced an `EMACSBIN` var, so you can do

    make EMACSBIN=/usr/bin/emacs-34.1

to build with your Emacs-34.1.

>     1. I pull, make (and would to install)
>
>     2. I would like to do some experiments (say starting a new style
>        file) but now I am editing files of a repository I also use for
>        my daily work. That does sound a bit dangerous.
>
> Can't you leave the make install  option please.

There are many ways to solve this (including using a separate clone or
just a separate worktree, or refreshing the previous `make install`
code, ...) so I'll let others decide what AUCTeX should do about it.

Personally, I've been editing the very files I use for my daily work for
as long as I can remember and find it to be the best option.  🙂


        Stefan

diff --git a/GNUmakefile b/GNUmakefile
index b5cec4822e..4fb8829124 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -17,7 +17,8 @@
 #   latex: prtightpage.def
 #   latex: prtracingall.def
 
-EMACS=emacs --batch -q -no-site-file -no-init-file -l lpath.el
+EMACSBIN=emacs
+EMACS=$(EMACSBIN) --batch -q -no-site-file -no-init-file -l lpath.el
 MAKEINFO=makeinfo
 INSTALL_INFO=install-info
 PERL=perl
@@ -74,18 +75,16 @@ README: doc/intro.texi doc/preview-readme.texi 
doc/macros.texi
 # Commands copied&adapted from autogen.sh and doc/Makefile.in.
 IGNORED:=$(shell rm -f ChangeLog && ./build-aux/gitlog-to-auctexlog && cat 
ChangeLog.1 >> ChangeLog)
 # Committer date of HEAD.
-AUCTEXDATE:=$(shell git log -n1 --pretty=tformat:"%ci" \
-       | sed -nre 's/ /_/p' | sed -nre 's/ .*//p')
+AUCTEXDATE:=$(shell (git log -n1 --pretty=tformat:"%ci" 2>/dev/null \
+                     || date +"%Y-%m-%d %T")                       \
+                    | sed -re 's/ /_/' -e 's/ .*//')
 # Extract the version number from the diff line "+;; Version: 14.0.4" of
 # the commit HEAD which is only filled when we did a release in the last
 # commit.
-THISVERSION:=$(shell git show HEAD -- auctex.el \
+THISVERSION:=$(shell git show HEAD -- auctex.el 2>/dev/null \
        | sed -nre 's/[+];; Version: ([0-9]+.[0-9]+.[0-9]+)/\1/p')
-# Extract the last version number from the previous change to auctex.el,
-# i.e., only look at commits starting at HEAD~1.
-LASTVERSION:=$(shell git log HEAD~1 -p --first-parent -- auctex.el \
-       | grep "+;; Version: " \
-       | sed -nre 's/[+];; Version: ([0-9]+.[0-9]+.[0-9]+)/\1/p;q')
+# Extract the last released version number from `auctex.el`.
+LASTVERSION:=$(shell sed -nre '/Version:/{s/;; Version: 
([0-9]+.[0-9]+.[0-9]+)/\1/p;q}' auctex.el)
 AUCTEXVERSION:=$(if $(THISVERSION),$(THISVERSION),$(LASTVERSION).$(AUCTEXDATE))
 
 tex-site.el: tex-site.el.in

reply via email to

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