[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


From: Eric Sunshine
Subject: Re: AC_CONFIG_COMMANDS problem
Date: Fri, 26 Sep 2003 09:10:25 -0400

On Fri, 26 Sep 2003 14:19:04 +0200, Akim Demaille wrote:
>  > AC_CONFIG_COMMANDS([foo/bar], [echo "test" > foo/bar])
>  > This results in a config.status which produces these error messages:
>  > configure: creating ./config.status
>  > ./config.status: line 1: cd: foo: No such file or directory
> [... a lot of interesting details ...]
> Well, I've always meant to enforce more or less the first argument to
> be a file, so that Automake can extract a valid rule to update
> AC_CONFIG_COMMANDS results just as it does for AC_CONFIG_FILES.  So it
> seems to me that we could add an automatic
> test -d $(dirname $1) || mkdir -p $(dirname $1)
> for AC_CONFIG_COMMANDS.  If people don't want this mkdir, it's because
> they are not creating a file, so it has no reason to look like a
> qualified path in the first place. How about that?

Provided that it is clearly documented, so that people creating non-file  
targets will know to avoid using '/' in the tag, then this solution would  

Would it also be sensible to have an option to suppress the directory  
creation behavior for those oddball cases where a person creates a non-file  
target which happens to have a '/' in the tag?  Perhaps:

AC_CONFIG_COMMANDS(tag..., [cmds], [init-cmds], [suppress-mkdir])

If suppress-mkdir is non-empty, then the default behavior of invoking mkdir  
would be suppressed.

Perhaps this is overkill, though.

-- ES

reply via email to

[Prev in Thread] Current Thread [Next in Thread]