[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "make distcheck" vs. EXTRA_DIST files made during "make dist"
From: |
Alexandre Duret-Lutz |
Subject: |
Re: "make distcheck" vs. EXTRA_DIST files made during "make dist" |
Date: |
13 May 2002 22:49:09 +0200 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 |
>>> "Greg" == Greg A Woods <address@hidden> writes:
Greg> [ On Monday, May 13, 2002 at 10:26:56 (+0200), Alexandre Duret-Lutz
wrote: ]
[...]
>> Because these distributed files are dependent upon
>> non-distributed built files.
Greg> They _are_ the built files. That my Makefile goes through two steps to
Greg> create them is irrellevant. They must be created during "make dist",
Greg> just like the "configure" script itself. They are dependent upon
Greg> distributed files but they themselves must also be distributed.
Huh? AFAICT the distributed newsyslog.cat8-dist depends on
newsyslog.cat8 which is *not* distributed (this one is
built). Likewise for the other *-dist files.
If newsyslog.cat8 was distributed we would never have seen this
problem (because newsyslog.cat8 would not be built during
distcheck, and hence the rule to rebuild newsyslog.cat8-dist
would not be triggered). But before you jump on this statement:
I have understood you don't want do this! :) I'm just trying to
explain how all these issues (Texinfo's, Autogen's, and yours)
are instances of the *same* problem:
<< distributed files dependent upon non-distributed built files >>
[...]
Greg> Although I'm not intimately familiar with those two examples, I believe
Greg> in both cases they could use the approach I've taken to eliminate the
Greg> need to re-build distributed files at "make all" time and instead only
Greg> do it at "make dist" time as I do.
It's not clear to me how this would work: their files are needed
during `make all or `make install'; that's not your case (only
copy-dist-mans needs that). I'll send this whole thread to
Bruce Korb (Autogen's author) because 1) he might likes it, 2)
he hasn't complained about this for a while :)
[...]
Greg> (The only headache those project maintainers with
Greg> multiple projects face w.r.t. the GNU Auto* tools is that
Greg> there are too many incompatible different versions of
Greg> each of them! :-)
I can't help but agree. Even without the smiley.
>> In your case I think a workaround would be to create your files
>> during `make dist' but directly in the *distribution* directory,
>> not in the source directory.
Greg> No, I don't think so. Distribution directories can be read-only. They
Greg> must not ever be modified during a VPATH reach-over build. Indeed isn't
Greg> that exactly the case with "make distcheck"?
We are talking about different things. What I call
`distribution directory', $(distdir), is the temporary directory
into which files are copied before making the tarball. This one
is obviously writable, and you can modify it right before the
tarball is made using the `dist-hook' target as I suggested in
the previous mail.
What you are talking about is the the source directory,
$(srcdir), which indeed can be read-only when building in VPATH
from a CD-ROM, or during `make distcheck'.
Greg> I'm very happy with the fix I proposed, and I think I
Greg> would be equally happy with changing the "make distclean"
Greg> call to "make maintainer-clean". (though I've not
Greg> actually tested the latter)
Greg> I'm quite capable of maintaining and using my own
Greg> Automake release (I've certainly done so before and
Greg> though I wouldn't exactly be happy to have to do so
Greg> again,
Actually, I think you have many way to workaround this from your
Makefile.am (until someone comes up with a generic solution).
If you don't like the `dist-hook:' hack I suggested, there are
other possibilities. You can override the `distcleancheck'
target in your own Makefile.am. Just duplicate `distcleancheck'
and insert a `rm -f $(MAKE_DIST)' inside.
distcleancheck: distclean
rm -f $(MAKE_DIST)
if test '$(srcdir)' = . ; then \
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
exit 1 ; \
fi
test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left after distclean:" ; \
$(distcleancheck_listfiles) ; \
exit 1; } >&2
Or even shorter, just override the `distcleancheck_listfiles' variable:
distcleancheck_listfiles = rm -f $(MAKE_DIST); find . -type f -print
I must say find the dist-hook approach much less ugly.
Greg> this is exactly the kind of feature that would make it
Greg> worth my while to do so). However given the known
Greg> commonality of this problem I would strongly suggest that
Greg> the Automake maintainers should choose one of the options
Greg> I've offered so that everyone has a common solution
Greg> available out-of-the-box.
Personally I'm not really against introducing yet another
variable, I just think it doesn't help in the other cases.
A solution which is generic enough to address the whole issue
would be better. (This said, I have nothing to suggest.)
--
Alexandre Duret-Lutz