0
votes

I have a Makefile.am that will create an Makefile lauching makes in subdirectories which contain external code, so its content is just

SUBDIRS=foo1 foo2 foo3

In foo1, there is already a Makefile (which compiles fortran and C code) so I do not want to write a file Makefile.am in this directory, but I would like to execute

make USE_THREAD=0

in the directory foo1 during the build.

Any idea how to tell automake to pass USE_THREAD=0 to the make command in foo1?

1

1 Answers

2
votes

You should not use SUBDIRS for non-automake subdirectories. Instead, create your own rule:

foo1-build:
    -$(MAKE) USE_THREAD=0 whatever-target

you will also need to wire in the right -local targets for clean and uninstall of course.