Re: [perl #22855] [PATCH] build imcc as parrot
On Wed, 2 Jul 2003, Benjamin Goldberg wrote: Andy Dougherty wrote: gmake: *** No rule to make target `languages/imcc/*.o', needed by `languages/imcc/imcc'. Stop. Hmm... would it be possible/reasonable to do: IMCCSRCS = languages/imcc/*.c IMCCOBJS = $(IMCCSRCS:.c=.o) and then use $(IMCCOBJS) in place of languages/imcc/*.o ? Alas, no. First, that won't work. That variable-substitution syntax is a non-portable extension. Second, it's unnecessarily redundant. The full, correct, dependencies for imcc should already be recorded in languages/imcc/Makefile. There is no point in reproducing them in the root Makefile as well. I suspect it's best to have an IMCC_PROG target that simply unconditionally does a cd to languages/imcc and calls $(MAKE). However, I fully recognize that Leo's intent was a minimum patch to build imcc as the parrot executable, and hence the current state (where the *.o line is simply deleted) is probably fine for now. -- Andy Dougherty [EMAIL PROTECTED]
Re: [perl #22855] [PATCH] build imcc as parrot
Leopold Toetsch [EMAIL PROTECTED] wrote: Ok, as there are no problems reported, I've applied it. Here is again a short summary: Attached is a minimum patch to build imcc as the parrot executable - renames orig parrot to test_main - renames imcc to parrot As the current build process needs rework anyway, I kept it to the bare minimum. Please give it a try on other platforms, especially non Linux. $ make test # full speed ;-) $ parrot -j examples/assembly/mops.pasm# run PASM/PIR and of course: $ parrot --help Some more remarks: - the one Makefile line with the *.o dependency is gone - parrot now has one incompatible (WRT old) command line switch: -d (--debug) needs an additional parameter, specifying the debug level. Run -d 1 to get the old behavior. - Several things are obsolete now, e.g. the quick*test targets in the Makefile as well as related code in Test.pm languages/* users of imcc now should just use the $ROOT/parrot$EXE executable instead of languages/imcc/imcc. Have fun, leo
Re: [perl #22855] [PATCH] build imcc as parrot
At 3:57 PM +0100 7/1/03, Nicholas Clark wrote: On Tue, Jul 01, 2003 at 10:04:41AM -0400, Andy Dougherty wrote: The problem is that with a clean build tree, there are no *.o files down in languages/imcc/ at the point when that target is reached. Hence make doesn't have anything to expand *.o as, and quite reasonably complains. If, however, there is even a single .o file in that directory, then the wildcard is expanded as you'd expect and the make proceeds. Is it possible to get a Bourne shell (here invoked as subshell) to expand the wildcard to if nothing matches? If so, that would solve the problem, wouldn't it? I think we'd be better off just specifying the object files. Being explicit's a good thing. -- Dan --it's like this--- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk
Re: [perl #22855] [PATCH] build imcc as parrot
Andy Dougherty wrote: On Tue, 1 Jul 2003, Leopold Toetsch wrote: Andy Dougherty [EMAIL PROTECTED] wrote: On Mon, 30 Jun 2003, Leopold Toetsch wrote: Attached is a minimum patch to build imcc as the parrot executable languages/imcc/*.o languages/imcc/*.o doesn't match anything Brain dead make? No. Here's the same result with GNU make: gmake: *** No rule to make target `languages/imcc/*.o', needed by `languages/imcc/imcc'. Stop. The problem is that with a clean build tree, there are no *.o files down in languages/imcc/ at the point when that target is reached. Hence make doesn't have anything to expand *.o as, and quite reasonably complains. If, however, there is even a single .o file in that directory, then the wildcard is expanded as you'd expect and the make proceeds. Hmm... would it be possible/reasonable to do: IMCCSRCS = languages/imcc/*.c IMCCOBJS = $(IMCCSRCS:.c=.o) and then use $(IMCCOBJS) in place of languages/imcc/*.o ? Obviously, we're never going to not have any .c files :) -- $a=24;split//,240513;s/\B/ = /for@@=qw(ac ab bc ba cb ca );{push(@b,$a),($a-=6)^=1 for 2..$a/6x--$|;print [EMAIL PROTECTED] ]\n;((6=($a-=6))?$a+=$_[$a%6]-$a%6:($a=pop @b))redo;}
Re: [perl #22855] [PATCH] build imcc as parrot
On Tue, 1 Jul 2003, Leopold Toetsch wrote: Andy Dougherty [EMAIL PROTECTED] wrote: On Mon, 30 Jun 2003, Leopold Toetsch wrote: Attached is a minimum patch to build imcc as the parrot executable languages/imcc/*.o languages/imcc/*.o doesn't match anything Brain dead make? No. Here's the same result with GNU make: gmake: *** No rule to make target `languages/imcc/*.o', needed by `languages/imcc/imcc'. Stop. The problem is that with a clean build tree, there are no *.o files down in languages/imcc/ at the point when that target is reached. Hence make doesn't have anything to expand *.o as, and quite reasonably complains. If, however, there is even a single .o file in that directory, then the wildcard is expanded as you'd expect and the make proceeds. Anyway, this line could for sure be deleted. That's probably sufficient for now. Alternatively, you could simply always force the descent into languages/imcc. I can imagine scenarios where the *.o files were updated but the *.c files weren't (e.g. re-compiling imcc/*.c with different options) and the root Makefile would miss that dependency, but such scenarios are certainly outside the normal run of things. Apart from that, it built fine and passed all tests with Sun's cc and perl5.00503 on Solaris 8. Fine. Thanks for your feedback. You're welcome. And thanks for moving us past the perl assembler! -- Andy Dougherty [EMAIL PROTECTED]
Re: [perl #22855] [PATCH] build imcc as parrot
On Tue, Jul 01, 2003 at 10:04:41AM -0400, Andy Dougherty wrote: The problem is that with a clean build tree, there are no *.o files down in languages/imcc/ at the point when that target is reached. Hence make doesn't have anything to expand *.o as, and quite reasonably complains. If, however, there is even a single .o file in that directory, then the wildcard is expanded as you'd expect and the make proceeds. Is it possible to get a Bourne shell (here invoked as subshell) to expand the wildcard to if nothing matches? If so, that would solve the problem, wouldn't it? Nicholas Clark
Re: [perl #22855] [PATCH] build imcc as parrot
Andy Dougherty [EMAIL PROTECTED] wrote: The problem is that with a clean build tree, there are no *.o files down in languages/imcc/ at the point when that target is reached. Hence make doesn't have anything to expand *.o as, and quite reasonably complains. If, however, there is even a single .o file in that directory, then the wildcard is expanded as you'd expect and the make proceeds. If you want a version of make where non-extisting files will still match the wildcards (because the wildard engine looks at Make's DAG), you might want to look at makepp (http://makepp.sourceforge.net). Its written in Perl, so should be portable to everywhere parrot needs to build. Its blurb makes it look pretty good, though I've not yet used it in a real project. Dave.
Re: [perl #22855] [PATCH] build imcc as parrot
On Mon, 30 Jun 2003, Leopold Toetsch wrote: Attached is a minimum patch to build imcc as the parrot executable Please give it a try on other platforms, especially non Linux. Sun's make failed with the following error: make: Fatal error: Don't know how to make target `languages/imcc/*.o' I guess it's because in the following segment of the Makefile, $(IMCC_PROG) : $(LIBPARROT)\ languages/imcc/*.c \ languages/imcc/*.h \ languages/imcc/*.y \ languages/imcc/*.l \ languages/imcc/*.o cd languages/imcc $(MAKE) cd ../.. languages/imcc/*.o doesn't match anything since nothing's been built in that directory yet. I suspect it's best to have an IMCC_PROG target that simply unconditionally does a cd to languages/imcc and calls $(MAKE). Apart from that, it built fine and passed all tests with Sun's cc and perl5.00503 on Solaris 8. -- Andy Dougherty [EMAIL PROTECTED]
Re: [perl #22855] [PATCH] build imcc as parrot
Andy Dougherty [EMAIL PROTECTED] wrote: On Mon, 30 Jun 2003, Leopold Toetsch wrote: Attached is a minimum patch to build imcc as the parrot executable languages/imcc/*.o languages/imcc/*.o doesn't match anything Brain dead make? Anyway, this line could for sure be deleted. Apart from that, it built fine and passed all tests with Sun's cc and perl5.00503 on Solaris 8. Fine. Thanks for your feedback. leo