(automake-1.16.info)Subdirectories with AC_SUBST


Next: Unconfigured Subdirectories Prev: Subdirectories with AM_CONDITIONAL Up: Conditional Subdirectories
Enter node , (file) or (file)node

7.2.3 Subdirectories with ‘AC_SUBST’
------------------------------------

Another possibility is to define ‘MAYBE_OPT’ from ‘./configure’ using
‘AC_SUBST’:

     ...
     if test "$want_opt" = yes; then
       MAYBE_OPT=opt
     else
       MAYBE_OPT=
     fi
     AC_SUBST([MAYBE_OPT])
     AC_CONFIG_FILES([Makefile src/Makefile opt/Makefile])
     ...

   In this case the top-level ‘Makefile.am’ should look as follows.

     SUBDIRS = src $(MAYBE_OPT)
     DIST_SUBDIRS = src opt

   The drawback is that since Automake cannot guess what the possible
values of ‘MAYBE_OPT’ are, it is necessary to define ‘DIST_SUBDIRS’.


automatically generated by info2www version 1.2.2.9