automake
[Top][All Lists]
Advanced

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

Re: automake not descending into subdirectories to create Makefile.in's


From: Ralf Wildenhues
Subject: Re: automake not descending into subdirectories to create Makefile.in's
Date: Thu, 25 Sep 2008 22:12:04 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

Hello Laura,

* Laura Hughes (lahughes) wrote on Thu, Sep 25, 2008 at 09:44:07PM CEST:
> My directory struct looks like this:
>  
> topdir/
>    src/
>    src/basic_utilities
>    src/ethernet_tests/bc5709_tests
>    src/ethernet_tests/bc57711_tests
>    src/mezzanine_card_tests
>  
> My files:
> topdir/configure.ac:
> AC_PREREQ(2.59)
> AC_INIT(cisco_diags, 1.0.1)
> AC_CONFIG_SRCDIR([Makefile])

The Makefile file is not actually part of the source tree: it is
generated by configure in the build tree (from the Makefile.in file in
the source tree).  So it's better to list some file like a .c file:
  AC_CONFIG_SRCDIR([src/basic_utilities/show_hardware_info.c])

> AM_CONFIG_HEADER([src/include/diags_config.h])
> AM_INIT_AUTOMAKE(no-installinfo, no-installman, nostdinc,
> no-texinfo.tex)

Automake's options need to be listed space-separated here.
I think the commas will pretty much cause it to ignore all
but the first option.

> AC_CONFIG_SUBDIRS(src)

Do you actually need this?  It is necessary only if you have another
configure script in src/.

> # Checks for programs.
> AC_PROG_CC
> AC_PROG_INSTALL
> AC_PROG_RANLIB
[...]

> AC_CHECK_FUNCS([strchr strrchr strtol])
>  
> AC_CONFIG_FILES([Makefile
>                  basic_utilities/Makefile
>                  ethernet_tests/Makefile
>                  ethernet_tests/bc5709_tests/Makefile
>                  ethernet_tests/bc57711_tests/Makefile
>                  mezzanine_card_tests/Makefile])

It looks like you should list
  src/Makefile

here, too.  Wait: wouldn't that be 
  src/ethernet_tests/Makefile

instead of
  ethernet_tests/Makefile

and likewise for the other Makefiles?  That explains the errors you are
seeing.

> AC_OUTPUT

> topdir/Makefile.am
> AUTOMAKE_OPTIONS = foreign

You don't need this line if you add
  foreign

to the list of options as argument to AM_INIT_AUTOMAKE in configure.ac.

> EXTRA_CFLAGS = @EXTRA_CFLAGS@

You don't need this line if you put
  AC_SUBST([EXTRA_CFLAGS], ...)

in configure.ac.

Same issues in the other Makefile.am files.

> AM_CFLAGS = -Wall -W -Wstrict-prototypes $(EXTRA_CFLAGS)
> SUBDIRS = src
>  
> topdir/src/Makefile.am
> AUTOMAKE_OPTIONS = foreign
> CC = @CC@

You don't need this line.

> EXTRA_CFLAGS = @EXTRA_CFLAGS@
> AM_CFLAGS = -Wall -W -Wstrict-prototypes $(EXTRA_CFLAGS)
> SUBDIRS = basic_utilities ethernet_tests mezzanine_card_tests
[...]

> configure.ac:25: required file `basic_utilities/Makefile.in' not found
> configure.ac:25: required file `ethernet_tests/Makefile.in' not found
> configure.ac:25: required file `ethernet_tests/bc5709_tests/Makefile.in'
> not found
> configure.ac:25: required file
> `ethernet_tests/bc57711_tests/Makefile.in' not found
> configure.ac:25: required file `mezzanine_card_tests/Makefile.in' not
> found

Hope that helps.

Cheers,
Ralf




reply via email to

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