# New Ticket Created by Andy Dougherty # Please include the string: [perl #30314] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org:80/rt3/Ticket/Display.html?id=30314 >
This patch changes the languages/cola/Makefile from a manually-generated one to one which is generated by Configure.pl from a new template. The main thing this does is remove the explicit dependency on gcc. Cola will now be compiled with the same compiler used to compile parrot. With this in place, cola now builds for me. (It still doesn't have any tests, however . . . .) Before (or after) applying this patch, you should rm languages/cola/Makefile This patch creates one new file: config/gen/makefiles/cola.in . Alternatively, if there's some CVS incantation to save the revision history, then languages/cola/Makefile could be moved to config/gen/makefiles/cola.in There are also tiny changes to the error messages in config/gen/makefiles/languages.in to help identify which target is complaining. diff -r -u -P parrot-current/MANIFEST parrot-andy/MANIFEST --- parrot-current/MANIFEST Tue Jun 15 19:00:11 2004 +++ parrot-andy/MANIFEST Wed Jun 16 12:28:35 2004 @@ -161,6 +161,7 @@ config/gen/makefiles/befunge.in [] config/gen/makefiles/bf.in [] config/gen/makefiles/classes.in [] +config/gen/makefiles/cola.in [] config/gen/makefiles/docs.in [] config/gen/makefiles/dynclasses.in [] config/gen/makefiles/dynoplibs.in [] @@ -1918,7 +1919,6 @@ languages/bf/helloworld.bf [bf] languages/bf/test.bf [bf] languages/cola/MAINTAINER [cola] -languages/cola/Makefile [cola] languages/cola/README [cola] languages/cola/System.cola [cola] languages/cola/cola.h [cola] diff -r -u -P parrot-current/config/gen/makefiles/cola.in parrot-andy/config/gen/makefiles/cola.in --- parrot-current/config/gen/makefiles/cola.in Wed Dec 31 19:00:00 1969 +++ parrot-andy/config/gen/makefiles/cola.in Wed Jun 16 12:36:59 2004 @@ -0,0 +1,93 @@ +# +# Makefile for languages/cola +# +PARROT = ..${slash}..${slash}parrot${exe} +PERL = ${perl} +RM_F = ${rm_f} +RM_RF = ${rm_rf} + +CC = ${cc} +CFLAGS = ${ccflags} +DEBUG = ${cc_debug} +LINK = ${link} + +YACC = ${yacc} +LEX = ${lex} + +# Libraries: Ordinarily, no special libraries are needed +# for cola, but one of the following settings might be helpful +# in some cases. +# Use the same libraries as Parrot: +# LIBS = ${libs} +# You might need these for some versions of flex and/or yacc: +# LIBS = -ll -ly +# Ordinarily, no special libraries are needed for cola. +LIBS = + +# These manual settings might be helpful in some situations. +# Visual C++ +# CC = cl +# +# GCC +# CC = gcc -Wall -pedantic +# +# GCC with Electric Fence +# CC = gcc -efence -Wall -pedantic +# LIBS = -lefence + +HEADERS = cola.h parser.h + +default : + chmod 775 colac + $(MAKE) colacc + +nogen : gen.o semant.o sym.o type.o + $(CC) $(DEBUG) -c parser.c + $(CC) $(DEBUG) -c lexer.c + $(CC) $(DEBUG) -o colacc parser.o lexer.o gen.o semant.o sym.o type.o $(LIBS) + +clean : + $(RM_F) core + $(RM_F) *.o + $(RM_F) parser.output + $(RM_F) colacc + +# Don't run this target unless you have bison and flex +# installed to regenerate the needed files. +realclean: + $(RM_F) parser.h + $(RM_F) lexer.c parser.c + +publish : + $(PERL) publish.pl < MANIFEST + +dist : + $(PERL) distribution.pl < MANIFEST + +parser.c : cola.y + $(YACC) -d -o parser.c cola.y + +lexer.c : cola.l $(HEADERS) + $(LEX) cola.l + +lexer.o : lexer.c $(HEADERS) + $(CC) $(DEBUG) -c lexer.c + +parser.o : parser.c $(HEADERS) + $(CC) $(DEBUG) -c parser.c + +semant.o : semant.c $(HEADERS) + $(CC) $(DEBUG) -c semant.c + +sym.o : sym.c $(HEADERS) + $(CC) $(DEBUG) -c sym.c + +type.o : type.c $(HEADERS) + $(CC) $(DEBUG) -c type.c + +gen.o : gen.c $(HEADERS) + $(CC) $(DEBUG) -c gen.c + +colacc : parser.o lexer.o gen.o semant.o sym.o type.o + $(CC) $(DEBUG) -o colacc parser.o lexer.o gen.o semant.o sym.o type.o $(LIBS) + diff -r -u -P parrot-current/config/gen/makefiles/languages.in parrot-andy/config/gen/makefiles/languages.in --- parrot-current/config/gen/makefiles/languages.in Mon Jun 14 19:00:08 2004 +++ parrot-andy/config/gen/makefiles/languages.in Wed Jun 16 12:28:35 2004 @@ -49,11 +49,11 @@ BASIC : BASIC.dummy BASIC.dummy: - # don't know how to build + # don't know how to build BASIC BASIC.test: - # Don't know how to test + # Don't know how to test BASIC BASIC.clean: - # Don't know how to clean + # Don't know how to clean BASIC befunge : befunge.dummy befunge.dummy: @@ -105,7 +105,7 @@ miniperl : miniperl.dummy miniperl.dummy: - # missing t/harness + # miniperl is missing t/harness # $(MAKE_C) miniperl miniperl.test: $(MAKE_C) miniperl test @@ -124,7 +124,7 @@ parrot_compiler.dummy: $(MAKE_C) parrot_compiler parrot_compiler.test: - # no target test in Makefile + # no target test in parrot_compiler/Makefile # (MAKE_C) parrot_compiler test parrot_compiler.clean: $(MAKE_C) parrot_compiler clean diff -r -u -P parrot-current/config/gen/makefiles.pl parrot-andy/config/gen/makefiles.pl --- parrot-current/config/gen/makefiles.pl Mon May 3 03:00:07 2004 +++ parrot-andy/config/gen/makefiles.pl Wed Jun 16 12:28:35 2004 @@ -69,6 +69,8 @@ commentType => '#', replace_slashes => 1); genfile('config/gen/makefiles/befunge.in', 'languages/befunge/Makefile', commentType => '#', replace_slashes => 1); + genfile('config/gen/makefiles/cola.in', 'languages/cola/Makefile', + commentType => '#', replace_slashes => 1); genfile('config/gen/makefiles/ook.in', 'languages/ook/Makefile', commentType => '#', replace_slashes => 1); genfile('config/gen/makefiles/urm.in', 'languages/urm/Makefile', -- Andy Dougherty [EMAIL PROTECTED]