[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
duplicate installdirs bug
From: |
David Fang |
Subject: |
duplicate installdirs bug |
Date: |
Thu, 14 Jun 2007 23:27:22 -0400 (EDT) |
Hi,
With automake 1.9.6, I'm getting distcheck failures during the
install phase (or just during non-distcheck make install):
============= reduced Makefile.am =================
# let package name == 'yoyodyne'
foodir = $(pkgdatadir)/foo
foo_DATA = file1
dist_foo_DATA = file2
===================================================
--------- results in (Makefile.in): ---------------
===================================================
# note the duplicate
am__installdirs = "$(DESTDIR)$(foodir) $(DESTDIR)$(foodir)"
...
installdirs-am:
for dir in "$(DESTDIR)$(foodir)" "$(DESTDIR)$(foodir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
done
===================================================
which errors out during "make DESTDIR=/tmp/somewhere install"
on the second iteration of the for-loop.
mkdir: /tmp/somewhere/usr/local/share/yoyodyne/foo: File exists
Workaround: if I wrote my DATA files as a single foo_DATA instead of split
# equivalent to above
foo_DATA = file1 file2
EXTRA_DIST = file2
Then the installdirs will be duplicate-free. Not too much trouble.
or fix: hack automake to eliminate repeated dirs in $(am__installdirs)
or add a clause after $(mkdir_p) ... || : to make it never fail or ignore
exit status of $(mkdir_p)? (not the greatest idea)
or add a 'test -d' for directory existence before $(mkdir_p)-ing it?
Haven't tested this case against automake-1.10 yet.
Thanks for investigating.
Fang
- duplicate installdirs bug,
David Fang <=