[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: New from emacs-snapshot



Daniel Brockman <daniel@brockman.se> writes:

> I write:
>
>> # This shouldn't be needed as of 20.3
>> -local_lpath := ${local_lpath}:$(EMACS_COMMON)/usr/share/emacs/${runtime_ver}/leim
>> +#local_lpath := ${local_lpath}:/usr/share/emacs/${runtime_ver}/leim
>
> Actually, make that
>
> # This shouldn't be needed as of 20.3
> -local_lpath := ${local_lpath}:$(EMACS_COMMON)/usr/share/emacs/${runtime_ver}/leim
> +local_lpath := ${local_lpath}:/usr/share/emacs/${runtime_ver}/leim

Okay, so removing the $(EMACS_COMMON) bits created some problems of
its own.  Actually, I have no idea how I was able to compile with that
patch applied.

Anyway, I've looked at how the emacs21 package does things and here's
what I've got.  You need to change both Makefile.in, like this,

Index: Makefile.in
===================================================================
RCS file: /cvsroot/emacs/emacs/Makefile.in,v
retrieving revision 1.301
diff -u -r1.301 Makefile.in
--- Makefile.in	11 Dec 2004 00:03:11 -0000	1.301
+++ Makefile.in	9 May 2005 20:52:44 -0000
@@ -523,6 +523,8 @@
 ### we may be creating several layers of directories (for example,
 ### /usr/local/lib/emacs/19.0/mips-dec-ultrix4.2), we use mkinstalldirs
 ### instead of mkdir.  Not all systems' mkdir programs have the `-p' flag.
+###
+### ${debepkgdir} is set in debian/rules.
 mkdir: FRC
 	if [ -d ${datadir} ]; then true; else \
 	  $(srcdir)/mkinstalldirs ${datadir}; \
@@ -532,7 +534,7 @@
 	  ${bindir} ${docdir} ${libexecdir} \
 	  ${datadir}/emacs/site-lisp \
 	  ${datadir}/emacs/${version}/site-lisp \
-	  `echo ${locallisppath} | sed 's/:/ /g'`
+	  `echo ${debepkgdir}${locallisppath} | sed 's|:| ${debepkgdir}|g'`
 
 ### Delete all the installed files that the `install' target would
 ### create (but not the noninstalled files such as `make all' would
and debian/rules, like this,

--- orig/rules
+++ mod/rules
@@ -180,14 +180,14 @@
 EMACS_GTK = $(CURDIR)/debian/${bin_name}-gtk
 EMACS_EL = $(CURDIR)/debian/${bin_name}-el
 
-local_lpath := $(EMACS_COMMON)/etc/${bin_name}:$(EMACS_COMMON)/etc/emacs
-local_lpath := ${local_lpath}:$(EMACS_COMMON)/usr/local/share/emacs/${runtime_ver}/site-lisp
-local_lpath := ${local_lpath}:$(EMACS_COMMON)/usr/local/share/emacs/site-lisp
-local_lpath := ${local_lpath}:$(EMACS_COMMON)/usr/share/emacs/${runtime_ver}/site-lisp
-local_lpath := ${local_lpath}:$(EMACS_COMMON)/usr/share/emacs/site-lisp
+local_lpath := /etc/${bin_name}:/etc/emacs
+local_lpath := ${local_lpath}:/usr/local/share/emacs/${runtime_ver}/site-lisp
+local_lpath := ${local_lpath}:/usr/local/share/emacs/site-lisp
+local_lpath := ${local_lpath}:/usr/share/emacs/${runtime_ver}/site-lisp
+local_lpath := ${local_lpath}:/usr/share/emacs/site-lisp
 
 # This shouldn't be needed as of 20.3
-local_lpath := ${local_lpath}:$(EMACS_COMMON)/usr/share/emacs/${runtime_ver}/leim
+local_lpath := ${local_lpath}:/usr/share/emacs/${runtime_ver}/leim
 
 # These files must always exist, i.e. can't ever be cleaned.
 PERSISTENT_AUTOGEN_FILES := debian/control debian/copyright
@@ -418,11 +418,13 @@
 	${expand_file_subst_vars}
 
 define build_cmd
-	${MAKE} CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}"
+	${MAKE} CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" \
+	  locallisppath=${local_lpath}
 endef
 
 emacs_inst = (${MAKE} install \
 		INSTALL_STRIP="-s" \
+		debepkgdir=${1} \
 		prefix=${1}/usr \
 		sharedstatedir=${1}/var/lib \
 		localstatedir=${1}/var \
@@ -467,11 +469,13 @@
 	# Emacs must be boostraped at least once in order to
 	# generate .elc files
 	CFLAGS="${CFLAGS}" ./configure ${emacs_confflags}
+	${build_cmd} epaths-force
 	${build_cmd} bootstrap
 	${build_cmd} distclean
 
 	# Build emacs
 	CFLAGS="${CFLAGS}" ./configure ${emacs_confflags}
+	${build_cmd} epaths-force
 	${build_cmd}
 	# save binary from deletion
 	mv src/emacs src/x-emacs
@@ -479,6 +483,7 @@
 
 	# Build emacs-gtk
 	CFLAGS="${CFLAGS}" ./configure ${emacs_gtk_confflags}
+	${build_cmd} epaths-force
 	time ${build_cmd}
 	# save binary from deletion
 	mv src/emacs src/gtk-emacs
@@ -486,6 +491,7 @@
 
 	# Build emacs-nox
 	CFLAGS="${CFLAGS}" ./configure ${emacs_nox_confflags}
+	${build_cmd} epaths-force
 	time ${build_cmd}
 	# save binary from deletion
 	mv src/emacs src/nox-emacs
That'll let you get rid of the `load-path' hack ---
/etc/emacs/site-start.d/00ensure-policy-conforming-load-path.el.

Yes, it actually seems to work this time. :-)

-- 
Daniel Brockman <daniel@brockman.se>

Reply to: