all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Including C sources in packaged Emacs
@ 2016-02-28  0:41 Wilfred Hughes
  2016-02-28  3:34 ` Paul Eggert
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Wilfred Hughes @ 2016-02-28  0:41 UTC (permalink / raw
  To: emacs-devel


[-- 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-:

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-03-02 21:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-28  0:41 Including C sources in packaged Emacs Wilfred Hughes
2016-02-28  3:34 ` 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

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.