diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2008-09-22 21:18:09 -0400 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2008-09-22 22:24:38 -0400 |
commit | ebb5eb57b7cab7e5fc4b3215969a459f49d95fbb (patch) | |
tree | 5bcf7d5dd81c940204dc99f97c424690905e56e4 /build/aclocal.makefile.m4 | |
parent | fd5cef50a7c856ef80b0a2191170c6a377071e78 (diff) |
Generate build/Makefile.win32.features
Diffstat (limited to 'build/aclocal.makefile.m4')
-rw-r--r-- | build/aclocal.makefile.m4 | 57 |
1 files changed, 42 insertions, 15 deletions
diff --git a/build/aclocal.makefile.m4 b/build/aclocal.makefile.m4 index df24c085..70777810 100644 --- a/build/aclocal.makefile.m4 +++ b/build/aclocal.makefile.m4 @@ -19,7 +19,7 @@ m4_define([cr_feature_tag], dnl =========================================================================== dnl -dnl CAIRO_INIT_MAKEFILES() +dnl CAIRO_INIT_MAKEFILES([AUX-DIR]) dnl dnl Sets up automake and win32 conditionals for all features dnl @@ -34,8 +34,8 @@ AC_DEFUN([CAIRO_INIT_MAKEFILES], AM_CONDITIONAL(cr_feature_tag, [test "x$use_]cr_feature[" = xyes])dnl ])dnl - dnl An empty line per feature for readability - CAIRO_MAKEFILE_ACCUMULATE_FEATURE(*,*,*,*,[])dnl + CAIRO_CONFIG_MAKEFILE_PRIVATE_WIN32([_],[$1],[],[[# Generated by configure. Modify to customize.]])dnl + CAIRO_MAKEFILE_ACCUMULATE_FEATURE([_],*,!always,*,[cr_feature_tag=m4_if(cr_feature_default,[yes],1,[m4_bmatch(cr_feature,[win32],1,0)])])dnl ])dnl dnl =========================================================================== @@ -43,34 +43,38 @@ dnl =========================================================================== m4_define([_CAIRO_MAKEFILES])dnl dnl -dnl CAIRO_CONFIG_MAKEFILE(TAG, DIR) +dnl CAIRO_CONFIG_MAKEFILE(TAG, DIR, [SUFFIX], [HEADER]) dnl -dnl Create DIR/Makefile.*.features files +dnl Create DIR/Makefile.{am,win32}.SUFFIX files dnl TAG is a TAG used by other CAIRO_MAKEFILE_* macros to append to these dnl Makefile's. dnl +dnl HEADER is appended at the top of the Makefile's. If HEADER is not +dnl set, the generic "Generated by configure. Do not edit." comment +dnl is added. +dnl AC_DEFUN([CAIRO_CONFIG_MAKEFILE], [dnl m4_append_uniq([_CAIRO_MAKEFILES], [$1], [ ])dnl - CAIRO_CONFIG_MAKEFILE_PRIVATE([$1], [$2])dnl + CAIRO_CONFIG_MAKEFILE_PRIVATE([$1], [$2], [$3], [$4])dnl ])dnl dnl Like CAIRO_CONFIG_MAKEFILE but only generate win32 makefile AC_DEFUN([CAIRO_CONFIG_MAKEFILE_WIN32], [dnl m4_append_uniq([_CAIRO_MAKEFILES], [$1], [ ])dnl - CAIRO_CONFIG_MAKEFILE_PRIVATE_WIN32([$1], [$2])dnl + CAIRO_CONFIG_MAKEFILE_PRIVATE_WIN32([$1], [$2], [$3], [$4])dnl ])dnl dnl Like CAIRO_CONFIG_MAKEFILE but only generate automake makefile AC_DEFUN([CAIRO_CONFIG_MAKEFILE_AMAKE], [dnl m4_append_uniq([_CAIRO_MAKEFILES], [$1], [ ])dnl - CAIRO_CONFIG_MAKEFILE_PRIVATE_AMAKE([$1], [$2])dnl + CAIRO_CONFIG_MAKEFILE_PRIVATE_AMAKE([$1], [$2], [$3], [$4])dnl ])dnl dnl -dnl CAIRO_CONFIG_MAKEFILE_PRIVATE(TAG, DIR) +dnl CAIRO_CONFIG_MAKEFILE_PRIVATE(TAG, DIR, [SUFFIX], [HEADER]) dnl dnl Like CAIRO_CONFIG_MAKEFILE but this makefile tag won't match dnl against '*' in makefile accumulators. @@ -81,8 +85,8 @@ AC_DEFUN([CAIRO_CONFIG_MAKEFILE_PRIVATE], [m4_fatal([Makefile `$1' already registered])])dnl m4_define([cr_make_$1_dir],[$2])dnl - CAIRO_CONFIG_MAKEFILE_PRIVATE_AMAKE([$1],[$2])dnl - CAIRO_CONFIG_MAKEFILE_PRIVATE_WIN32([$1],[$2])dnl + CAIRO_CONFIG_MAKEFILE_PRIVATE_AMAKE([$1], [$2], [$3], [$4])dnl + CAIRO_CONFIG_MAKEFILE_PRIVATE_WIN32([$1], [$2], [$3], [$4])dnl ])dnl dnl Like CAIRO_CONFIG_MAKEFILE_PRIVATE but only generate automake makefile @@ -94,10 +98,10 @@ AC_DEFUN([CAIRO_CONFIG_MAKEFILE_PRIVATE_AMAKE], m4_define([cr_make_$1_dir_any],[$2])dnl dnl Accumulators - CAIRO_ACCUMULATORS_REGISTER(MAKEFILE_$1_AMAKE, m4_newline, [# Generated by configure. Do not edit.]m4_newline[include $(top_srcdir)/$2/Makefile.sources]m4_newline)dnl + CAIRO_ACCUMULATORS_REGISTER(MAKEFILE_$1_AMAKE, m4_newline, m4_default([$4],[[# Generated by configure. Do not edit.]])m4_newline)dnl dnl Generate - CAIRO_CONFIG_COMMANDS([$srcdir/$2/Makefile.am.features], + CAIRO_CONFIG_COMMANDS([$srcdir/]m4_if([$2],[.],,[$2/])[Makefile.am.]m4_default([$3],[features]), [echo "$CAIRO_MAKEFILE_$1_AMAKE"], [CAIRO_MAKEFILE_$1_AMAKE='$CAIRO_MAKEFILE_$1_AMAKE'])dnl ])dnl @@ -111,10 +115,10 @@ AC_DEFUN([CAIRO_CONFIG_MAKEFILE_PRIVATE_WIN32], m4_define([cr_make_$1_dir_any],[$2])dnl dnl Accumulators - CAIRO_ACCUMULATORS_REGISTER(MAKEFILE_$1_WIN32, m4_newline, [# Generated by configure. Do not edit.]m4_newline[ifeq ($(top_srcdir),)]m4_newline[include Makefile.sources]m4_newline[else]m4_newline[include $(top_srcdir)/$2/Makefile.sources]m4_newline[endif]m4_newline)dnl + CAIRO_ACCUMULATORS_REGISTER(MAKEFILE_$1_WIN32, m4_newline, m4_default([$4],[[# Generated by configure. Do not edit.]])m4_newline)dnl dnl Generate - CAIRO_CONFIG_COMMANDS([$srcdir/$2/Makefile.win32.features], + CAIRO_CONFIG_COMMANDS([$srcdir/]m4_if([$2],[.],,[$2/])[Makefile.win32.]m4_default([$3],[features]), [echo "$CAIRO_MAKEFILE_$1_WIN32"], [CAIRO_MAKEFILE_$1_WIN32='$CAIRO_MAKEFILE_$1_WIN32'])dnl ])dnl @@ -125,6 +129,29 @@ m4_define([_CAIRO_MAKEFILE_CHECK], m4_ifdef([cr_make_$1_dir_any],,[m4_fatal([Makefile `]$1[' not defined.])])dnl ])dnl + +dnl +dnl CAIRO_MAKEFILE_INCLUDE(TAG, FILE) +dnl +dnl Include FILE from Makefile's for TAG. FILE should be placed +dnl relative to directory for TAG. If TAG is *, FILE is included from +dnl all Makefile's. +dnl +AC_DEFUN([CAIRO_MAKEFILE_INCLUDE], +[dnl + m4_if([$1],[*],,[_CAIRO_MAKEFILE_CHECK([$1])])dnl + m4_foreach_w([cr_makefile], m4_if([$1],[*],_CAIRO_MAKEFILES,[$1]), + [dnl + m4_ifdef([cr_make_]cr_makefile[_dir_amake],dnl + [CAIRO_ACCUMULATE([MAKEFILE_]cr_makefile[_AMAKE],[include $(top_srcdir)/cr_make_]cr_makefile[_dir_amake/$2]m4_newline)] + )dnl + m4_ifdef([cr_make_]cr_makefile[_dir_win32],dnl + [CAIRO_ACCUMULATE([MAKEFILE_]cr_makefile[_WIN32],[ifeq ($(top_srcdir),)]m4_newline[include $2]m4_newline[else]m4_newline[include $(top_srcdir)/cr_make_]cr_makefile[_dir_win32/$2]m4_newline[endif]m4_newline)] + )dnl + ])dnl +])dnl + + m4_pattern_allow([cr_make_tmp]) dnl |