On Sat, 9 Aug 2008, James Keenan via RT wrote:

> Last weekend tetragon and I had considerable discussion on #parrot about
> this problem.  My diagnosis was that we should not be handling
> command-line options at all in 'hints' files; they should be handled in
> inter::progs.

I didn't see any of this discussion, so I apologize if this was discussed 
already.

Moving command-line options out of the hints files probably means more 
hints files should use "triggers".  For example, how can you know which 
compiler flags to suggest if you don't even know which compiler you're 
using yet?  I think using triggers is a good idea anyway, but it's 
generally not implemented.  (And my last patch to try implementing it for 
dec_osf was rejected, so don't look at me.)

In perl5's Configure, we've found that users sometimes want to do 
different things to hints file settings. Sometimes they want to completely 
replace the hints file setting; other times they want to augment that 
setting. As a result, Configure offers a rich array of options to deal 
with hints.  I've included below the output of sh Configure -h.  Note, in 
particular, the variety of options available with the -A option.  I think 
parrot would ultimately benefit from some similar sort of flexibility. 
Note that I'm not saying parrot has to use the identical syntax, only that 
perl5 users have found at least some of these features useful.

Thus before implementing and testing a change, it might be worthwhile to 
specify and document what the overall intended behavior is.  For example,
how does one override a hints file setting?  How does one augment a hints 
file setting?  

Lastly, note that these questions are not specific to ccflags or any other 
inter::progs variable.  They could apply to *any* variable determined by 
Configure.

Usage: Configure [-dehrsEKOSV] [-f config.sh] [-D symbol] [-D symbol=value]
                 [-U symbol] [-U symbol=] [-A command:symbol...]
  -d : use defaults for all answers.
  -e : go on without questioning past the production of config.sh.
  -f : specify an alternate default configuration file.
  -h : print this help message and exit (with an error status).
  -r : reuse C symbols value if possible (skips costly nm extraction).
  -s : silent mode, only echoes questions and essential information.
  -D : define symbol to have some value:
         -D symbol         symbol gets the value 'define'
         -D symbol=value   symbol gets the value 'value'
       common used examples (see INSTALL for more info):
         -Duse64bitint            use 64bit integers
         -Duse64bitall            use 64bit integers and pointers
         -Dusethreads             use thread support
         -Dinc_version_list=none  do not include older perl trees in @INC
         -DEBUGGING=none          DEBUGGING options
         -Dcc=gcc                 choose your compiler
         -Dprefix=/opt/perl5      choose your destination
  -E : stop at the end of questions, after having produced config.sh.
  -K : do not use unless you know what you are doing.
  -O : let -D and -U override definitions from loaded configuration file.
  -S : perform variable substitutions on all .SH files (can mix with -f)
  -U : undefine symbol:
         -U symbol    symbol gets the value 'undef'
         -U symbol=   symbol gets completely empty
       e.g.:  -Uversiononly
  -A : manipulate symbol after the platform specific hints have been applied:
         -A append:symbol=value   append value to symbol
         -A symbol=value          like append:, but with a separating space
         -A define:symbol=value   define symbol to have value
         -A clear:symbol          define symbol to be ''
         -A define:symbol         define symbol to be 'define'
         -A eval:symbol=value     define symbol to be eval of value
         -A prepend:symbol=value  prepend value to symbol
         -A undef:symbol          define symbol to be 'undef'
         -A undef:symbol=         define symbol to be ''
       e.g.:  -A prepend:libswanted='cl pthread '
              -A ccflags=-DSOME_MACRO
  -V : print version number and exit (with a zero status).

-- 
    Andy Dougherty              [EMAIL PROTECTED]

Reply via email to