GNU bug report logs - #31929
27.0.50; Have make install copy the emacs-module.h to the destination install dir

Previous Next

Package: emacs;

Reported by: Kaushal Modi <kaushal.modi <at> gmail.com>

Date: Thu, 21 Jun 2018 16:05:01 UTC

Severity: minor

Merged with 32763, 33228

Found in versions 26.1, 27.0.50

Fixed in versions 26.2, 27.1

Done: Philipp Stephani <p.stephani2 <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 31929 in the body.
You can then email your comments to 31929 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#31929; Package emacs. (Thu, 21 Jun 2018 16:05:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Kaushal Modi <kaushal.modi <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 21 Jun 2018 16:05:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Kaushal Modi <kaushal.modi <at> gmail.com>
To: "bug-gnu-emacs <at> gnu.org" <bug-gnu-emacs <at> gnu.org>
Subject: 27.0.50; Have make install copy the emacs-module.h to the destination
 install dir
Date: Thu, 21 Jun 2018 12:04:28 -0400
[Message part 1 (text/plain, inline)]
Hello,

When building emacs locally, the emacs-module.h is not copied over to an
include/ directory in the destination installation directory. This prevents
one to have version-specific emacs-module.h for folks building emacs
themselves.

Ref: https://lists.gnu.org/r/help-gnu-emacs/2018-06/msg00303.html
-- 

Kaushal Modi
[Message part 2 (text/html, inline)]

Forcibly Merged 31929 32763. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 18 Sep 2018 18:20:01 GMT) Full text and rfc822 format available.

Merged 31929 32763. Request was from Eli Zaretskii <eliz <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 18 Sep 2018 18:34:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#31929; Package emacs. (Fri, 21 Sep 2018 13:29:01 GMT) Full text and rfc822 format available.

Message #12 received at 31929 <at> debbugs.gnu.org (full text, mbox):

From: Philipp Stephani <p.stephani2 <at> gmail.com>
To: 31929 <at> debbugs.gnu.org
Cc: Philipp Stephani <phst <at> google.com>
Subject: [PATCH] Install emacs-module.h (Bug#31929)
Date: Fri, 21 Sep 2018 15:27:48 +0200
* Makefile.in (includedir): New variable.
(install-arch-indep): Install emacs-module.h.
(uninstall): Uninstall emacs-module.h.
---
 Makefile.in | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Makefile.in b/Makefile.in
index 19bf7c423f..5346429264 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -151,6 +151,9 @@ libexecdir=
 # Currently only used for the systemd service file.
 libdir=@libdir@
 
+# Where to install emacs-module.h.
+includedir=@includedir@
+
 # Where to install Emacs's man pages.
 # Note they contain cross-references that expect them to be in section 1.
 mandir=@mandir@
@@ -558,6 +561,8 @@ set_installuser=
 ## See also these comments from 2004 about cp -r working fine:
 ## https://lists.gnu.org/r/autoconf-patches/2004-11/msg00005.html
 install-arch-indep: lisp install-info install-man ${INSTALL_ARCH_INDEP_EXTRA}
+	$(MKDIR_P) -m 0755 $(includedir)
+	$(INSTALL_DATA) src/emacs-module.h $(includedir)/emacs-module.h
 	-set ${COPYDESTS} ; \
 	unset CDPATH; \
 	$(set_installuser); \
@@ -741,6 +746,7 @@ install-strip:
 ###
 ### Don't delete the lisp and etc directories if they're in the source tree.
 uninstall: uninstall-$(NTDIR) uninstall-doc
+	rm -f $(includedir)/emacs-module.h
 	$(MAKE) -C lib-src uninstall
 	-unset CDPATH; \
 	for dir in "$(DESTDIR)${lispdir}" "$(DESTDIR)${etcdir}" ; do 	\
-- 
2.19.0





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#31929; Package emacs. (Fri, 21 Sep 2018 13:47:02 GMT) Full text and rfc822 format available.

Message #15 received at 31929 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Philipp Stephani <p.stephani2 <at> gmail.com>
Cc: phst <at> google.com, 31929 <at> debbugs.gnu.org
Subject: Re: bug#31929: [PATCH] Install emacs-module.h (Bug#31929)
Date: Fri, 21 Sep 2018 16:45:34 +0300
> From: Philipp Stephani <p.stephani2 <at> gmail.com>
> Date: Fri, 21 Sep 2018 15:27:48 +0200
> Cc: Philipp Stephani <phst <at> google.com>
> 
> +	$(MKDIR_P) -m 0755 $(includedir)
> +	$(INSTALL_DATA) src/emacs-module.h $(includedir)/emacs-module.h

Thanks.  I wonder whether we should install in $(includedir)/emacs.
It sounds rude to me to invade the top-level include directory; other
packages install into package-specific subdirectories.

If you agree, we may need to change mod-test.c and perhaps also the
place where we keep emacs-module.h in the Emacs tree.

We should also think what will happen when we change the interface in
some backward-incompatible way: how do we allow end-users to compile
modules for several Emacs versions on the same system? does that
require a new version of the header, or can we provide a header that
will work with any Emacs version?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#31929; Package emacs. (Fri, 21 Sep 2018 15:37:02 GMT) Full text and rfc822 format available.

Message #18 received at 31929 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Philipp Stephani <p.stephani2 <at> gmail.com>
Cc: Philipp Stephani <phst <at> google.com>, 31929 <at> debbugs.gnu.org
Subject: Re: bug#31929: [PATCH] Install emacs-module.h (Bug#31929)
Date: Fri, 21 Sep 2018 11:36:17 -0400
Philipp Stephani wrote:

> +	$(MKDIR_P) -m 0755 $(includedir)

I don't remember how portable that is, but everywhere else in Emacs's
Makefiles uses: umask 022 && ${MKDIR_P} "...".

And should this file only be installed in a --with-modules build?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#31929; Package emacs. (Fri, 21 Sep 2018 16:57:02 GMT) Full text and rfc822 format available.

Message #21 received at 31929 <at> debbugs.gnu.org (full text, mbox):

From: Philipp Stephani <p.stephani2 <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: phst <at> google.com, 31929 <at> debbugs.gnu.org
Subject: Re: bug#31929: [PATCH] Install emacs-module.h (Bug#31929)
Date: Fri, 21 Sep 2018 18:56:37 +0200
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> schrieb am Fr., 21. Sep. 2018 um 15:46 Uhr:

> > From: Philipp Stephani <p.stephani2 <at> gmail.com>
> > Date: Fri, 21 Sep 2018 15:27:48 +0200
> > Cc: Philipp Stephani <phst <at> google.com>
> >
> > +     $(MKDIR_P) -m 0755 $(includedir)
> > +     $(INSTALL_DATA) src/emacs-module.h $(includedir)/emacs-module.h
>
> Thanks.  I wonder whether we should install in $(includedir)/emacs.
> It sounds rude to me to invade the top-level include directory; other
> packages install into package-specific subdirectories.
>

I think it's not necessary to include "emacs" twice in the file name: using
"emacs-module.h" should already be unique enough, and including "emacs"
twice doesn't make it more unique.


>
> If you agree, we may need to change mod-test.c and perhaps also the
> place where we keep emacs-module.h in the Emacs tree.
>
> We should also think what will happen when we change the interface in
> some backward-incompatible way: how do we allow end-users to compile
> modules for several Emacs versions on the same system? does that
> require a new version of the header, or can we provide a header that
> will work with any Emacs version?
>

I don't think we can ever have backward-incompatible changes: only
additions are possible. This isn't different from other headers. That is,
the header for version N should also work for all versions older than N.
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#31929; Package emacs. (Fri, 21 Sep 2018 16:58:01 GMT) Full text and rfc822 format available.

Message #24 received at 31929 <at> debbugs.gnu.org (full text, mbox):

From: Philipp Stephani <p.stephani2 <at> gmail.com>
To: Glenn Morris <rgm <at> gnu.org>
Cc: Philipp Stephani <phst <at> google.com>, 31929 <at> debbugs.gnu.org
Subject: Re: bug#31929: [PATCH] Install emacs-module.h (Bug#31929)
Date: Fri, 21 Sep 2018 18:57:32 +0200
[Message part 1 (text/plain, inline)]
Glenn Morris <rgm <at> gnu.org> schrieb am Fr., 21. Sep. 2018 um 17:36 Uhr:

> Philipp Stephani wrote:
>
> > +     $(MKDIR_P) -m 0755 $(includedir)
>
> I don't remember how portable that is, but everywhere else in Emacs's
> Makefiles uses: umask 022 && ${MKDIR_P} "...".
>

Good idea, done.


>
> And should this file only be installed in a --with-modules build?
>

I considered that, but I think it's simpler to install it unconditionally.
Users can use emacs-module.h to build modules even if their version of
Emacs doesn't support them.
[Message part 2 (text/html, inline)]

Reply sent to Philipp Stephani <p.stephani2 <at> gmail.com>:
You have taken responsibility. (Wed, 03 Oct 2018 20:03:02 GMT) Full text and rfc822 format available.

Notification sent to Kaushal Modi <kaushal.modi <at> gmail.com>:
bug acknowledged by developer. (Wed, 03 Oct 2018 20:03:03 GMT) Full text and rfc822 format available.

Message #29 received at 31929-done <at> debbugs.gnu.org (full text, mbox):

From: Philipp Stephani <p.stephani2 <at> gmail.com>
To: 31929-done <at> debbugs.gnu.org
Cc: Philipp Stephani <phst <at> google.com>
Subject: Re: [PATCH] Install emacs-module.h (Bug#31929)
Date: Wed, 3 Oct 2018 22:02:08 +0200
[Message part 1 (text/plain, inline)]
Since there were no more comments, I've installed (a tiny variant of) this
patch as 00ea749f2a.

Philipp Stephani <p.stephani2 <at> gmail.com> schrieb am Fr., 21. Sep. 2018 um
15:28 Uhr:

> * Makefile.in (includedir): New variable.
> (install-arch-indep): Install emacs-module.h.
> (uninstall): Uninstall emacs-module.h.
> ---
>  Makefile.in | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/Makefile.in b/Makefile.in
> index 19bf7c423f..5346429264 100644
> --- a/Makefile.in
> +++ b/Makefile.in
> @@ -151,6 +151,9 @@ libexecdir=
>  # Currently only used for the systemd service file.
>  libdir=@libdir@
>
> +# Where to install emacs-module.h.
> +includedir=@includedir@
> +
>  # Where to install Emacs's man pages.
>  # Note they contain cross-references that expect them to be in section 1.
>  mandir=@mandir@
> @@ -558,6 +561,8 @@ set_installuser=
>  ## See also these comments from 2004 about cp -r working fine:
>  ## https://lists.gnu.org/r/autoconf-patches/2004-11/msg00005.html
>  install-arch-indep: lisp install-info install-man
> ${INSTALL_ARCH_INDEP_EXTRA}
> +       $(MKDIR_P) -m 0755 $(includedir)
> +       $(INSTALL_DATA) src/emacs-module.h $(includedir)/emacs-module.h
>         -set ${COPYDESTS} ; \
>         unset CDPATH; \
>         $(set_installuser); \
> @@ -741,6 +746,7 @@ install-strip:
>  ###
>  ### Don't delete the lisp and etc directories if they're in the source
> tree.
>  uninstall: uninstall-$(NTDIR) uninstall-doc
> +       rm -f $(includedir)/emacs-module.h
>         $(MAKE) -C lib-src uninstall
>         -unset CDPATH; \
>         for dir in "$(DESTDIR)${lispdir}" "$(DESTDIR)${etcdir}" ; do    \
> --
> 2.19.0
>
>
[Message part 2 (text/html, inline)]

Reply sent to Philipp Stephani <p.stephani2 <at> gmail.com>:
You have taken responsibility. (Wed, 03 Oct 2018 20:03:03 GMT) Full text and rfc822 format available.

Notification sent to Vasilij Schneidermann <v.schneidermann <at> gmail.com>:
bug acknowledged by developer. (Wed, 03 Oct 2018 20:03:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#31929; Package emacs. (Wed, 03 Oct 2018 20:29:02 GMT) Full text and rfc822 format available.

Message #37 received at 31929 <at> debbugs.gnu.org (full text, mbox):

From: Kaushal Modi <kaushal.modi <at> gmail.com>
To: 31929 <at> debbugs.gnu.org, Philipp Stephani <phst <at> google.com>
Subject: Re: bug#31929: closed (Re: [PATCH] Install emacs-module.h (Bug#31929))
Date: Wed, 3 Oct 2018 16:27:36 -0400
[Message part 1 (text/plain, inline)]
On Wed, Oct 3, 2018 at 4:03 PM GNU bug Tracking System <help-debbugs <at> gnu.org>
wrote:

> Your bug report
>
> #31929: 27.0.50; Have make install copy the emacs-module.h to the
> destination install dir
>
> which was filed against the emacs package, has been closed.Since there
> were no more comments, I've installed (a tiny variant of) this patch as
> 00ea749f2a.
>

Hi Philipp,

Thanks for fixing this. Interestingly this only the second email I got from
GNU debbugs. The first email was acknowledge email when I filed that bug.

Now when I see https://debbugs.gnu.org/cgi/bugreport.cgi?bug=31929, I
notice that a lot of conversation happened, but I got none of those emails.

In any case, I see that this bug was closed in
http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=00ea749f2af44bff6ea8c1259477fbf0ead8a306,
and that commit looks good.

Thanks again.

Kaushal
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#31929; Package emacs. (Wed, 03 Oct 2018 20:50:01 GMT) Full text and rfc822 format available.

Message #40 received at 31929 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Kaushal Modi <kaushal.modi <at> gmail.com>
Cc: Philipp Stephani <phst <at> google.com>, 31929 <at> debbugs.gnu.org
Subject: Re: bug#31929: closed (Re: [PATCH] Install emacs-module.h (Bug#31929))
Date: Wed, 03 Oct 2018 16:49:11 -0400
Kaushal Modi wrote:

> Thanks for fixing this. Interestingly this only the second email I got from
> GNU debbugs. The first email was acknowledge email when I filed that bug.
>
> Now when I see https://debbugs.gnu.org/cgi/bugreport.cgi?bug=31929, I
> notice that a lot of conversation happened, but I got none of those emails.

This is what happens when people don't use reply-to-all.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#31929; Package emacs. (Wed, 03 Oct 2018 20:52:02 GMT) Full text and rfc822 format available.

Message #43 received at 31929 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 31929 <at> debbugs.gnu.org
Cc: p.stephani2 <at> gmail.com, kaushal.modi <at> gmail.com
Subject: Re: bug#31929: [PATCH] Install emacs-module.h (Bug#31929)
Date: Wed, 03 Oct 2018 16:51:04 -0400
After the fact, I'm wondering if this should obey the EMACS_NAME
transformation? My initial feeling is, yes.





bug Marked as fixed in versions 27.1. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Wed, 03 Oct 2018 20:53:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#31929; Package emacs. (Thu, 04 Oct 2018 16:17:01 GMT) Full text and rfc822 format available.

Message #48 received at 31929 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Philipp Stephani <p.stephani2 <at> gmail.com>
Cc: 31929 <at> debbugs.gnu.org, kaushal.modi <at> gmail.com
Subject: Re: bug#31929: [PATCH] Install emacs-module.h (Bug#31929)
Date: Thu, 04 Oct 2018 19:16:08 +0300
> From: Philipp Stephani <p.stephani2 <at> gmail.com>
> Date: Wed, 3 Oct 2018 22:02:08 +0200
> Cc: Philipp Stephani <phst <at> google.com>
> 
> Since there were no more comments, I've installed (a tiny variant of) this patch as 00ea749f2a.

Please cherry-pick this to the release branch.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#31929; Package emacs. (Sat, 06 Oct 2018 10:20:02 GMT) Full text and rfc822 format available.

Message #51 received at 31929 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: p.stephani2 <at> gmail.com, 31929 <at> debbugs.gnu.org, kaushal.modi <at> gmail.com
Subject: Re: bug#31929: [PATCH] Install emacs-module.h (Bug#31929)
Date: Sat, 06 Oct 2018 13:19:24 +0300
> From: Glenn Morris <rgm <at> gnu.org>
> Date: Wed, 03 Oct 2018 16:51:04 -0400
> Cc: p.stephani2 <at> gmail.com, kaushal.modi <at> gmail.com
> 
> After the fact, I'm wondering if this should obey the EMACS_NAME
> transformation? My initial feeling is, yes.

I'm not sure.  If we edit the name, a given module couldn't be
compiled against differently-named Emacs distributions, which I think
is undesirable.  Also, compiling a module inside the Emacs tree and
outside it will need source-level changes to support both.  Lastly, we
name the file explicitly in the documentation.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#31929; Package emacs. (Mon, 15 Oct 2018 20:05:02 GMT) Full text and rfc822 format available.

Message #54 received at 31929 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: p.stephani2 <at> gmail.com, 31929 <at> debbugs.gnu.org, kaushal.modi <at> gmail.com
Subject: Re: bug#31929: [PATCH] Install emacs-module.h (Bug#31929)
Date: Mon, 15 Oct 2018 16:04:49 -0400
Eli Zaretskii wrote:

>> After the fact, I'm wondering if this should obey the EMACS_NAME
>> transformation? My initial feeling is, yes.
>
> I'm not sure.  If we edit the name, a given module couldn't be
> compiled against differently-named Emacs distributions, which I think
> is undesirable. 

I think it is what users of the --program-prefix|suffix|transform
configure options will probably expect to happen.
Ie if someone wants "emacs" installed as "emacs27", I think they want
"emacs27-module.h" as well.

> Lastly, we name the file explicitly in the documentation.

The documentation also names eg the "emacs" and "emacslient"
executables, which are rather more fundamental. The documentation does
not account for the --program-transform etc options anywhere, and I
don't think it should. It's a specialized feature, and people who use it
should be able to deal with the consequences.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#31929; Package emacs. (Tue, 16 Oct 2018 02:30:02 GMT) Full text and rfc822 format available.

Message #57 received at 31929 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: p.stephani2 <at> gmail.com, 31929 <at> debbugs.gnu.org, kaushal.modi <at> gmail.com
Subject: Re: bug#31929: [PATCH] Install emacs-module.h (Bug#31929)
Date: Tue, 16 Oct 2018 05:29:47 +0300
> From: Glenn Morris <rgm <at> gnu.org>
> Cc: 31929 <at> debbugs.gnu.org,  p.stephani2 <at> gmail.com,  kaushal.modi <at> gmail.com
> Date: Mon, 15 Oct 2018 16:04:49 -0400
> 
> > Lastly, we name the file explicitly in the documentation.
> 
> The documentation also names eg the "emacs" and "emacslient"

I mean the examples in which there's an #include statement.  It's not
the same as naming executables, IMO.

I think we should wait until we hear real-life use cases where the
fixed name is a problem, before we decide on a solution.




Forcibly Merged 31929 32763 33228. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Thu, 01 Nov 2018 15:51:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 30 Nov 2018 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 199 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.