From 543e39518d894c0a9780052a8a4eb74bbbac7c89 Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Wed, 29 Aug 2012 08:55:58 +0200 Subject: [PATCH] Bug 785871 - Make config.status importable. r=gps --- Makefile.in | 2 +- build/autoconf/config.status.m4 | 54 +++++++++++++------------- js/src/Makefile.in | 2 +- js/src/build/autoconf/config.status.m4 | 54 +++++++++++++------------- 4 files changed, 58 insertions(+), 54 deletions(-) diff --git a/Makefile.in b/Makefile.in index c0b061b87e1..e3414622bfc 100644 --- a/Makefile.in +++ b/Makefile.in @@ -69,7 +69,7 @@ endif include $(topsrcdir)/config/config.mk GARBAGE_DIRS += dist _javagen _profile _tests staticlib -DIST_GARBAGE = config.cache config.log config.status config-defs.h \ +DIST_GARBAGE = config.cache config.log config.status* config-defs.h \ config/autoconf.mk \ unallmakefiles mozilla-config.h \ netwerk/necko-config.h xpcom/xpcom-config.h xpcom/xpcom-private.h \ diff --git a/build/autoconf/config.status.m4 b/build/autoconf/config.status.m4 index 132cbfcff41..af704785ee0 100644 --- a/build/autoconf/config.status.m4 +++ b/build/autoconf/config.status.m4 @@ -13,7 +13,7 @@ define([AC_SUBST], [ifdef([AC_SUBST_$1], , [define([AC_SUBST_$1], )dnl AC_DIVERT_PUSH(MOZ_DIVERSION_SUBST)dnl - (''' $1 ''', r''' [$]$1 ''') + (''' $1 ''', r''' [$]$1 ''') AC_DIVERT_POP()dnl ])]) @@ -26,7 +26,7 @@ dnl AC_SOMETHING(foo,AC_DEFINE(),bar) define([_MOZ_AC_DEFINE], defn([AC_DEFINE])) define([AC_DEFINE], [cat >> confdefs.pytmp <<\EOF - (''' $1 ''', ifelse($#, 2, [r''' $2 '''], $#, 3, [r''' $2 '''], ' 1 ')) + (''' $1 ''', ifelse($#, 2, [r''' $2 '''], $#, 3, [r''' $2 '''], ' 1 ')) EOF ifelse($#, 2, _MOZ_AC_DEFINE([$1], [$2]), $#, 3, _MOZ_AC_DEFINE([$1], [$2], [$3]),_MOZ_AC_DEFINE([$1]))dnl ]) @@ -36,7 +36,7 @@ dnl python. define([_MOZ_AC_DEFINE_UNQUOTED], defn([AC_DEFINE_UNQUOTED])) define([AC_DEFINE_UNQUOTED], [cat >> confdefs.pytmp < $CONFIG_STATUS <>>), topsrcdir)) -dnl Don't rely on virtualenv here. Standalone js doesn't use it. -sys.path.append(os.path.join(topsrcdir, ${extra_python_path}'build')) -from ConfigStatus import config_status -args = { - 'topsrcdir': topsrcdir, - 'topobjdir': os.path.dirname(<<<__file__>>>), +topobjdir = os.path.dirname(<<<__file__>>>) dnl All defines and substs are stored with an additional space at the beginning dnl and at the end of the string, to avoid any problem with values starting or dnl ending with quotes. - 'defines': [(name[1:-1], value[1:-1]) for name, value in [ +defines = [(name[1:-1], value[1:-1]) for name, value in [ EOF dnl confdefs.pytmp contains AC_DEFINEs, in the expected format, but @@ -106,9 +101,9 @@ sed 's/$/,/' confdefs.pytmp >> $CONFIG_STATUS rm confdefs.pytmp confdefs.h cat >> $CONFIG_STATUS <<\EOF - ] ], +] ] - 'substs': [(name[1:-1], value[1:-1]) for name, value in [ +substs = [(name[1:-1], value[1:-1]) for name, value in [ EOF dnl The MOZ_DIVERSION_SUBST output diversion contains AC_SUBSTs, in the @@ -118,51 +113,58 @@ undivert(MOZ_DIVERSION_SUBST)dnl EOF cat >> $CONFIG_STATUS <<\EOF - ] ], +] ] dnl List of files to apply AC_SUBSTs to. This is the list of files given dnl as an argument to AC_OUTPUT ($1) - 'files': [ +files = [ EOF for out in $1; do - echo " '$out'," >> $CONFIG_STATUS + echo " '$out'," >> $CONFIG_STATUS done cat >> $CONFIG_STATUS <<\EOF - ], +] dnl List of header files to apply AC_DEFINEs to. This is stored in the dnl AC_LIST_HEADER m4 macro by AC_CONFIG_HEADER. - 'headers': [ +headers = [ EOF ifdef(<<>>, <<< HEADERS="AC_LIST_HEADER" for header in $HEADERS; do - echo " '$header'," >> $CONFIG_STATUS + echo " '$header'," >> $CONFIG_STATUS done >>>)dnl cat >> $CONFIG_STATUS <<\EOF - ], +] dnl List of AC_DEFINEs that aren't to be exposed in ALLDEFINES - 'non_global_defines': [ +non_global_defines = [ EOF if test -n "$_NON_GLOBAL_ACDEFINES"; then for var in $_NON_GLOBAL_ACDEFINES; do - echo " '$var'," >> $CONFIG_STATUS + echo " '$var'," >> $CONFIG_STATUS done fi -cat >> $CONFIG_STATUS <<\EOF - ] -} +cat >> $CONFIG_STATUS <> confdefs.pytmp <<\EOF - (''' $1 ''', ifelse($#, 2, [r''' $2 '''], $#, 3, [r''' $2 '''], ' 1 ')) + (''' $1 ''', ifelse($#, 2, [r''' $2 '''], $#, 3, [r''' $2 '''], ' 1 ')) EOF ifelse($#, 2, _MOZ_AC_DEFINE([$1], [$2]), $#, 3, _MOZ_AC_DEFINE([$1], [$2], [$3]),_MOZ_AC_DEFINE([$1]))dnl ]) @@ -36,7 +36,7 @@ dnl python. define([_MOZ_AC_DEFINE_UNQUOTED], defn([AC_DEFINE_UNQUOTED])) define([AC_DEFINE_UNQUOTED], [cat >> confdefs.pytmp < $CONFIG_STATUS <>>), topsrcdir)) -dnl Don't rely on virtualenv here. Standalone js doesn't use it. -sys.path.append(os.path.join(topsrcdir, ${extra_python_path}'build')) -from ConfigStatus import config_status -args = { - 'topsrcdir': topsrcdir, - 'topobjdir': os.path.dirname(<<<__file__>>>), +topobjdir = os.path.dirname(<<<__file__>>>) dnl All defines and substs are stored with an additional space at the beginning dnl and at the end of the string, to avoid any problem with values starting or dnl ending with quotes. - 'defines': [(name[1:-1], value[1:-1]) for name, value in [ +defines = [(name[1:-1], value[1:-1]) for name, value in [ EOF dnl confdefs.pytmp contains AC_DEFINEs, in the expected format, but @@ -106,9 +101,9 @@ sed 's/$/,/' confdefs.pytmp >> $CONFIG_STATUS rm confdefs.pytmp confdefs.h cat >> $CONFIG_STATUS <<\EOF - ] ], +] ] - 'substs': [(name[1:-1], value[1:-1]) for name, value in [ +substs = [(name[1:-1], value[1:-1]) for name, value in [ EOF dnl The MOZ_DIVERSION_SUBST output diversion contains AC_SUBSTs, in the @@ -118,51 +113,58 @@ undivert(MOZ_DIVERSION_SUBST)dnl EOF cat >> $CONFIG_STATUS <<\EOF - ] ], +] ] dnl List of files to apply AC_SUBSTs to. This is the list of files given dnl as an argument to AC_OUTPUT ($1) - 'files': [ +files = [ EOF for out in $1; do - echo " '$out'," >> $CONFIG_STATUS + echo " '$out'," >> $CONFIG_STATUS done cat >> $CONFIG_STATUS <<\EOF - ], +] dnl List of header files to apply AC_DEFINEs to. This is stored in the dnl AC_LIST_HEADER m4 macro by AC_CONFIG_HEADER. - 'headers': [ +headers = [ EOF ifdef(<<>>, <<< HEADERS="AC_LIST_HEADER" for header in $HEADERS; do - echo " '$header'," >> $CONFIG_STATUS + echo " '$header'," >> $CONFIG_STATUS done >>>)dnl cat >> $CONFIG_STATUS <<\EOF - ], +] dnl List of AC_DEFINEs that aren't to be exposed in ALLDEFINES - 'non_global_defines': [ +non_global_defines = [ EOF if test -n "$_NON_GLOBAL_ACDEFINES"; then for var in $_NON_GLOBAL_ACDEFINES; do - echo " '$var'," >> $CONFIG_STATUS + echo " '$var'," >> $CONFIG_STATUS done fi -cat >> $CONFIG_STATUS <<\EOF - ] -} +cat >> $CONFIG_STATUS <