Generalizing configure's template-file support
От | Tom Lane |
---|---|
Тема | Generalizing configure's template-file support |
Дата | |
Msg-id | 11714.911760477@sss.pgh.pa.us обсуждение исходный текст |
Список | pgsql-hackers |
I noticed that configure.in is set up to pull a fixed set of symbols out of the template files, by means of this rather grotty code: AROPT=`grep '^AROPT:' template/$TEMPLATE | awk -F: '{print $2}'` SHARED_LIB=`grep '^SHARED_LIB:' template/$TEMPLATE | awk -F: '{print $2}'` CFLAGS=`grep '^CFLAGS:' template/$TEMPLATE | awk -F: '{print $2}'` SRCH_INC=`grep '^SRCH_INC:' template/$TEMPLATE | awk -F: '{print $2}'` SRCH_LIB=`grep '^SRCH_LIB:' template/$TEMPLATE | awk -F: '{print $2}'` USE_LOCALE=`grep '^USE_LOCALE:' template/$TEMPLATE | awk -F: '{print $2}'` DLSUFFIX=`grep '^DLSUFFIX:' template/$TEMPLATE | awk -F: '{print $2}'` DL_LIB=`grep '^DL_LIB:' template/$TEMPLATE | awk -F: '{print $2}'` YACC=`grep '^YACC:' template/$TEMPLATE | awk -F: '{print $2}'` YFLAGS=`grep '^YFLAGS:' template/$TEMPLATE | awk -F: '{print $2}'` CC=`grep '^CC:' template/$TEMPLATE | awk -F: '{print $2}'` LIBS=`grep '^LIBS:' template/$TEMPLATE | awk -F: '{print $2}'` It seems to me that configure ought to just read the selected template file as a series of shell variable assignments and process whatever it finds. That way, a template file could assign to any shell variable within the configure run, not just these twelve. There is already one case where a template file tries to assign a setting that configure isn't noticing: template/sco containsLEX:lex which is quite nonfunctional at the moment. Presumably, whoever put that in did so with the expectation that configure would honor it. Any objection to this change? I also notice that most of the template files contain settings for "ALL", which isn't being used by configure either. (It won't be even after my proposed change of the template-file-reading code, because ALL isn't referenced anywhere in the configure script.) Most of the templates just set ALL to empty, but template/svr4 containsALL:+W0 Anyone have the foggiest what this item is supposed to do? It's definitely dead code as things stand, but perhaps at one time it meant something. regards, tom lane
В списке pgsql-hackers по дате отправления: