automake
[Top][All Lists]
Advanced

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

Re: Error because README is missing


From: Paul D. Smith
Subject: Re: Error because README is missing
Date: 29 Nov 2004 13:34:37 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

%% Alexandre Duret-Lutz <address@hidden> writes:

  adl> Hi Paul,
  >>>> "Paul" == Paul Smith <address@hidden> writes:

  Paul> In the GNU make package I don't have a README file when
  Paul> it is first checked out from CVS.

  Paul> This used to work but now automake is failing:

  adl> What version(s) used to work, and which one is failing?

I'm not sure which ones used to work, but I know 1.8 and 1.9 both fail.
I think what used to happen is I would get warnings, but automake would
still succeed so I could just ignore the warning and continue on, and by
the time I actually got around to building a distribution everything
would be fine.

  Paul> There is a README.in which is translated into a README,
  Paul> replacing the version info etc.

  adl> When and how?

This turns out to be the key question.  My setup is a little odd; I'm
willing to change/fix it if someone can suggest a better way to do what
I'm doing.

The README file is created with a makefile target, but it isn't in
Makefile.am (see the description below).  I actually solved the README
problem by putting a dummy target in my Makefile.am, like this:

  README:

Now automake doesn't complain about this anymore.

However, I actually had a second error that I didn't mention because I
figured it would be the same problem... but it's not.

The second error is this:

  $ automake --add-missing --no-force
  configure.in:398: required file `build.sh.in' not found

This file is being created with this in my configure.in file:

  if test -f $srcdir/build.sh.in; then
    AC_CONFIG_FILES(build.sh)
  fi

Adding an empty target for build.sh.in into Makefile.am doesn't help in
this situation, I guess because it's referenced in configure.in, not
Makefile.am.

Is there any way to get automake to work in this situation?

-------------------------------------------------------------------------------
What I have is a Makefile.am that's pretty straightforward.  Then at the
bottom of that file I have:

  @MAINT_MAKEFILE@

I also have a file maintMakefile which contains a bunch of
maintainer-only rules for building GNU make from CVS, etc., and this
makefile is written in non-portable GNU make.

The Makefile.am does _NOT_ list the maintMakefile in the list of files
to be distributed, so when I create a dist tarball it's not there.

In configure.in I have some text like this:

  # Include the Maintainer's Makefile section, if it's here.
  MAINT_MAKEFILE=/dev/null
  if test -r "$srcdir/maintMakefile"; then
    MAINT_MAKEFILE="$srcdir/maintMakefile"
  fi
  AC_SUBST_FILE(MAINT_MAKEFILE)

The goal behind this is:

  * Allows me to write some complex rules using GNU make features.
  * Allows maintainer-only targets to be automatically added to the
    makefile when you have a CVS version, but automatically _NOT_ added
    to the makefile when you're building a real distribution.
  * You need GNU make to build from CVS, but not to build a dist tarball.

The problem is that the rule to build the README file is in the
maintMakefile, not in the Makefile.am.  As an experiment I moved it to
Makefile.am and sure enough, my error went away.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>   HASMAT--HA Software Mthds & Tools
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
-------------------------------------------------------------------------------
   These are my opinions---Nortel Networks takes no responsibility for them.




reply via email to

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