#797: Eliminate need to expand Makefile variables in parrot_config and other
external programs
-----------------------+----------------------------------------------------
 Reporter:  jkeenan    |       Owner:  jkeenan           
     Type:  RFC        |      Status:  assigned          
 Priority:  normal     |   Milestone:                    
Component:  configure  |     Version:  1.3.0             
 Severity:  medium     |    Keywords:  configure makefile
     Lang:             |       Patch:                    
 Platform:  all        |  
-----------------------+----------------------------------------------------

Comment(by doughera):

 Replying to [comment:3 jkeenan]:

 > More specifically, should it be our goal to '''eliminate all conditional
 determination''' of configuration values from the ''Makefile''?

 That's probably not worth the effort.  Things like

 > {{{ #IF(darwin):export DYLD_LIBRARY_PATH :=
 @blib_dir@:$(DYLD_LIBRARY_PATH) }}}

 are relatively simple, straightforward, and easy to understand.

 > Why, for instance, do we need code like this in
 ''config/gen/makefiles/root.in'':
 {{{
 > LIBPARROT_STATIC    := @blib_dir@/@libparrot_static@
 > #IF(win32):LIBPARROT_SHARED  := @libparrot_shared@
 > #ELSE:LIBPARROT_SHARED  := @blib_dir@/@libparrot_shared@
 }}}

 I know of no compelling reason.  The variables "libparrot_static" and
 "libparrot_shared" aren't really documented that well (i.e. are they
 supposed to include the path or not?) so you end up with the confusing
 situation here where LIBPARROT_STATIC includes the path, but the almost-
 identically-named libparrot_static does not.  Either is reasonable.

 > By the second-to-last configuration step, don't we already know what OS
 we're on?

 Yes, we certainly do.

 > Moreover, if it is ''make'' that has the last word on, ''e.g.,'' what
 the value of `libparrot` is,
 {{{
 > # This line controls whether a static or shared library is built
 > LIBPARROT           := @libparrot@
 }}}

 I don't see a problem with this.  Perhaps if the variable were named {{{
 libparrot_target_for_makefile_in_the_build_directory_but_useless_otherwise
 }}} then it would be obvious that it's not intended to be used outside of
 the build directory main makefile.  As it is, it has a name that makes it
 look like it might be something useful to know, and there's no
 documentation to tell you otherwise.

 > ... then none of the generated files or compiled programs which depend
 on values stored in ''lib/Parrot/Config/Generated.pm'' or
 ''config_lib.pasm'' would '''ever''' contain or have available to it the
 final values -- as ''make'' determines those values after those two files
 have been created by ''Configure.pl''?

 But I don't see why any of those generated files need to care either.
 That variable is only intended for use as a {{{ Makefile }}} target in the
 build directory.  Outside of that context, it is useless and irrelevant.
 I don't see anything wrong with "fixing" it, but I don't see much of a
 point either.  I suspect effort could be better spent documenting
 parrot_config variables so it's clearer which ones are worth worrying
 about in an installed parrot and which ones aren't.

-- 
Ticket URL: <https://trac.parrot.org/parrot/ticket/797#comment:5>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets

Reply via email to