This is the mail archive of the
automake@gnu.org
mailing list for the automake project.
confused: $DISTDIR not recognized by distcheck
- From: Richard Bos <radoeka at xs4all dot nl>
- To: automake at gnu dot org
- Date: Mon, 17 May 2004 11:17:51 +0200
- Subject: confused: $DISTDIR not recognized by distcheck
- Reply-to: richard dot bos at xs4all dot nl
Hello list,
I'm confused how to use DESTDIR in an install hook in combination with target
distcheck.
When using $(prefix) in Makefile.am 'make distcheck' is succesfull,
but make DESTDIR=$PWD/blah fails:
(below is my result with DESTDIR in the Makefile.am instead of prefix)
---
# make DESTDIR=$PWD/blah
......
make install-data-hook
make[4]: Entering directory `/tmp/server.tmp'
echo DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG
DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG
echo prefix /
prefix /
echo
for i in cgi-bin icons; do \
install -d -m 0755 //srv/server/www/cgi-bin/$i; \
done
install: cannot create directory `//srv/server': Permission denied
install: cannot create directory `//srv/server': Permission denied
Makeinstall
---------------
install-data-hook:
echo DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG
echo prefix $(prefix)
echo $(webserver_document_root)
for i in cgi-bin icons; do \
install -d -m 0755 $(prefix)/srv/server/www/cgi-bin/$$i; \
done
for i in freebusy locks; do \
install -d -m 0777 $(prefix)/srv/server/www/cgi-bin/$$i; \
done
echo DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG
If I change $(prefix) into $(DESTDIR) in the generated Makefile,
make DESTDIR=$PWD/blah install succeeds:
---
make install-data-hook
make[4]: Entering directory `/tmp/server.tmp'
echo DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG
DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG
for i in cgi-bin icons; do \
install -d -m 0755 /tmp/server.tmp/blah/srv/server/www/cgi-bin/$i; \
done
for i in freebusy locks; do \
install -d -m 0777 /tmp/server.tmp/blah/srv/server/www/cgi-bin/$i; \
done
echo DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG
DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG
make[4]: Leaving directory `/tmp/server.tmp'
If I use $(DESTDIR) in Makefile.am instead of $(prefix) the make distcheck
fails:
----
# make distcheck
......
make install-data-hook
make[5]: Entering directory `/tmp/server.tmp/server-2.0/_build'
echo DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG
DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG
echo DESTDIR
DESTDIR
for i in cgi-bin icons; do \
install -d -m 0755 /srv/server/www/cgi-bin/$i; \
done
install: cannot create directory `/srv/server': Permission denied
install: cannot create directory `/srv/server': Permission denied
make[5]: *** [install-data-hook] Error 1
Makefile.am
------------
install-data-hook:
echo DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG
echo DESTDIR $(DESTDIR)
for i in cgi-bin icons; do \
install -d -m 0755 $(DESTDIR)/srv/server/www/cgi-bin/$$i; \
done
for i in freebusy locks; do \
install -d -m 0777 $(DESTDIR)/srv/server/www/cgi-bin/$$i; \
done
echo DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG
The 'make DESTDIR=$PWD/blah install' command succeeds.
Why does my 'make distcheck' fail??
--
TIA,
Richard Bos
Without a home the journey is endless