unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Wilfred Hughes <me@wilfred.me.uk>
To: emacs-devel <emacs-devel@gnu.org>
Subject: Including C sources in packaged Emacs
Date: Sun, 28 Feb 2016 00:41:08 +0000	[thread overview]
Message-ID: <CAFXAjY63zpPV5-Mzr84vd=Hd_6MZoCc0WwJy5dfC8Uo0oSRy0A@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 473 bytes --]

Currently, most (all?) linux distros package Emacs without C sources. As a
result, find-function does not work for any functions written in C. Users
who have compiled Emacs themselves have the source, but most don't.

I would love to see Emacs include its C code in /usr/share. In principle
this would just be a change to the build script, and I've attached a patch
that would work.

Does this seem reasonable? Is there some configure flag that does this
already?

Wilfred

[-- Attachment #1.2: Type: text/html, Size: 525 bytes --]

[-- Attachment #2: install_c_src.diff --]
[-- Type: text/plain, Size: 1383 bytes --]

diff --git a/Makefile.in b/Makefile.in
index 7aac403..6f958ae 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -460,7 +460,7 @@ $(srcdir)/src/stamp-h.in: $(AUTOCONF_INPUTS)
 
 # ==================== Installation ====================
 
-.PHONY: install install-arch-dep install-arch-indep install-etcdoc install-info
+.PHONY: install install-arch-dep install-arch-indep install-c-src install-etcdoc install-info
 .PHONY: install-man install-etc install-strip install-$(NTDIR)
 .PHONY: uninstall uninstall-$(NTDIR)
 
@@ -468,7 +468,7 @@ $(srcdir)/src/stamp-h.in: $(AUTOCONF_INPUTS)
 ## don't have to duplicate the list of utilities to install in
 ## this Makefile as well.
 
-install: all install-arch-indep install-etcdoc install-arch-dep install-$(NTDIR) blessmail
+install: all install-arch-indep install-c-src install-etcdoc install-arch-dep install-$(NTDIR) blessmail
 	@true
 
 ## Ensure that $subdir contains a subdirs.el file.
@@ -504,6 +504,12 @@ else
 	rm -rf ${ns_appresdir}/share
 endif
 
+### Copy C files to the destination dir, so users can view the source
+### code of C functions with `find-file'.
+install-c-src:
+	${MKDIR_P} "$(DESTDIR)${datadir}/emacs/${version}/src"
+	cp ${srcdir}/src/*.{c,h} "$(DESTDIR)${datadir}/emacs/${version}/src"
+
 ### Windows-specific install target for installing programs produced
 ### in nt/, and its Posix do-nothing shadow.
 install-:

             reply	other threads:[~2016-02-28  0:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-28  0:41 Wilfred Hughes [this message]
2016-02-28  3:34 ` Including C sources in packaged Emacs Paul Eggert
2016-02-28 15:38   ` Eli Zaretskii
2016-03-02 21:49     ` Wilfred Hughes
2016-02-28  3:44 ` Lars Ingebrigtsen
2016-02-28  9:37 ` Andreas Schwab
2016-02-28 21:56 ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFXAjY63zpPV5-Mzr84vd=Hd_6MZoCc0WwJy5dfC8Uo0oSRy0A@mail.gmail.com' \
    --to=me@wilfred.me.uk \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).