diff --git a/Makefile.in b/Makefile.in index 7aac403..9bbe820 100644 --- a/Makefile.in +++ b/Makefile.in @@ -141,6 +141,9 @@ address@hidden@ # and ${etcdir} are subdirectories of this. address@hidden@ +# Where to install C sources of builtin functions. address@hidden@ + # 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)