[NCLUG] Newbie programming help

Bob Proulx bob at proulx.com
Sat Apr 12 20:47:44 MDT 2003


mrbrown8 at juno.com wrote:
> Lately, I've been having problems doing that; I'm getting Make errors and
> I don't know why. I am familar with makefiles and what they're supposed
> to do. But I'm not keen on things like autoconf, automake, gettext, etc.

Actually, what you are seeing looks pretty normal to me.  They don't
really look like make errors.

> So, here's my problem. I tell Anjuta to built my project and this is what
> it's telling me:
> > Building source directory of the Project: wxLLVH ...
> > make --keep-going --warn-undefined-variables 
> > Makefile:180: warning: undefined variable `ACLOCAL_M4'
> > Makefile:183: warning: undefined variable `BUILT_SOURCES'
> > Makefile:263: warning: undefined variable `HEADERS'
> > Makefile:263: warning: undefined variable `LISP'
> > Makefile:271: warning: undefined variable `HEADERS'
> > Makefile:271: warning: undefined variable `TAGS_DEPENDENCIES'
> > Makefile:271: warning: undefined variable `LISP'
> > Makefile:294: warning: undefined variable `HEADERS'
> > Makefile:294: warning: undefined variable `TEXINFOS'
> > Makefile:294: warning: undefined variable `EXTRA_DIST'
> > make: Nothing to be done for `all'.
> > Build completed...............Successful
> > Total time taken: 0 secs

So this is telling you that several variables in the makefile are
undefined.  It is doing this since you are giving make the
--warn-undefined-variables option asking specifically for that
information.  But that is not a normal option that one typically uses.
This is similar to '/bin/sh -u' which also squawks undefined variables
in shell scripts.  While it is possible to always predefine your
variables in scripts and makefiles this is not typically done.  For
those that feel otherwise the options exist to check for that.  But
automake does not follow that philosophy and you should not expect it
to run clean using that option.

The 'keep going' option is great for developers.  If I change a header
file and expect to see several files with compile errors I use that.
Then I can walk all of the errors at one sitting and try again.  But
if you are just compiling someone else's source and are expecting it
to work then the result is the same regardless.

Try invoking 'make' just as 'make' without any options.  You should
get a more normal result in that case.  That is what automake is
expecting.

Meanwhile, those were only warnings.  The 'make' program continued and
decided that nothing needed to be done.  It says "Nothing to be done
for 'all'", 'all' being the top level makefile target.  What files did
you expect it to build?  Check those.  It looks like it did build
them.  It looks to me like everything worked.

> I would include the makefile for all to see, but it's kinda large, ~450
> lines and ~14kb in size. I didn't think that would be kosher on a mailing
> list. Here's parts of it though:
>   # Generated automatically from Makefile.in by configure.
>   # Makefile.in generated automatically by automake 1.4-p5 from Makefile.am

Automake generated files tend to be large and about as readable as any
other machine generated code.  Actually they are pretty good though.
But Makefile.am file which generated it is probably more interesting.
It will list out which targets are getting built and from which source
it will build.  Take a look in Makefile.am and see what it is saying.
I assume that it was created by anjuta?  So then you will still be
looking at machine generated code.

Bob



More information about the NCLUG mailing list