GNU bug report logs -
#8326
can't override dvi: target, or others with -local
Previous Next
Reported by: karl <at> freefriends.org (Karl Berry)
Date: Wed, 23 Mar 2011 00:23:01 UTC
Severity: normal
Done: Ralf Wildenhues <Ralf.Wildenhues <at> gmx.de>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 8326 in the body.
You can then email your comments to 8326 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
owner <at> debbugs.gnu.org, bug-automake <at> gnu.org
:
bug#8326
; Package
automake
.
(Wed, 23 Mar 2011 00:23:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
karl <at> freefriends.org (Karl Berry)
:
New bug report received and forwarded. Copy sent to
bug-automake <at> gnu.org
.
(Wed, 23 Mar 2011 00:23:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Aside from the discussion in #8289 about alternatives to the hardwired
make dvi being run by make distcheck, there seems to be another problem,
namely putting a simple
dvi:
in a Makefile.am doesn't work to override the default rule. I get an
error like this:
doc/Makefile.am:12: user target `dvi' defined here...
automake: ... overrides Automake target `dvi' defined here
doc/Makefile.am:12: consider using dvi-local instead of dvi
Looking for the code that's enforcing this, I see in Rule.pm around line
this comment:
# -am targets listed in %dependencies support a -local
# variant. If the user tries to override TARGET or
# TARGET-am for which there exists a -local variant,
# just tell the user to use it.
But dvi-local does not suffice for the case at hand; that is, it can't
be used to avoid rebuilding the dvi, as far as I can see. Certainly
merely adding dvi-local: does nothing in particular. Is there another
way?
(Aside: I'm just curious, what can dvi-local actually be used for?
If there's a known use for it, I suggest mentioning it in the doc.)
As far as I can see, this behavior contradicts the documentation (node:
Extending), which simply says:
* As far as rules are concerned, a user-defined rule overrides any
`automake'-defined rule for the same target.
So my report is to suggest implementing that :). Perhaps there should
be a warning in case of such overrides, but a fatal "you can't do that"?
Else the doc should be changed.
At any rate, if there's a workaround to get a clean make distcheck with
a PDF-only manual with the currently released automake, we'd like to know.
Thanks,
Karl
Information forwarded
to
owner <at> debbugs.gnu.org, bug-automake <at> gnu.org
:
bug#8326
; Package
automake
.
(Wed, 23 Mar 2011 20:30:03 GMT)
Full text and
rfc822 format available.
Message #8 received at 8326 <at> debbugs.gnu.org (full text, mbox):
On Wednesday 23 March 2011, Karl Berry wrote:
> Aside from the discussion in #8289 about alternatives to the hardwired
> make dvi being run by make distcheck, there seems to be another problem,
> namely putting a simple
> dvi:
> in a Makefile.am doesn't work to override the default rule. I get an
> error like this:
>
> doc/Makefile.am:12: user target `dvi' defined here...
> automake: ... overrides Automake target `dvi' defined here
> doc/Makefile.am:12: consider using dvi-local instead of dvi
>
This happens almost surely because you have `override' warnings enabled,
and Automake is treating warnings as errors (do you have `-Wall -Werror'
in AM_INIT_AUTOMAKE, maybe?). If you want to override an Automake-provided
target without complaints from Automake, you must disable the `override'
warnings, e.g., by using "AUTOMAKE_OPTIONS = -Wno-override" in the affected
Makefile.am (or by not using `-Wall' in AM_INIT_AUTOMAKE, even if I would
discourage this).
> Looking for the code that's enforcing this, I see in Rule.pm around line
> this comment:
> # -am targets listed in %dependencies support a -local
> # variant. If the user tries to override TARGET or
> # TARGET-am for which there exists a -local variant,
> # just tell the user to use it.
>
> But dvi-local does not suffice for the case at hand; that is, it can't
> be used to avoid rebuilding the dvi, as far as I can see. Certainly
> merely adding dvi-local: does nothing in particular. Is there another
> way?
>
See above.
> (Aside: I'm just curious, what can dvi-local actually be used for?
> If there's a known use for it, I suggest mentioning it in the doc.)
>
If there is a known use, I don't know it; sorry!
> As far as I can see, this behavior contradicts the documentation (node:
> Extending), which simply says:
>
> * As far as rules are concerned, a user-defined rule overrides any
> `automake'-defined rule for the same target.
>
> So my report is to suggest implementing that :).
>
That's already implemented (well, almost -- it's not true for few special
targets, like `all' and `check'; maybe we should fix this inconsistency?)
> Perhaps there should be a warning in case of such overrides,
>
See above.
> but a fatal "you can't do that"?
>
You must have enabled `-Werror' somewhere... could you please confirm?
Otherwise we have a bug.
> Else the doc should be changed.
>
> At any rate, if there's a workaround to get a clean make distcheck with
> a PDF-only manual with the currently released automake, we'd like to know.
>
Adding:
AUTOMAKE_OPTIONS = -Wno-override
dvi:
to the relevant Makefile.am should be enough as a workaround (even if not
particularly clean).
> Thanks,
> Karl
>
>
HTH,
Stefano
Information forwarded
to
owner <at> debbugs.gnu.org, bug-automake <at> gnu.org
:
bug#8326
; Package
automake
.
(Wed, 23 Mar 2011 22:17:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 8326 <at> debbugs.gnu.org (full text, mbox):
do you have `-Wall -Werror'
in AM_INIT_AUTOMAKE, maybe?
You are absolutely right. It did not occur to me to look for that.
Sorry for the noise.
Feel free to close this one. Thanks much for all the hints.
Reply sent
to
Ralf Wildenhues <Ralf.Wildenhues <at> gmx.de>
:
You have taken responsibility.
(Tue, 29 Mar 2011 10:08:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
karl <at> freefriends.org (Karl Berry)
:
bug acknowledged by developer.
(Tue, 29 Mar 2011 10:08:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 8326-done <at> debbugs.gnu.org (full text, mbox):
Hi Karl, Stefano,
* Stefano Lattarini wrote on Wed, Mar 23, 2011 at 09:28:52PM CET:
> On Wednesday 23 March 2011, Karl Berry wrote:
> > (Aside: I'm just curious, what can dvi-local actually be used for?
> > If there's a known use for it, I suggest mentioning it in the doc.)
> >
> If there is a known use, I don't know it; sorry!
Well, say I have a LaTeX document and my own rules to build it. I want
DVI output of it to be available through 'make dvi', in addition to
Texinfo sources that also produce some DVI output (through the automake-
generated rules). Then I write
dvi-local: foo.dvi
foo.dvi: ...
...
Generally, the *-local rules are the default way to extend targets for
which automake provides rules. They all work the same way. Nothing
fancy here, but definitely useful.
> That's already implemented (well, almost -- it's not true for few special
> targets, like `all' and `check'; maybe we should fix this inconsistency?)
Yes; I actually have worked on these two targets (after it came up in
the gnu make discussions with Xan Lopez elsewhere) but am not done yet.
They are a bit nontrivial to fix.
I'm closing this bug as it seems to have been cleared up.
Thanks,
Ralf
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 26 Apr 2011 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 14 years and 116 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.