This question extends question How to handle subprojects with autotools?
So I have some project with its own Makefile (not GNU autotools) in modules/libfoo
I added SUBDIRS = include/jsonbox Makefile.am and it compiles fine, but only if I invoke ./configure and make from top dir.
If I create a subdir, say build, and run ../configure from it I got an error during make:
Making all in modules/libfoo
/bin/sh: line 17: cd: modules/libfoo: No such file or directory
make: *** [all-recursive] Error 1
Is it possible to handle this? I need several build dirs for different archs and CFLAGS.
EDIT: As it sugected in docs I created a GNUmakefile.in in a nested project. But it still doesn't work with VPATH:
Making all in modules/libfoo
make[1]: Entering directory `/home/galadog/test/build/moudles/libfoo'
GNUmakefile:2: Makefile: No such file or directory
make[1]: *** No rule to make target `Makefile'. Stop.
make[1]: Leaving directory `/home/galadog/test/build/moudles/libfoo'
make: *** [all-recursive] Error 1
Edit2 The actual Makefile can be seen here: https://github.com/anhero/JsonBox/blob/master/Makefile
Makefile
for us? Maybe it has some kind of build-dir/VPATH support already but honestly I doubt it. – Michał Górny