On Nov 21, 2011, at 8:37 AM, Derek Atkins wrote: > John Ralls <[email protected]> writes: > >> Some Makefile.ams used an AC_SUBSTed variable to define an >> optionally-compiled subdirectory, then included the variable in >> SUBDIRS and the actual directory name in DIST_SUBDIRS. This breaks the >> distclean and maintainer-clean targets when the optional directory is >> built, because it is then processed twice, and there is no Makefile >> the second time so make halts. Replaced the AC_SUBSTed variables with >> ones local to the Makefile.am, switched with an AM_CONDITIONAL. That >> way automake can figure out the dist_subdirs on its own. > > Have you verified that this works right and includes ALL subdirs in > "make dist", even ones that are disabled during configure? The reason > to have DIST_SUBDIRS is to make sure that all code is included in the > tarball, even if you don't include that code in your configure. > > For example, if you --disable-gui, or --disable-python and then run > "make dist" it should still include the GUI and Python subdirs. > >> Modified: gnucash/trunk/src/Makefile.am >> =================================================================== >> --- gnucash/trunk/src/Makefile.am 2011-11-14 21:28:32 UTC (rev 21569) >> +++ gnucash/trunk/src/Makefile.am 2011-11-17 21:27:40 UTC (rev 21570) >> @@ -1,4 +1,8 @@ >> # These directories do not contain any gtk dependencies >> +if WITH_PYTHON >> + PYTHON_DIR = python >> +endif >> + > > Where is PYTHON_DIR referenced? > >> Modified: gnucash/trunk/src/backend/Makefile.am >> =================================================================== >> --- gnucash/trunk/src/backend/Makefile.am 2011-11-14 21:28:32 UTC (rev >> 21569) >> +++ gnucash/trunk/src/backend/Makefile.am 2011-11-17 21:27:40 UTC (rev >> 21570) >> @@ -1,3 +1,5 @@ >> +if WITH_DBI >> + DBI_DIR=dbi >> +endif >> +SUBDIRS = xml sql ${DBI_DIR} >> >> -SUBDIRS = xml sql ${DBI_DIR} >> -DIST_SUBDIRS = xml sql dbi > > Have you tested the 'dbi' is included in the results of "make dist" even > if you do not --enable-dbi, or if you explicitly --disable-dbi? >
Boy, you don't trust autotools to work, do you? It does, as advertised, as long as you use AM_CONDITIONAL to control what gets compiled. Yes, I made that change in each directory where it was done with AC_SUBST (which requires one to manually set DIST_SUBDIRS) and checked each one to make sure that it worked as advertised. PYTHON_DIR is used on line 26 of that Makefile.am. I'll move the definition down next to it so it's more obvious. Regards, John Ralls _______________________________________________ gnucash-devel mailing list [email protected] https://lists.gnucash.org/mailman/listinfo/gnucash-devel
