2008/8/17 Reini Urban <[EMAIL PROTECTED]>:
> James Keenan via RT schrieb:
>>
>> Reini,
>>
>> I would argue that we take a different approach with 'make reconfig'. We
>> need to get rid of it entirely.  In Parrot years, it's ancient code:
>>
>> $ svn blame config/gen/makefiles/root.in | grep -n -A 3 reconfig
>> ...
>> --
>> 708:  4916   boemmels   @echo "  reconfig:          'clean' and redo
>> configuration."
>> ...
>> --
>> 1769:  7554   bernhard reconfig : clean
>> 1770- 22967   bernhard  $(PERL) Configure.pl
>>
>> And it doesn't DWIM.  Nowadays, if you want to redo configuration, you
>> need to call 'make realclean', as 'make clean' does not delete the files
>> created by Configure.pl.  (If you want to re-run one particular
>> configuration step, use tools/dev/reconfigure.pl.)
>>
>> I guess that the existence of 'make reconfig' completely escaped me.  If
>> I had known about it, I would have recommended excising it, as it's
>> inconsistent with the way Configure.pl has worked for at least two years.
>>
>> Now, there may very well be other reasons to retain the command-line
>> options.  Parrot::Configure::Options processes those options, and the
>> most important of them are available for the lifetime of the
>> Parrot::Configure object.  Given that, the question arises as to whether
>> they should be retained in the Makefile and/or in Parrot::Config.  I'm
>> now developing file-based configuration in a branch, and in that branch
>> I've chosen to store the parsed version of that file in Parrot::Config.
>>
>> So, my recommendation is to hold off on deciding how to store
>> command-line options for the next week.  After I present this patch for
>> file-based configuration, we'll be in a better position to decide
>> how/where to store the command-line options data.
>
> Hmm,
> Attached is my improved version which got the GEN_CONFIG dependencies right.
>
> My goal is to get rid of the required make clean and to get all dependencies
> right. With a required make clean we are loosers.
> The GEN_CONFIG target does not need clean anymore. It needs to be more
> fine-tuned though.
>
> This solves the Makefile problem.
> What you plan with the perl libraries is fine, but the driver for the
> dependencies to finally get rid of make clean should be the Makefiles.
> The toolkit could be Parrot::Config a la tools/dev/reconfigure.pl
>
> I got rid of "[perl #39742] [BUG] installed parrot conflicts with dev
> parrot" with my 39742-installed-conflict.patch.
> Now just the proper dependencies and install are missing.

Attached is the version which is in the cygwin 0.7.0 package.

CONFIGURE_GENERATED_FILES should use it,
The GEN_CONFIGS dep is commented out, because it's not 100% safe yet.

-- 
Reini Urban
http://phpwiki.org/ http://murbreak.at/
2008-08-17 [EMAIL PROTECTED]

make reconfig ignores the given Configure.pl command-line args.
We need to save the config_args somewhere to be able to do 
make reconfig like 

CONFIG_ARGS = @config_args@

$(CONFIGURE_GENERATED_FILES) : Configure.pl
	$(PERL) Configure.pl $(CONFIG_ARGS)

We really should track all dependencies and do a make reconfig automatically.

The CONFIG_ARGS should be stored in Makefile.
config_args should be stored in config_lib.pasm as in perl5 also.

Index: parrot-svn/config/gen/makefiles/root.in
===================================================================
--- parrot-svn.orig/config/gen/makefiles/root.in
+++ parrot-svn/config/gen/makefiles/root.in
@@ -19,6 +19,7 @@
 DEVEL           = @DEVEL@
 VERSION         = @[EMAIL PROTECTED](DEVEL)
 SOVERSION       = @VERSION@
+CONFIG_ARGS     = @config_args@
 
 # Override at least PREFIX with the install location if you're going
 # to be using this outside of your build area.
@@ -999,6 +1000,20 @@ $(INC_DIR)/oplib/ops.h lib/Parrot/OpLib/
     lib/Parrot/OpsFile.pm lib/Parrot/Op.pm $(OPS_DIR)/ops.num $(OPS_DIR)/ops.skip
 	$(PERL) $(BUILD_TOOLS_DIR)/ops2pm.pl $(OPS_FILES)
 
+# FIXME: This creates a cycle sometimes
+#lib/Parrot/Config/Generated.pm \
+#    $(SRC_DIR)/platform.c \
+##CONDITIONED_LINE(platform_asm):    $(SRC_DIR)/platform_asm.s \
+##CONDITIONED_LINE(has_opengl):    config/gen/call_list/opengl.in \
+##CONDITIONED_LINE(has_glut):    $(SRC_DIR)/glut_callbacks.c \
+#    config_lib.pasm \
+#    $(BUILD_TOOLS_DIR)/dynpmc.pl \
+#    $(BUILD_TOOLS_DIR)/dynoplibs.pl \
+# : Configure.pl lib/Parrot/Configure.pm \
+#   lib/Parrot/Configure/Step/List.pm lib/Parrot/Configure/Step/Methods.pm
+#	@echo "  Makefile out-of-date: reconfigure"
+#	$(PERL) Configure.pl $(CONFIG_ARGS)
+
 ###############################################################################
 #
 # Examples (Assembly):
@@ -1774,7 +1789,7 @@ svnclobber : .svn
 	$(PERL) tools/dev/svnclobber.pl
 
 reconfig : clean
-	$(PERL) Configure.pl
+	$(PERL) Configure.pl $(CONFIG_ARGS)
 
 manitest :
 	$(PERL) tools/dev/manicheck.pl
Index: parrot-svn/Configure.pl
===================================================================
--- parrot-svn.orig/Configure.pl
+++ parrot-svn/Configure.pl
@@ -63,6 +63,8 @@ $conf->add_steps( get_steps_list() );
 
 # from Parrot::Configure::Data
 $conf->options->set( %{$args} );
+# save the command-line
+$conf->data->set(config_args => join(" ", @ARGV));
 
 # Log files created by Configure.pl in MANIFEST.configure.generated
 $conf->{active_configuration} = 1;

Reply via email to