9

First off I just want to say, I'm a total newb at Autotools.

I have a project with the following structure:

+-src
  +-commands
    Makefile.am
    +-copy
      Makefile.am
      copy.h
      copy.cpp
    +-delete
      Makefile.am
      delete.h
      delete.cpp
  main.cpp
  Makefile.am
Makefile.am

Makefile.am has SUBDIRS=src

src/Makefile.am has SUBDIRS=commands .

src/commands/Makefile.am has SUBDIRS=$(AUTODIRS)

When I run automake in the root, it generates Makefile.in and src/Makefile.in, but not in commands and copy.

What am I doing wrong?

Sam Washburn
  • 1,817
  • 3
  • 25
  • 43

1 Answers1

14

Make sure your configure.ac mentions all the Makefiles in AC_CONFIG_FILES.

Tom Tromey
  • 21,507
  • 2
  • 45
  • 63
  • In general, is this something we need to manually add to configure.ac everytime we create a subdirectory and add a new Makefile.am ? – asudhak Apr 21 '20 at 17:29
  • 2
    Yes, when you add a new subdirectory, you will have to update this line in `configure.ac`. You will also have to add new `SUBDIRS` values in parent directories. – Tom Tromey Apr 22 '20 at 13:38