On Sun, Mar 8, 2015 at 7:33 PM, Bob Friesenhahn <bfrie...@simple.dallas.tx.us> wrote: > On Sun, 8 Mar 2015, Bert Wesarg wrote: >>>> >>>> >>>> So if A/Makefile.am contains: >>>> >>>> foo_SRCS = ... $(srcdir)/../foo/bar.c >>> >>> >>> >>> As far as I am aware, it is wise/required that source paths be >>> subordinate >>> to the Makefile.am location (no .. bits). >> >> >> If that would really be a requirement now or with subdir-objects, I >> would say its a regression. > > > I checked the current Automake manual and am not able to find any text which > says that a subdirectory needs to be a subdirectory of where the Makefile > resides. What is a subdirectory anyway? The generated Makefile would > include per-source-file target specifications outside of the directory where > the Makefile resides. > > Perhaps the ability to use this successfully depends on the implementation > of the VPATH and target resolution support in the make program (and possibly > make program version) that your project is specifically targeting. > > I can not imagine 'make dist' or 'make distcheck' working properly if source > files are not subordinate to the directory containing Makefile. How is 'tar' > supposed to work?
I think we must distinguish between a toplevel-Makefile.am and 'sub'-Makefile.am. 'sub' may be a recusive Makefile.am in the same 'configure.ac' project, or in a sub-'configure.ac' project. And referencing source files outside of a sub-Makefile.am's tree but inside a the toplevel-Makefile.am's tree should than also let 'make dist' work, shouldn't it? > > Harlan's posting here was due to Automake not working as he expected for > files which are not in a subdirectory so maybe it does not work. Harlan, is your A/Makefile.am a sub-Makefile.am from a toplevel-Makefile.am, and thus all source files subordinate from this toplevel-Makefile.am?