Changeset 3af3ca in git
- Timestamp:
- Oct 13, 2011, 4:24:47 PM (11 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'f875bbaccd0831e36aaed09ff6adeb3eb45aeb94')
- Children:
- 4df5bdf2bfc58ff557a17588fb30694405784655
- Parents:
- 4f7f4469ecb607b0fb7ebb1896b92f388634d796
- git-author:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2011-10-13 16:24:47+02:00
- git-committer:
- Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 16:14:00+01:00
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/.gitignore
r4f7f44 r3af3ca 1 _configs.sed2 1 cplusplus 3 2 cplusplus.h -
factory/Makefile.am
r4f7f44 r3af3ca 330 330 ## 331 331 332 DISTCLEANFILES=_configs.sed factory_config.h332 # DISTCLEANFILES=_configs.sed factory_config.h -
factory/configure.ac
r4f7f44 r3af3ca 23 23 24 24 # Add pre'prefixed config 25 AX_PREFIX_CONFIG_H([ factory_config.h], [__FACTORY],[config.h])25 AX_PREFIX_CONFIG_H([config.h],[],[config.h]) 26 26 27 27 AC_PROG_YACC -
factory/factoryconf.template
r4f7f44 r3af3ca 21 21 /*MAKEHEADER*/ 22 22 #include "config.h" 23 /* #include "factory_config.h" */24 23 25 24 /*MAKEHEADER*/ -
m4/ax_prefix_config_h.m4
r4f7f44 r3af3ca 5 5 # SYNOPSIS 6 6 # 7 # AX_PREFIX_CONFIG_H [(OUTPUT-HEADER [,PREFIX [,ORIG-HEADER]])]7 # AX_PREFIX_CONFIG_H (OUTPUT-HEADER, PREFIX [,ORIG-HEADER]) 8 8 # 9 9 # DESCRIPTION … … 24 24 # Defaults: 25 25 # 26 # OUTPUT-HEADER = $PACKAGE-config.h27 # PREFIX = $PACKAGE28 26 # ORIG-HEADER, from AM_CONFIG_HEADER(config.h) 29 27 # … … 37 35 # AM_INIT_AUTOMAKE(testpkg, 0.1.1) # makes #undef VERSION and PACKAGE 38 36 # AM_CONFIG_HEADER(config.h) # prep config.h from config.h.in 39 # AX_PREFIX_CONFIG_H(mylib/_config.h ) # prep mylib/_config.h from it..37 # AX_PREFIX_CONFIG_H(mylib/_config.h, TESTPKG_) # prep mylib/_config.h from it.. 40 38 # AC_MEMORY_H # makes "#undef NEED_MEMORY_H" 41 39 # AC_C_CONST_H # makes "#undef const" … … 43 41 # # and also mylib/_config.h 44 42 # 45 # if the argument to AX_PREFIX_CONFIG_H would have been omitted then the 46 # default outputfile would have been called simply "testpkg-config.h", but 47 # even under the name "mylib/_config.h" it contains prefix-defines like 43 # outputfile called "mylib/_config.h" contains prefix-defines like 48 44 # 49 45 # #ifndef TESTPKG_VERSION … … 53 49 # #define TESTPKG_NEED_MEMORY_H 1 54 50 # #endif 55 # #ifndef _testpkg_const56 # #define _testpkg_const _const51 # #ifndef testpkg_const 52 # #define testpkg_const _const 57 53 # #endif 58 54 # … … 70 66 # 71 67 # #include <mylib/_config.h> 72 # #ifndef _testpkg_const73 # #define _testpkg_const const74 # #endif 75 # 76 # and then start using _testpkg_const in the header files. That is also a68 # #ifndef testpkg_const 69 # #define testpkg_const const 70 # #endif 71 # 72 # and then start using testpkg_const in the header files. That is also a 77 73 # good thing to differentiate whether some library-user has starting to 78 74 # take up with a different compiler, so perhaps it could read something … … 84 80 # #include <mylib/_config.h> 85 81 # #endif 86 # #ifndef _testpkg_const87 # #define _testpkg_const const82 # #ifndef testpkg_const 83 # #define testpkg_const const 88 84 # #endif 89 85 # … … 134 130 m4_pushdef([_script],[conftest.prefix])dnl 135 131 m4_pushdef([_symbol],[m4_cr_Letters[]m4_cr_digits[]_])dnl 132 136 133 _OUT=`echo ifelse($1, , $PACKAGE-config.h, $1)` 137 _DEF=`echo _$_OUT | sed -e "y:m4_cr_letters:m4_cr_LETTERS[]:" -e "s/@<:@^m4_cr_Letters@:>@/_/g"` 138 _PKG=`echo ifelse($2, , $PACKAGE, $2)` 139 _LOW=`echo _$_PKG | sed -e "y:m4_cr_LETTERS-:m4_cr_letters[]_:"` 134 _PKG=`echo $2` 135 _LOW=`echo $_PKG | sed -e "y:m4_cr_LETTERS-:m4_cr_letters[]_:"` 140 136 _UPP=`echo $_PKG | sed -e "y:m4_cr_letters-:m4_cr_LETTERS[]_:" -e "/^@<:@m4_cr_digits@:>@/s/^/_/"` 141 137 _INP=`echo "ifelse($3,,,$3)" | sed -e 's/ *//'` 138 _DEF=`echo "$_UPP $PACKAGE $_OUT" | sed -e "y:m4_cr_letters:m4_cr_LETTERS[]:" -e "s/@<:@^m4_cr_Letters@:>@/_/g"` 139 142 140 if test ".$_INP" = "."; then 143 141 for ac_file in : $CONFIG_HEADERS; do test "_$ac_file" = _: && continue … … 159 157 esac 160 158 fi 161 if test -z "$_PKG" ; then162 AC_MSG_ERROR([no prefix for_PREFIX_PKG_CONFIG_H])163 else159 #if test -z "$_PKG" ; then 160 # AC_MSG_ERROR([no prefix for AX_PREFIX_PKG_CONFIG_H]) 161 #else 164 162 if test ! -f "$_INP" ; then if test -f "$srcdir/$_INP" ; then 165 163 _INP="$srcdir/$_INP" 166 164 fi fi 167 AC_MSG_NOTICE( creating $_OUT - prefix $_UPP for $_INP defines)165 AC_MSG_NOTICE([creating '$_OUT' - prefix '$_UPP' for '$_INP' defines]) 168 166 if test -f $_INP ; then 169 AS_ECHO(["s/^@%:@undef *\\(@<:@m4_cr_LETTERS[]_@:>@\\)/@%:@undef $_UPP"" _\\1/"]) > _script170 AS_ECHO(["s/^@%:@undef *\\(@<:@m4_cr_letters@:>@\\)/@%:@undef $_LOW"" _\\1/"]) >> _script171 AS_ECHO(["s/^@%:@def[]ine *\\(@<:@m4_cr_LETTERS[]_@:>@@<:@_symbol@:>@*\\)\\(.*\\)/@%:@ifndef $_UPP"" _\\1\\"]) >> _script172 AS_ECHO(["@%:@def[]ine $_UPP"" _\\1\\2\\"]) >> _script167 AS_ECHO(["s/^@%:@undef *\\(@<:@m4_cr_LETTERS[]_@:>@\\)/@%:@undef $_UPP""\\1/"]) > _script 168 AS_ECHO(["s/^@%:@undef *\\(@<:@m4_cr_letters@:>@\\)/@%:@undef $_LOW""\\1/"]) >> _script 169 AS_ECHO(["s/^@%:@def[]ine *\\(@<:@m4_cr_LETTERS[]_@:>@@<:@_symbol@:>@*\\)\\(.*\\)/@%:@ifndef $_UPP""\\1\\"]) >> _script 170 AS_ECHO(["@%:@def[]ine $_UPP""\\1\\2\\"]) >> _script 173 171 AS_ECHO(["@%:@endif/"]) >> _script 174 AS_ECHO(["s/^@%:@def[]ine *\\(@<:@m4_cr_letters@:>@@<:@_symbol@:>@*\\)\\(.*\\)/@%:@ifndef $_LOW"" _\\1\\"]) >> _script175 AS_ECHO(["@%:@define $_LOW"" _\\1\\2\\"]) >> _script172 AS_ECHO(["s/^@%:@def[]ine *\\(@<:@m4_cr_letters@:>@@<:@_symbol@:>@*\\)\\(.*\\)/@%:@ifndef $_LOW""\\1\\"]) >> _script 173 AS_ECHO(["@%:@define $_LOW""\\1\\2\\"]) >> _script 176 174 AS_ECHO(["@%:@endif/"]) >> _script 177 175 # now executing _script on _DEF input to create _OUT output file … … 194 192 fi 195 193 cp _script _configs.sed 194 rm _configs.sed 196 195 else 197 196 AC_MSG_ERROR([input file $_INP does not exist - skip generating $_OUT]) 198 197 fi 199 198 rm -f conftest.* 200 fi199 #fi 201 200 m4_popdef([_symbol])dnl 202 201 m4_popdef([_script])dnl
Note: See TracChangeset
for help on using the changeset viewer.