|
From: James R. V. Z. <jr...@co...> - 2004-04-10 15:49:45
|
somebody wrote:
> The only problem/annoyance I have is that the 'make' process tries
> to update files in the system directory /usr/share/emacs/site-lisp/,
> which means that I get error messages if I'm not building as root.
> Seems to be harmless, though.
I'm trying to reconstruct a different problem, and tripped over this.
My builds failed like this:
make[2]: Entering directory `/home/local/src/gnuplot/cvs/gnuplot/lisp'
/bin/sh ./mkinstalldirs /usr/local/share/emacs/site-lisp
/usr/bin/install -c -m 644 gnuplot-gui.el /usr/local/share/emacs/site-lisp/gnuplot-gui.el
/usr/bin/install: cannot remove `/usr/local/share/emacs/site-lisp/gnuplot-gui.el': Permission denied
...
I'm appending lisp/Makefile (sorry about the length). Apparently the
offending commands come from the "install-els" target via this chain:
all -> all-redirect -> all-am -> $(LISP) -> $(INSTALL_LISP)
-> install-lisp -> install-els
the suspicious line being:
all-am: Makefile $(LISP)
which comes from an identical line in lisp/Makefile.in.
I can reproduce this by running this in the lisp/ directory:
make clean && ./prepare ; automake --add-missing --copy &&
autoconf && ./configure && make
(There's no "prepare" script there, so that part fails.)
However, running the same commands in the top directory fixes things,
and the build succeeds.
Here are the file differences between the working and failing versions
of the lisp/ directory:
$ diff --brief -r . /tmp/working/lisp
Files ./Makefile and /tmp/working/lisp/Makefile differ
Files ./Makefile.in and /tmp/working/lisp/Makefile.in differ
Files ./config.status and /tmp/working/lisp/config.status differ
Only in /tmp/working/lisp: gnuplot-gui.elc
Only in /tmp/working/lisp: gnuplot.elc
Here are the differences in config.status:
$ diff -u /tmp/working/lisp/config.status config.status
--- /tmp/working/lisp/config.status 2004-04-10 10:55:38.000000000 -0400
+++ config.status 2004-04-10 10:55:49.000000000 -0400
@@ -4,7 +4,7 @@
# This directory was configured as follows,
# on host vanzandt:
#
-# ./configure --prefix=/usr/local --cache-file=/dev/null --srcdir=.
+# ./configure
#
# Compiler output produced by configure, useful for debugging
# configure, is in ./config.log if it exists.
@@ -14,8 +14,8 @@
do
case "$ac_option" in
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running ${CONFIG_SHELL-/bin/sh} ./configure --prefix=/usr/local --cache-file=/dev/null --srcdir=. --no-create --no-recursion"
- exec ${CONFIG_SHELL-/bin/sh} ./configure --prefix=/usr/local --cache-file=/dev/null --srcdir=. --no-create --no-recursion ;;
+ echo "running ${CONFIG_SHELL-/bin/sh} ./configure --no-create --no-recursion"
+ exec ${CONFIG_SHELL-/bin/sh} ./configure --no-create --no-recursion ;;
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
echo "./config.status generated by autoconf version 2.13"
exit 0 ;;
Both were generated by the same version of autoconf:
$ grep "generated.*autoconf" config.status /tmp/working/lisp/config.status
config.status: echo "./config.status generated by autoconf version 2.13"
/tmp/working/lisp/config.status: echo "./config.status generated by autoconf version 2.13"
I don't see any significant differences, and in fact executing the
working config.status in the failing directory, then typing "make"
still fails.
Comparing the two versions of Makefile.in shows:
$ diff -u /tmp/working/lisp/Makefile.in Makefile.in
--- /tmp/working/lisp/Makefile.in 2004-04-10 10:55:38.000000000
-0400
+++ Makefile.in 2004-04-10 10:55:47.000000000 -0400
@@ -38,7 +38,7 @@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
+top_builddir = .
...
@@ -168,13 +221,14 @@
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-am
-uninstall-am: uninstall-local
+uninstall-am: uninstall-INSTALLLISP uninstall-local
uninstall: uninstall-am
-all-am: Makefile
+all-am: Makefile $(LISP)
all-redirect: all-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
installdirs:
+ $(mkinstalldirs) $(DESTDIR)$(INSTALLdir)
mostlyclean-generic:
The initial lines of the files are the same, so the same version
of automake created both files.
Although I've made some progress, I do not understand what happened
here. The first time, I had started in the top directory, _not_ in
lisp/.
For what it's worth, here are my default program versions:
$ aclocal --version
aclocal (GNU automake) 1.4-p6
...
$ automake --version
automake (GNU automake) 1.4-p6
...
$ autoconf --version
Autoconf version 2.13
However, I do have other versions installed:
$ ls /usr/bin/auto{make,conf}*
/usr/bin/autoconf /usr/bin/autoconf2.50 /usr/bin/automake-1.7
/usr/bin/autoconf-wrapper /usr/bin/automake
/usr/bin/autoconf2.13 /usr/bin/automake-1.4
- Jim Van Zandt
-------------------- failing version of Makefile -----------------
# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
SHELL = /bin/sh
srcdir = .
top_srcdir = .
prefix = /usr/local
exec_prefix = ${prefix}
bindir = ${exec_prefix}/bin
sbindir = ${exec_prefix}/sbin
libexecdir = ${exec_prefix}/libexec
datadir = ${prefix}/share
sysconfdir = ${prefix}/etc
sharedstatedir = ${prefix}/com
localstatedir = ${prefix}/var
libdir = ${exec_prefix}/lib
infodir = ${prefix}/info
mandir = ${prefix}/man
includedir = ${prefix}/include
oldincludedir = /usr/include
DESTDIR =
pkgdatadir = $(datadir)/gnuplot-mode
pkglibdir = $(libdir)/gnuplot-mode
pkgincludedir = $(includedir)/gnuplot-mode
top_builddir = .
ACLOCAL = aclocal-1.4
AUTOCONF = autoconf
AUTOMAKE = automake-1.4
AUTOHEADER = autoheader
INSTALL = /usr/bin/install -c
INSTALL_PROGRAM = ${INSTALL} $(AM_INSTALL_PROGRAM_FLAGS)
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_SCRIPT = ${INSTALL}
transform = s,x,x,
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_alias =
host_triplet = @host@
CC = @CC@
DVIPS = dvips
EMACS = emacs
HAVE_LIB = @HAVE_LIB@
INFO_LOOK_ELC =
INSTALL_LISP = install-lisp
LATEX = latex
LIB = @LIB@
LISPFILES = elcs
LTLIB = @LTLIB@
MAKEINFO = /usr/bin/makeinfo
PACKAGE = gnuplot-mode
PDFLATEX = pdflatex
VERSION = 0.6.0
lispdir = $(prefix)/share/emacs/site-lisp
AUTOMAKE_OPTIONS = foreign 1.2h
ELS = gnuplot-gui.el gnuplot.el info-look.20.2.el info-look.20.3.el
ELCS = gnuplot.elc gnuplot-gui.elc
EXTRA_DIST = dot.el dotemacs gnuplot.el.old gpelcard.dvi gpelcard.pdf gpelcard.ps gpelcard.tex $(ELS)
CLEANFILES = $(ELCS) gpelcard.pdf gpelcard.ps gpelcard.dvi gpelcard.log gpelcard.aux
DISTCLEANFILES = info-look.el
BYTEC = $(EMACS) -batch -q -no-site-file -l $(srcdir)/dot.el -f batch-byte-compile
SUFFIXES = .el .elc .pdf .ps .tex
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_CLEAN_FILES =
CFLAGS = @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
LISP = $(INSTALL_LISP)
DIST_COMMON = README COPYING ChangeLog INSTALL Makefile.am Makefile.in \
aclocal.m4 configure configure.in install-sh missing mkinstalldirs
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
GZIP_ENV = --best
all: all-redirect
.SUFFIXES:
.SUFFIXES: .el .elc .pdf .ps .tex
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
cd $(top_builddir) \
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
$(ACLOCAL_M4): configure.in
cd $(srcdir) && $(ACLOCAL)
config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
cd $(srcdir) && $(AUTOCONF)
install-INSTALLLISP: $(INSTALL_LISP) $(ELCFILES)
@$(NORMAL_INSTALL)
@if test -n "$(lispdir)"; then \
$(mkinstalldirs) $(DESTDIR)$(INSTALLdir); \
list='$(INSTALL_LISP)'; for p in $$list; do \
if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \
echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(INSTALLdir)/$$p"; \
$(INSTALL_DATA) $$d$$p $(DESTDIR)$(INSTALLdir)/$$p; \
if test -f $${p}c; then \
echo " $(INSTALL_DATA) $${p}c $(DESTDIR)$(INSTALLdir)/$${p}c"; \
$(INSTALL_DATA) $${p}c $(DESTDIR)$(INSTALLdir)/$${p}c; \
else : ; fi; \
done; \
else : ; fi
uninstall-INSTALLLISP:
@$(NORMAL_UNINSTALL)
@if test -n "$(lispdir)"; then \
list='$(INSTALL_LISP)'; for p in $$list; do \
rm -f $(DESTDIR)$(INSTALLdir)/$$p $(DESTDIR)$(INSTALLdir)/$${p}c; \
done; \
else : ; fi
tags: TAGS
TAGS:
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
-rm -rf $(distdir)
GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
mkdir $(distdir)/=build
mkdir $(distdir)/=inst
dc_install_base=`cd $(distdir)/=inst && pwd`; \
cd $(distdir)/=build \
&& ../configure --srcdir=.. --prefix=$$dc_install_base \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
&& $(MAKE) $(AM_MAKEFLAGS) dist
-rm -rf $(distdir)
@banner="$(distdir).tar.gz is ready for distribution"; \
dashes=`echo "$$banner" | sed s/./=/g`; \
echo "$$dashes"; \
echo "$$banner"; \
echo "$$dashes"
dist: distdir
-chmod -R a+r $(distdir)
GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
-rm -rf $(distdir)
dist-all: distdir
-chmod -R a+r $(distdir)
GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
-rm -rf $(distdir)
distdir: $(DISTFILES)
-rm -rf $(distdir)
mkdir $(distdir)
-chmod 777 $(distdir)
here=`cd $(top_builddir) && pwd`; \
top_distdir=`cd $(distdir) && pwd`; \
distdir=`cd $(distdir) && pwd`; \
cd $(top_srcdir) \
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --foreign Makefile
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
cp -pr $$d/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file || :; \
fi; \
done
info-am:
info: info-am
dvi-am:
dvi: dvi-am
check-am: all-am
check: check-am
installcheck-am:
installcheck: installcheck-am
install-exec-am:
install-exec: install-exec-am
install-data-am: install-INSTALLLISP
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-data-hook
install-data: install-data-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-am
uninstall-am: uninstall-INSTALLLISP uninstall-local
uninstall: uninstall-am
all-am: Makefile $(LISP)
all-redirect: all-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
installdirs:
$(mkinstalldirs) $(DESTDIR)$(INSTALLdir)
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
mostlyclean-am: mostlyclean-generic
mostlyclean: mostlyclean-am
clean-am: clean-generic mostlyclean-am
clean: clean-am
distclean-am: distclean-generic clean-am distclean-local
distclean: distclean-am
-rm -f config.status
maintainer-clean-am: maintainer-clean-generic distclean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
maintainer-clean: maintainer-clean-am
-rm -f config.status
.PHONY: uninstall-INSTALLLISP install-INSTALLLISP tags distdir info-am \
info dvi-am dvi check check-am installcheck-am installcheck \
install-exec-am install-exec install-data-am install-data install-am \
install uninstall-local uninstall-am uninstall all-redirect all-am all \
installdirs mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
.el.elc:
$(BYTEC) $<
.dvi.ps:
$(DVIPS) -o $@ $<
.tex.dvi:
$(LATEX) $<
.tex.pdf:
$(PDFLATEX) $<
all: elcs
elcs: $(ELCS)
noelcs:
pdf: gpelcard.pdf
ps: gpelcard.ps
install-data-hook: install-lisp
install-lisp: install-els install-elcs
install-nolisp:
install-els: $(ELS)
$(mkinstalldirs) $(DESTDIR)$(lispdir)
@for p in $(ELS) ; do \
echo " $(INSTALL_DATA) $$p $(DESTDIR)$(lispdir)/$$p"; \
$(INSTALL_DATA) $$p $(DESTDIR)$(lispdir)/$$p; \
done
install-elcs: $(ELCS)
$(mkinstalldirs) $(DESTDIR)$(lispdir)
@for p in $(ELCS) ; do \
echo " $(INSTALL_DATA) $$p $(DESTDIR)$(lispdir)/$$p"; \
$(INSTALL_DATA) $$p $(DESTDIR)$(lispdir)/$$p; \
done
uninstall-local:
@$(NORMAL_UNINSTALL)
@for p in $(ELCS) $(ELS) ; do \
rm -f $(DESTDIR)$(lispdir)/$$p; \
done
distclean-local:
@if test "$(top_srcdir)" != "$(top_builddir)" ; then \
rm -f gnuplot.el gnuplot-gui.el gpelcard.tex ; \
fi
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
|