all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Wilfred Hughes <me@wilfred.me.uk>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Paul Eggert <eggert@cs.ucla.edu>, emacs-devel <emacs-devel@gnu.org>
Subject: Re: Including C sources in packaged Emacs
Date: Wed, 2 Mar 2016 21:49:12 +0000	[thread overview]
Message-ID: <CAFXAjY6DBWRCfAF1ymd38c81kt6F0n6FGLpJ0yhhmNM5mY2xBA@mail.gmail.com> (raw)
In-Reply-To: <8337scc0bh.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 623 bytes --]

OK, I've updated the patch so configure takes a --with-builtin-sources
argument, which is off by default.

On 28 February 2016 at 15:38, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Paul Eggert <eggert@cs.ucla.edu>
>> Date: Sat, 27 Feb 2016 19:34:25 -0800
>>
>> Wilfred Hughes wrote:
>> > Does this seem reasonable? Is there some configure flag that does this
>> > already?
>>
>> It seems reasonable, for the same reason we install .el files.
>
> Installing C sources could be an option, off by default.  But
> installing always or by default is something we shouldn't do, IMO.
> Many users will not want or need that.
>
>

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

diff --git a/Makefile.in b/Makefile.in
index 7aac403..9bbe820 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -141,6 +141,9 @@ datarootdir=@datarootdir@
 # and ${etcdir} are subdirectories of this.
 datadir=@datadir@
 
+# Where to install C sources of builtin functions.
+builtinsrcdir=@builtinsrcdir@
+
 # Where to install and expect the files that Emacs modifies as it
 # runs.  These files are all architecture-independent.
 # Right now, this is not used.
@@ -460,7 +463,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-builtin-src install-etcdoc install-info
 .PHONY: install-man install-etc install-strip install-$(NTDIR)
 .PHONY: uninstall uninstall-$(NTDIR)
 
@@ -468,7 +471,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-builtin-src install-etcdoc install-arch-dep install-$(NTDIR) blessmail
 	@true
 
 ## Ensure that $subdir contains a subdirs.el file.
@@ -504,6 +507,14 @@ else
 	rm -rf ${ns_appresdir}/share
 endif
 
+### Copy C sources of builtin function to the destination dir, so
+### users can view the source code of C functions with `find-file'.
+install-builtin-src:
+ifneq (${builtinsrcdir},)
+	${MKDIR_P} "${builtinsrcdir}"
+	cp ${srcdir}/src/*.{c,h} "${builtinsrcdir}"
+endif
+
 ### Windows-specific install target for installing programs produced
 ### in nt/, and its Posix do-nothing shadow.
 install-:
diff --git a/configure.ac b/configure.ac
index e750a43..8b45007 100644
--- a/configure.ac
+++ b/configure.ac
@@ -196,6 +196,7 @@ dnl hence the single quotes.  This is per the GNU coding standards, see
 dnl (autoconf) Installation Directory Variables
 dnl See also epaths.h below.
 lispdir='${datadir}/emacs/${version}/lisp'
+builtinsrcdir='${datadir}/emacs/${version}/src'
 standardlisppath='${lispdir}'
 locallisppath='${datadir}/emacs/${version}/site-lisp:'\
 '${datadir}/emacs/site-lisp'
@@ -410,6 +411,13 @@ case ${with_gameuser} in
   *) gameuser=${with_gameuser} ;;
 esac
 
+OPTION_DEFAULT_OFF([builtin-sources],[install C sources of built-in functions])
+
+echo "with builtin sources: $with_builtin_sources"
+if test $with_builtin_sources != "yes"; then
+   builtinsrcdir=
+fi
+
 AC_ARG_WITH([gnustep-conf],dnl
 [AS_HELP_STRING([--with-gnustep-conf=FILENAME],
    [name of GNUstep configuration file to use on systems where the command
@@ -4876,6 +4884,7 @@ AC_SUBST(libexecdir)
 AC_SUBST(mandir)
 AC_SUBST(infodir)
 AC_SUBST(lispdir)
+AC_SUBST(builtinsrcdir)
 AC_SUBST(standardlisppath)
 AC_SUBST(locallisppath)
 AC_SUBST(lisppath)

  reply	other threads:[~2016-03-02 21:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

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

  git send-email \
    --in-reply-to=CAFXAjY6DBWRCfAF1ymd38c81kt6F0n6FGLpJ0yhhmNM5mY2xBA@mail.gmail.com \
    --to=me@wilfred.me.uk \
    --cc=eggert@cs.ucla.edu \
    --cc=eliz@gnu.org \
    --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 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.