>>> "Bruce" == Bruce Korb <[EMAIL PROTECTED]> writes:

[...]

 >> Why don't you simply use DIST_SUBDIRS?

[...]

 Bruce> 2.  Even now that I've read it, using it would mean taking over
 Bruce> an automatable chore from automake.

I don't get this.  Which chore should be automated?  

The definition of DIST_SUBDIRS *is* automated, unless you use
Autoconf variables.  Automake can't guess the possible values of
an Autoconf variable, so you have to define DIST_SUBDIRS
yourself in this case.

 Bruce> 3.  It won't solve the problem anyway.  

Why?   I'm guessing you have something like

   SUBDIRS = foo @MAYBE_BAR@
   EXTRA_DIST = bar

Then when @MAYBE_BAR@ is set to `bar', `make dist' will copy bar/
twice.  Boom.

If instead you use

   SUBDIRS = foo @MAYBE_BAR@
   DIST_SUBDIRS = foo bar

then bar/ will be copied only once.

Alternatively you can also use something along the lines of 

   if BAR
     MAYBE_BAR = bar
   fi
   SUBDIRS = foo $(MAYBE_BAR)

(Here Automake can compute DIST_SUBDIRS for you.)

[...]

 Bruce> A better fix is to add back write permissions after the
 Bruce> first (conditional) copy.

I aggree, but that's a secondary issue.  You face this problem
(and others) because you have the same directory listed in both
SUBDIRS and EXTRA_DIST.

-- 
Alexandre Duret-Lutz



Reply via email to