[Top][All Lists]

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

Re: [Bug-gnulib] Re: CVS Bug? or User error?

From: Alexandre Duret-Lutz
Subject: Re: [Bug-gnulib] Re: CVS Bug? or User error?
Date: Thu, 29 Jul 2004 00:38:18 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux)

Hi Derek,

>>> "Derek" == Derek Robert Price <address@hidden> writes:


 Derek> Sorry about that - I was sure I knew what I was doing
 Derek> and didn't run the entire test suite after making this
 Derek> change.  I've included a new patch with minor changes to
 Derek> lib/am/ and lib/am/ to allow yacc and lex
 Derek> targets when AM_MAINTAINER_MODE has not been invoked in
 Derek>  The whole test suite now passes with this
 Derek> change.  This patch takes the place of the last.
 Derek> ChangeLog is unaltered.

Thank you.  Sorry for the delay, I've been quite busy these
days.  I saw you committed it, probably because I didn't answer,
but I had to revert it because it was really to late before
release for such a change, and the patch still has problems.

There are some not-so-serious problems which I mention only so
you can avoid them in the future:
  - you forgot to update Copyright year for the files you touched, and
    even for the file you created.  (Consider adding
    (add-hook 'write-file-hooks 'copyright-update) to your .emacs)
  - `make maintainer-check' failed because you did not follow the
    guidelines in tests/README.

Now the harder issues:
  - It's incorrect to disable the rebuild rules when the parser is not
    distributed (e.g. nodist_foo_SOURCES = foo.y), because then the
    parser must be built on the user-side whether maintainer-mode is
    used or not.
  - The GNU Coding Standards require
    `make maintainer-clean; ./configure; make' to work.
    (Remember maintainer-clean erases parser.c.)

Welcome :)

I've started a patch along the lines of

## We want to disable the Yacc rebuild rule when
##   1. AM_MAINTAINER_MODE is used, and
##   2. --enable-maintainer-mode is not specified, and
##   3. parser.c already exist, and
##   4. parser.y and parser.c are distributed.
## Point #3 is because `make maintainer-clean' erases parser.c, yet
## the GNU Coding Standards require that ./configure; make works even
## after that.
## Point #4 is because parsers listed in nodist_*_SOURCES are always
## built on the user's side, so it makes no sense to disable them.
## Points #1, #2, #3 are solved by unconditionally prefixing the rules
## with $(am__skipyacc) defined below only when needed.
## Point #4 requires a condition on whether parser.y/parser.c are
## distributed or not.  We cannot have a generic rule that works in
## both cases, so we ensure in automake that nodist_ parsers always
## use non-generic rules.
if %?FIRST%
am__skipyacc = test -f $@ ||
endif %?FIRST%

and then use

?GENERIC?       $(am__skipyacc) \
?!GENERIC??!DIST_SOURCE?        $(am__skipyacc) \

in front of all commands.

(About DIST_SOURCE, see

I haven't finished it yet---it's bedtime.
Alexandre Duret-Lutz

reply via email to

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