Pascal compiler now runs.
--HG-- branch : dtrg-buildsystem rename : lang/basic/build.mk => lang/pc/build.mk rename : lang/cem/cemcom.ansi/build.mk => lang/pc/comp/build.mk rename : lang/basic/lib/build.mk => lang/pc/libpc/build.mk
This commit is contained in:
		
							parent
							
								
									a6ebaeabd0
								
							
						
					
					
						commit
						66aebcdd91
					
				
					 39 changed files with 265 additions and 26 deletions
				
			
		
							
								
								
									
										1
									
								
								Makefile
									
										
									
									
									
								
							
							
						
						
									
										1
									
								
								Makefile
									
										
									
									
									
								
							|  | @ -55,6 +55,7 @@ include util/topgen/build.mk | ||||||
| 
 | 
 | ||||||
| include lang/cem/build.mk | include lang/cem/build.mk | ||||||
| include lang/basic/build.mk | include lang/basic/build.mk | ||||||
|  | include lang/pc/build.mk | ||||||
| 
 | 
 | ||||||
| include mach/proto/as/build.mk | include mach/proto/as/build.mk | ||||||
| include mach/proto/ncg/build.mk | include mach/proto/ncg/build.mk | ||||||
|  |  | ||||||
|  | @ -18,14 +18,14 @@ $(call cfile, $D/func.c) | ||||||
| 
 | 
 | ||||||
| $(call llgen, $(OBJDIR)/$D, $D/basic.g) | $(call llgen, $(OBJDIR)/$D, $D/basic.g) | ||||||
| 
 | 
 | ||||||
| $(eval g := $(OBJDIR)/$D/token.h) | $(eval g := $(OBJDIR)/$D/tokentab.h) | ||||||
|  | $(eval $q: $g) | ||||||
| $(eval CLEANABLES += $g) | $(eval CLEANABLES += $g) | ||||||
| $g: $D/maketokentab $(OBJDIR)/$D/Lpars.h | $g: $D/maketokentab $(OBJDIR)/$D/Lpars.h | ||||||
| 	@echo TOKENTAB $$@ | 	@echo TOKENTAB $$@ | ||||||
| 	@mkdir -p $$(dir $$@) | 	@mkdir -p $$(dir $$@) | ||||||
| 	$(hide) cd $(OBJDIR)/$D && $(abspath $$^) | 	$(hide) cd $(OBJDIR)/$D && $(abspath $$^) | ||||||
| 
 | 
 | ||||||
| $(eval $q: $(OBJDIR)/$D/token.h) |  | ||||||
| $(eval $q: $(OBJDIR)/$D/Lpars.h) | $(eval $q: $(OBJDIR)/$D/Lpars.h) | ||||||
| $(eval $q: $(INCDIR)/print.h) | $(eval $q: $(INCDIR)/print.h) | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
							
								
								
									
										3
									
								
								lang/pc/build.mk
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								lang/pc/build.mk
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,3 @@ | ||||||
|  | include lang/pc/libpc/build.mk | ||||||
|  | include lang/pc/comp/build.mk | ||||||
|  | 
 | ||||||
|  | @ -3,10 +3,8 @@ | ||||||
| #include    <stdlib.h> | #include    <stdlib.h> | ||||||
| #include    <stdio.h> | #include    <stdio.h> | ||||||
| #include    <string.h> | #include    <string.h> | ||||||
|  | #include    "parameters.h" | ||||||
| #include	"debug.h" | #include	"debug.h" | ||||||
| #include	"idfsize.h" |  | ||||||
| #include	"numsize.h" |  | ||||||
| #include	"strsize.h" |  | ||||||
| 
 | 
 | ||||||
| #include	<alloc.h> | #include	<alloc.h> | ||||||
| #include	<em_arith.h> | #include	<em_arith.h> | ||||||
|  |  | ||||||
|  | @ -10,6 +10,7 @@ | ||||||
| #include	<em_arith.h> | #include	<em_arith.h> | ||||||
| #include	<em_label.h> | #include	<em_label.h> | ||||||
| 
 | 
 | ||||||
|  | #include    "parameters.h" | ||||||
| #include	"LLlex.h" | #include	"LLlex.h" | ||||||
| #include	"Lpars.h" | #include	"Lpars.h" | ||||||
| #include	"idf.h" | #include	"idf.h" | ||||||
|  |  | ||||||
|  | @ -1,3 +1,4 @@ | ||||||
|  | #include    "parameters.h" | ||||||
| #include	"debug.h" | #include	"debug.h" | ||||||
| 
 | 
 | ||||||
| #include	<alloc.h> | #include	<alloc.h> | ||||||
|  |  | ||||||
							
								
								
									
										132
									
								
								lang/pc/comp/build.mk
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										132
									
								
								lang/pc/comp/build.mk
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,132 @@ | ||||||
|  | D := lang/pc/comp | ||||||
|  | 
 | ||||||
|  | define build-pc-allocd-header | ||||||
|  | $2: $1 $D/make.allocd | ||||||
|  | 	@echo ALLOCD $$@ | ||||||
|  | 	@mkdir -p $$(dir $$@) | ||||||
|  | 	$(hide) $D/make.allocd < $$^ > $$@ | ||||||
|  | 
 | ||||||
|  | $(eval CLEANABLES += $2) | ||||||
|  | $(eval $q: $2) | ||||||
|  | endef | ||||||
|  | 
 | ||||||
|  | define build-pc-next | ||||||
|  | $(eval CLEANABLES += $(OBJDIR)/$D/next.c) | ||||||
|  | $(OBJDIR)/$D/next.c: $D/make.next $1 | ||||||
|  | 	@echo NEXT $$@ | ||||||
|  | 	@mkdir -p $$(dir $$@) | ||||||
|  | 	$(hide) $$^ > $$@ | ||||||
|  | $(call cfile, $(OBJDIR)/$D/next.c) | ||||||
|  | 
 | ||||||
|  | $(foreach f, $1, $(call build-pc-allocd-header, \ | ||||||
|  | 	$f, $(OBJDIR)/$(basename $f).h)) | ||||||
|  | endef | ||||||
|  | 
 | ||||||
|  | define build-pc-impl | ||||||
|  | 
 | ||||||
|  | $(call reset) | ||||||
|  | $(eval cflags += -I$(OBJDIR)/$D -I$D -DSTATIC=static) | ||||||
|  | 
 | ||||||
|  | $(call cfile, $D/LLlex.c) | ||||||
|  | $(call cfile, $D/LLmessage.c) | ||||||
|  | $(call cfile, $D/body.c) | ||||||
|  | $(call cfile, $D/chk_expr.c) | ||||||
|  | $(call cfile, $D/code.c) | ||||||
|  | $(call cfile, $D/cstoper.c) | ||||||
|  | $(call cfile, $D/def.c) | ||||||
|  | $(call cfile, $D/desig.c) | ||||||
|  | $(call cfile, $D/enter.c) | ||||||
|  | $(call cfile, $D/error.c) | ||||||
|  | $(call cfile, $D/idf.c) | ||||||
|  | $(call cfile, $D/input.c) | ||||||
|  | $(call cfile, $D/label.c) | ||||||
|  | $(call cfile, $D/lookup.c) | ||||||
|  | $(call cfile, $D/main.c) | ||||||
|  | $(call cfile, $D/misc.c) | ||||||
|  | $(call cfile, $D/node.c) | ||||||
|  | $(call cfile, $D/options.c) | ||||||
|  | $(call cfile, $D/progs.c) | ||||||
|  | $(call cfile, $D/readwrite.c) | ||||||
|  | $(call cfile, $D/scope.c) | ||||||
|  | $(call cfile, $D/stab.c) | ||||||
|  | $(call cfile, $D/tokenname.c) | ||||||
|  | $(call cfile, $D/type.c) | ||||||
|  | $(call cfile, $D/typequiv.c) | ||||||
|  | 
 | ||||||
|  | $(call llgen, $(OBJDIR)/$D, \ | ||||||
|  | 	$(OBJDIR)/$D/tokenfile.g \
 | ||||||
|  | 	$D/program.g \
 | ||||||
|  | 	$D/declar.g \
 | ||||||
|  | 	$D/expression.g \
 | ||||||
|  | 	$D/statement.g) | ||||||
|  | 
 | ||||||
|  | $(eval CLEANABLES += $(OBJDIR)/$D/tokenfile.g) | ||||||
|  | $(OBJDIR)/$D/tokenfile.g: $D/make.tokfile $D/tokenname.c | ||||||
|  | 	@echo TOKENFILE $$@ | ||||||
|  | 	@mkdir -p $$(dir $$@) | ||||||
|  | 	$(hide) sh $D/make.tokfile < $D/tokenname.c > $$@ | ||||||
|  | 
 | ||||||
|  | $(call tabgen, $D/char.tab) | ||||||
|  | 
 | ||||||
|  | $(eval $q: $(OBJDIR)/$D/parameters.h) | ||||||
|  | 
 | ||||||
|  | $(eval CLEANABLES += $(OBJDIR)/$D/parameters.h) | ||||||
|  | $(OBJDIR)/$D/parameters.h: $D/Parameters | ||||||
|  | 	@echo PARAMETERS $$@ | ||||||
|  | 	@mkdir -p $$(dir $$@) | ||||||
|  | 	$(hide) echo '#ifndef PARAMETERS_H' > $$@ | ||||||
|  | 	$(hide) echo '#define PARAMETERS_H' >> $$@ | ||||||
|  | 	$(hide) grep -v '^!' < $$^ >> $$@ | ||||||
|  | 	$(hide) echo '#endif' >> $$@ | ||||||
|  | 
 | ||||||
|  | $(eval CLEANABLES += $(OBJDIR)/$D/symbol2str.c) | ||||||
|  | $(OBJDIR)/$D/symbol2str.c: $D/make.tokcase $D/tokenname.c | ||||||
|  | 	@echo TOKCASE $$@ | ||||||
|  | 	@mkdir -p $$(dir $$@) | ||||||
|  | 	$(hide) $D/make.tokcase < $D/tokenname.c > $$@ | ||||||
|  | $(call cfile, $(OBJDIR)/$D/symbol2str.c) | ||||||
|  | 
 | ||||||
|  | $(call build-pc-next, \ | ||||||
|  | 		$D/def.H \
 | ||||||
|  | 		$D/type.H \
 | ||||||
|  | 		$D/node.H \
 | ||||||
|  | 		$D/scope.H \
 | ||||||
|  | 		$D/desig.H \
 | ||||||
|  | 		$D/tmpvar.C \
 | ||||||
|  | 		$D/casestat.C) | ||||||
|  | 
 | ||||||
|  | $(call build-pc-allocd-header, $D/tmpvar.C, $(OBJDIR)/$D/tmpvar.c) | ||||||
|  | $(call cfile, $(OBJDIR)/$D/tmpvar.c) | ||||||
|  | 
 | ||||||
|  | $(call build-pc-allocd-header, $D/casestat.C, $(OBJDIR)/$D/casestat.c) | ||||||
|  | $(call cfile, $(OBJDIR)/$D/casestat.c) | ||||||
|  | 
 | ||||||
|  | $(eval $q: $(OBJDIR)/$D/Lpars.h) | ||||||
|  | $(eval $q: $(INCDIR)/idf_pkg.spec) | ||||||
|  | $(eval $q: $(INCDIR)/idf_pkg.body) | ||||||
|  | $(eval $q: $(INCDIR)/inp_pkg.spec) | ||||||
|  | $(eval $q: $(INCDIR)/inp_pkg.body) | ||||||
|  | $(eval $q: $(INCDIR)/alloc.h) | ||||||
|  | $(eval $q: $(INCDIR)/em_codeEK.h) | ||||||
|  | $(eval $q: $(INCDIR)/print.h) | ||||||
|  | $(eval $q: $(INCDIR)/system.h) | ||||||
|  | 
 | ||||||
|  | $(call file, $(LIBEM_MES)) | ||||||
|  | $(call file, $(LIBEMK)) | ||||||
|  | $(call file, $(LIBEM_DATA)) | ||||||
|  | $(call file, $(LIBINPUT)) | ||||||
|  | $(call file, $(LIBASSERT)) | ||||||
|  | $(call file, $(LIBALLOC)) | ||||||
|  | $(call file, $(LIBFLT_ARITH)) | ||||||
|  | $(call file, $(LIBPRINT)) | ||||||
|  | $(call file, $(LIBSYSTEM)) | ||||||
|  | $(call file, $(LIBSTRING)) | ||||||
|  | $(call cprogram, $(BINDIR)/em_pc) | ||||||
|  | $(call installto, $(PLATDEP)/em_pc) | ||||||
|  | 
 | ||||||
|  | $(call reset) | ||||||
|  | $(eval q := $D/em_pc.6) | ||||||
|  | $(call installto, $(INSDIR)/share/man/man6/em_pc.6) | ||||||
|  | endef | ||||||
|  | 
 | ||||||
|  | $(eval $(build-pc-impl)) | ||||||
|  | @ -1,4 +1,5 @@ | ||||||
| /* C A S E   S T A T E M E N T   C O D E   G E N E R A T I O N */ | /* C A S E   S T A T E M E N T   C O D E   G E N E R A T I O N */ | ||||||
|  | #include    "parameters.h" | ||||||
| #include	"debug.h" | #include	"debug.h" | ||||||
| 
 | 
 | ||||||
| #include	<alloc.h> | #include	<alloc.h> | ||||||
|  | @ -8,7 +9,6 @@ | ||||||
| #include	"LLlex.h" | #include	"LLlex.h" | ||||||
| #include	"Lpars.h" | #include	"Lpars.h" | ||||||
| #include	"chk_expr.h" | #include	"chk_expr.h" | ||||||
| #include	"density.h" |  | ||||||
| #include	"main.h" | #include	"main.h" | ||||||
| #include	"node.h" | #include	"node.h" | ||||||
| #include	"type.h" | #include	"type.h" | ||||||
|  |  | ||||||
|  | @ -3,8 +3,10 @@ | ||||||
| /*	Check expressions, and try to evaluate them as far as possible.
 | /*	Check expressions, and try to evaluate them as far as possible.
 | ||||||
| */ | */ | ||||||
| 
 | 
 | ||||||
|  | #include    "parameters.h" | ||||||
| #include	"debug.h" | #include	"debug.h" | ||||||
| 
 | 
 | ||||||
|  | #include    <stdlib.h> | ||||||
| #include	<alloc.h> | #include	<alloc.h> | ||||||
| #include	<assert.h> | #include	<assert.h> | ||||||
| #include	<em_arith.h> | #include	<em_arith.h> | ||||||
|  |  | ||||||
|  | @ -2,6 +2,7 @@ | ||||||
| 
 | 
 | ||||||
| #include    <stdlib.h> | #include    <stdlib.h> | ||||||
| #include    <string.h> | #include    <string.h> | ||||||
|  | #include    "parameters.h" | ||||||
| #include	"debug.h" | #include	"debug.h" | ||||||
| #include	<assert.h> | #include	<assert.h> | ||||||
| #include	<em.h> | #include	<em.h> | ||||||
|  |  | ||||||
|  | @ -2,8 +2,8 @@ | ||||||
| 
 | 
 | ||||||
| #include    <stdlib.h> | #include    <stdlib.h> | ||||||
| #include    <string.h> | #include    <string.h> | ||||||
|  | #include    "parameters.h" | ||||||
| #include	"debug.h" | #include	"debug.h" | ||||||
| #include	"target_sizes.h" |  | ||||||
| 
 | 
 | ||||||
| #include	<alloc.h> | #include	<alloc.h> | ||||||
| #include	<assert.h> | #include	<assert.h> | ||||||
|  |  | ||||||
|  | @ -1,8 +1,6 @@ | ||||||
| /* A debugging macro
 | /* A debugging macro
 | ||||||
| */ | */ | ||||||
| 
 | 
 | ||||||
| #include "debugcst.h" |  | ||||||
| 
 |  | ||||||
| #ifdef DEBUG | #ifdef DEBUG | ||||||
| #define DO_DEBUG(x, y)	((x) && (y)) | #define DO_DEBUG(x, y)	((x) && (y)) | ||||||
| #else | #else | ||||||
|  |  | ||||||
|  | @ -1,6 +1,7 @@ | ||||||
| /* D E C L A R A T I O N S */ | /* D E C L A R A T I O N S */ | ||||||
| 
 | 
 | ||||||
| { | { | ||||||
|  | #include    "parameters.h" | ||||||
| /* next line DEBUG */ | /* next line DEBUG */ | ||||||
| #include	"debug.h" | #include	"debug.h" | ||||||
| 
 | 
 | ||||||
|  | @ -19,7 +20,6 @@ | ||||||
| #include	"node.h" | #include	"node.h" | ||||||
| #include	"scope.h" | #include	"scope.h" | ||||||
| #include	"type.h" | #include	"type.h" | ||||||
| #include	"dbsymtab.h" |  | ||||||
| 
 | 
 | ||||||
| #define	PC_BUFSIZ	(sizeof(struct file) - (int)((struct file *)0)->bufadr) | #define	PC_BUFSIZ	(sizeof(struct file) - (int)((struct file *)0)->bufadr) | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1,5 +1,6 @@ | ||||||
| /* D E F I N I T I O N   M E C H A N I S M */ | /* D E F I N I T I O N   M E C H A N I S M */ | ||||||
| 
 | 
 | ||||||
|  | #include    "parameters.h" | ||||||
| #include	"debug.h" | #include	"debug.h" | ||||||
| 
 | 
 | ||||||
| #include	<alloc.h> | #include	<alloc.h> | ||||||
|  |  | ||||||
|  | @ -7,6 +7,7 @@ | ||||||
| 	or perform a store. | 	or perform a store. | ||||||
| */ | */ | ||||||
| 
 | 
 | ||||||
|  | #include    "parameters.h" | ||||||
| #include	"debug.h" | #include	"debug.h" | ||||||
| 
 | 
 | ||||||
| #include	<assert.h> | #include	<assert.h> | ||||||
|  |  | ||||||
|  | @ -5,6 +5,7 @@ | ||||||
| #include	<em_arith.h> | #include	<em_arith.h> | ||||||
| #include	<em_label.h> | #include	<em_label.h> | ||||||
| 
 | 
 | ||||||
|  | #include    "parameters.h" | ||||||
| #include	"LLlex.h" | #include	"LLlex.h" | ||||||
| #include	"def.h" | #include	"def.h" | ||||||
| #include	"idf.h" | #include	"idf.h" | ||||||
|  | @ -12,7 +13,6 @@ | ||||||
| #include	"node.h" | #include	"node.h" | ||||||
| #include	"scope.h" | #include	"scope.h" | ||||||
| #include	"type.h" | #include	"type.h" | ||||||
| #include	"dbsymtab.h" |  | ||||||
| 
 | 
 | ||||||
| extern int	proclevel; | extern int	proclevel; | ||||||
| extern int	parlevel; | extern int	parlevel; | ||||||
|  |  | ||||||
|  | @ -5,8 +5,8 @@ | ||||||
| 	number of arguments! | 	number of arguments! | ||||||
| */ | */ | ||||||
| 
 | 
 | ||||||
|  | #include    "parameters.h" | ||||||
| #include	"debug.h" | #include	"debug.h" | ||||||
| #include	"errout.h" |  | ||||||
| 
 | 
 | ||||||
| #if __STDC__ | #if __STDC__ | ||||||
| #include	<stdarg.h> | #include	<stdarg.h> | ||||||
|  |  | ||||||
|  | @ -1,4 +1,5 @@ | ||||||
| /* I N S T A N T I A T I O N   O F   I D F   P A C K A G E */ | /* I N S T A N T I A T I O N   O F   I D F   P A C K A G E */ | ||||||
| 
 | 
 | ||||||
|  | #include    "parameters.h" | ||||||
| #include	"idf.h" | #include	"idf.h" | ||||||
| #include	<idf_pkg.body> | #include	<idf_pkg.body> | ||||||
|  |  | ||||||
|  | @ -3,6 +3,7 @@ | ||||||
| #include    <stdlib.h> | #include    <stdlib.h> | ||||||
| #include    <stdio.h> | #include    <stdio.h> | ||||||
| #include    <string.h> | #include    <string.h> | ||||||
|  | #include    "parameters.h" | ||||||
| #include	"f_info.h" | #include	"f_info.h" | ||||||
| struct f_info	file_info; | struct f_info	file_info; | ||||||
| #include	"input.h" | #include	"input.h" | ||||||
|  |  | ||||||
|  | @ -1,7 +1,5 @@ | ||||||
| /* I N S T A N T I A T I O N   O F   I N P U T   M O D U L E */ | /* I N S T A N T I A T I O N   O F   I N P U T   M O D U L E */ | ||||||
| 
 | 
 | ||||||
| #include	"inputtype.h" |  | ||||||
| 
 |  | ||||||
| #define INP_NPUSHBACK 3 | #define INP_NPUSHBACK 3 | ||||||
| #define INP_TYPE	struct f_info | #define INP_TYPE	struct f_info | ||||||
| #define INP_VAR		file_info | #define INP_VAR		file_info | ||||||
|  |  | ||||||
|  | @ -3,6 +3,7 @@ | ||||||
| #include	<alloc.h> | #include	<alloc.h> | ||||||
| #include	<em.h> | #include	<em.h> | ||||||
| 
 | 
 | ||||||
|  | #include    "parameters.h" | ||||||
| #include	"LLlex.h" | #include	"LLlex.h" | ||||||
| #include	"def.h" | #include	"def.h" | ||||||
| #include	"idf.h" | #include	"idf.h" | ||||||
|  |  | ||||||
|  | @ -5,6 +5,7 @@ | ||||||
| #include	<em_label.h> | #include	<em_label.h> | ||||||
| #include	<assert.h> | #include	<assert.h> | ||||||
| 
 | 
 | ||||||
|  | #include    "parameters.h" | ||||||
| #include	"LLlex.h" | #include	"LLlex.h" | ||||||
| #include	"def.h" | #include	"def.h" | ||||||
| #include	"idf.h" | #include	"idf.h" | ||||||
|  |  | ||||||
|  | @ -2,6 +2,7 @@ | ||||||
| 
 | 
 | ||||||
| #include    <stdlib.h> | #include    <stdlib.h> | ||||||
| #include    <string.h> | #include    <string.h> | ||||||
|  | #include    "parameters.h" | ||||||
| #include	"debug.h" | #include	"debug.h" | ||||||
| 
 | 
 | ||||||
| #include	<em.h> | #include	<em.h> | ||||||
|  | @ -23,7 +24,6 @@ | ||||||
| #include	"tokenname.h" | #include	"tokenname.h" | ||||||
| #include	"type.h" | #include	"type.h" | ||||||
| #include	"scope.h" | #include	"scope.h" | ||||||
| #include	"dbsymtab.h" |  | ||||||
| 
 | 
 | ||||||
| char		options[128]; | char		options[128]; | ||||||
| char		*ProgName; | char		*ProgName; | ||||||
|  |  | ||||||
|  | @ -1,3 +1,4 @@ | ||||||
|  | echo '#include "parameters.h"' | ||||||
| echo '#include "debug.h"' | echo '#include "debug.h"' | ||||||
| sed -n ' | sed -n ' | ||||||
| s:^.*[ 	]ALLOCDEF[ 	].*"\(.*\)".*$:struct \1 *h_\1 = 0;\ | s:^.*[ 	]ALLOCDEF[ 	].*"\(.*\)".*$:struct \1 *h_\1 = 0;\ | ||||||
|  |  | ||||||
|  | @ -5,6 +5,7 @@ | ||||||
| #include	<alloc.h> | #include	<alloc.h> | ||||||
| #include	<em.h> | #include	<em.h> | ||||||
| 
 | 
 | ||||||
|  | #include    "parameters.h" | ||||||
| #include	"LLlex.h" | #include	"LLlex.h" | ||||||
| #include	"f_info.h" | #include	"f_info.h" | ||||||
| #include	"idf.h" | #include	"idf.h" | ||||||
|  |  | ||||||
|  | @ -1,5 +1,6 @@ | ||||||
| /* N O D E   O F   A N   A B S T R A C T   P A R S E T R E E */ | /* N O D E   O F   A N   A B S T R A C T   P A R S E T R E E */ | ||||||
| 
 | 
 | ||||||
|  | #include    "parameters.h" | ||||||
| #include	"debug.h" | #include	"debug.h" | ||||||
| 
 | 
 | ||||||
| #include	<alloc.h> | #include	<alloc.h> | ||||||
|  |  | ||||||
|  | @ -3,13 +3,11 @@ | ||||||
| #include	<em_arith.h> | #include	<em_arith.h> | ||||||
| #include	<em_label.h> | #include	<em_label.h> | ||||||
| 
 | 
 | ||||||
|  | #include    "parameters.h" | ||||||
| #include	"class.h" | #include	"class.h" | ||||||
| #include	"const.h" | #include	"const.h" | ||||||
| #include	"idfsize.h" |  | ||||||
| #include	"main.h" | #include	"main.h" | ||||||
| #include	"type.h" | #include	"type.h" | ||||||
| #include	"nocross.h" |  | ||||||
| #include	"dbsymtab.h" |  | ||||||
| 
 | 
 | ||||||
| #define	MINIDFSIZE	9 | #define	MINIDFSIZE	9 | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1,6 +1,7 @@ | ||||||
| /* The grammar of ISO-Pascal as given by the specification, BS6192: 1982. */ | /* The grammar of ISO-Pascal as given by the specification, BS6192: 1982. */ | ||||||
| 
 | 
 | ||||||
| { | { | ||||||
|  | #include    "parameters.h" | ||||||
| #include	<alloc.h> | #include	<alloc.h> | ||||||
| #include	<em_arith.h> | #include	<em_arith.h> | ||||||
| #include	<em_label.h> | #include	<em_label.h> | ||||||
|  | @ -14,7 +15,6 @@ | ||||||
| #include	"main.h" | #include	"main.h" | ||||||
| #include	"node.h" | #include	"node.h" | ||||||
| #include	"scope.h" | #include	"scope.h" | ||||||
| #include	"dbsymtab.h" |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| %lexical LLlex; | %lexical LLlex; | ||||||
|  |  | ||||||
|  | @ -1,3 +1,4 @@ | ||||||
|  | #include    "parameters.h" | ||||||
| #include	"debug.h" | #include	"debug.h" | ||||||
| 
 | 
 | ||||||
| #include	<em.h> | #include	<em.h> | ||||||
|  |  | ||||||
|  | @ -1,5 +1,6 @@ | ||||||
| /* R E A D ( L N )   &   W R I T E ( L N ) */ | /* R E A D ( L N )   &   W R I T E ( L N ) */ | ||||||
| 
 | 
 | ||||||
|  | #include    "parameters.h" | ||||||
| #include	"debug.h" | #include	"debug.h" | ||||||
| 
 | 
 | ||||||
| #include	<assert.h> | #include	<assert.h> | ||||||
|  |  | ||||||
|  | @ -1,5 +1,6 @@ | ||||||
| /* S C O P E   M E C H A N I S M */ | /* S C O P E   M E C H A N I S M */ | ||||||
| 
 | 
 | ||||||
|  | #include    "parameters.h" | ||||||
| #include	"debug.h" | #include	"debug.h" | ||||||
| 
 | 
 | ||||||
| #include	<alloc.h> | #include	<alloc.h> | ||||||
|  |  | ||||||
|  | @ -9,7 +9,7 @@ | ||||||
| 
 | 
 | ||||||
| /* $Id$ */ | /* $Id$ */ | ||||||
| 
 | 
 | ||||||
| #include	"dbsymtab.h" | #include    "parameters.h" | ||||||
| 
 | 
 | ||||||
| #ifdef	DBSYMTAB | #ifdef	DBSYMTAB | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1,5 +1,6 @@ | ||||||
| /* S T A T E M E N T S */ | /* S T A T E M E N T S */ | ||||||
| { | { | ||||||
|  | #include    "parameters.h" | ||||||
| #include	<alloc.h> | #include	<alloc.h> | ||||||
| #include	<em.h> | #include	<em.h> | ||||||
| #include	<stb.h> | #include	<stb.h> | ||||||
|  | @ -15,7 +16,6 @@ | ||||||
| #include	"node.h" | #include	"node.h" | ||||||
| #include	"scope.h" | #include	"scope.h" | ||||||
| #include	"type.h" | #include	"type.h" | ||||||
| #include	"dbsymtab.h" |  | ||||||
| 
 | 
 | ||||||
| int slevel = 0;		/* nesting level of statements */ | int slevel = 0;		/* nesting level of statements */ | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -1,5 +1,6 @@ | ||||||
| /* T O K E N   D E F I N I T I O N S */ | /* T O K E N   D E F I N I T I O N S */ | ||||||
| 
 | 
 | ||||||
|  | #include    "parameters.h" | ||||||
| #include	"Lpars.h" | #include	"Lpars.h" | ||||||
| #include	"idf.h" | #include	"idf.h" | ||||||
| #include	"tokenname.h" | #include	"tokenname.h" | ||||||
|  |  | ||||||
|  | @ -1,7 +1,5 @@ | ||||||
| /* T Y P E   D E S C R I P T O R   S T R U C T U R E */ | /* T Y P E   D E S C R I P T O R   S T R U C T U R E */ | ||||||
| 
 | 
 | ||||||
| #include "dbsymtab.h" |  | ||||||
| 
 |  | ||||||
| struct paramlist {		/* structure for parameterlist of a PROCEDURE */ | struct paramlist {		/* structure for parameterlist of a PROCEDURE */ | ||||||
| 	struct paramlist *next; | 	struct paramlist *next; | ||||||
| 	struct def *par_def;	/* "df" of parameter */ | 	struct def *par_def;	/* "df" of parameter */ | ||||||
|  | @ -131,7 +129,6 @@ extern struct type | ||||||
| 	*void_type, | 	*void_type, | ||||||
| 	*error_type;		/* All from type.c */ | 	*error_type;		/* All from type.c */ | ||||||
| 
 | 
 | ||||||
| #include "nocross.h" |  | ||||||
| #ifdef NOCROSS | #ifdef NOCROSS | ||||||
| #include "target_sizes.h" | #include "target_sizes.h" | ||||||
| #define	word_align	(AL_WORD) | #define	word_align	(AL_WORD) | ||||||
|  |  | ||||||
|  | @ -1,5 +1,6 @@ | ||||||
| /*	T Y P E   D E F I N I T I O N   M E C H A N I S M	 */ | /*	T Y P E   D E F I N I T I O N   M E C H A N I S M	 */ | ||||||
| 
 | 
 | ||||||
|  | #include    "parameters.h" | ||||||
| #include	"debug.h" | #include	"debug.h" | ||||||
| 
 | 
 | ||||||
| #include	<alloc.h> | #include	<alloc.h> | ||||||
|  | @ -18,7 +19,6 @@ | ||||||
| #include	"type.h" | #include	"type.h" | ||||||
| 
 | 
 | ||||||
| #ifndef NOCROSS | #ifndef NOCROSS | ||||||
| #include	"target_sizes.h" |  | ||||||
| int | int | ||||||
| 	word_align	= AL_WORD, | 	word_align	= AL_WORD, | ||||||
| 	int_align	= AL_INT, | 	int_align	= AL_INT, | ||||||
|  |  | ||||||
|  | @ -3,6 +3,7 @@ | ||||||
| /*	Routines for testing type equivalence & type compatibility.
 | /*	Routines for testing type equivalence & type compatibility.
 | ||||||
| */ | */ | ||||||
| 
 | 
 | ||||||
|  | #include    "parameters.h" | ||||||
| #include	"debug.h" | #include	"debug.h" | ||||||
| 
 | 
 | ||||||
| #include	<assert.h> | #include	<assert.h> | ||||||
|  |  | ||||||
							
								
								
									
										92
									
								
								lang/pc/libpc/build.mk
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										92
									
								
								lang/pc/libpc/build.mk
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,92 @@ | ||||||
|  | define build-runtime-libpascal-impl | ||||||
|  | 
 | ||||||
|  | $(call reset) | ||||||
|  | $(eval objdir := $(PLATFORM)) | ||||||
|  | 
 | ||||||
|  | $(call ackfile, lang/pc/libpc/abi.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/abl.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/abr.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/arg.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/ass.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/asz.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/atn.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/bcp.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/bts.e) | ||||||
|  | $(call ackfile, lang/pc/libpc/buff.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/catch.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/clock.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/cls.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/cvt.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/diag.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/dis.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/efl.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/eln.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/encaps.e) | ||||||
|  | $(call ackfile, lang/pc/libpc/exp.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/fef.e) | ||||||
|  | $(call ackfile, lang/pc/libpc/fif.e) | ||||||
|  | $(call ackfile, lang/pc/libpc/get.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/gto.e) | ||||||
|  | $(call ackfile, lang/pc/libpc/hlt.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/hol0.e) | ||||||
|  | $(call ackfile, lang/pc/libpc/incpt.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/ini.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/log.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/mdi.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/mdl.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/new.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/nfa.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/nobuff.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/notext.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/opn.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/outcpt.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/pac.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/pclose.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/pcreat.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/pentry.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/perrno.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/pexit.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/popen.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/put.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/rcka.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/rdc.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/rdi.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/rdl.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/rdr.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/rf.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/rln.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/rnd.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/sav.e) | ||||||
|  | $(call ackfile, lang/pc/libpc/sig.e) | ||||||
|  | $(call ackfile, lang/pc/libpc/sin.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/sqt.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/string.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/trap.e) | ||||||
|  | $(call ackfile, lang/pc/libpc/trp.e) | ||||||
|  | $(call ackfile, lang/pc/libpc/unp.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/uread.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/uwrite.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/wdw.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/wf.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/wrc.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/wrf.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/wri.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/wrl.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/wrr.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/wrs.c) | ||||||
|  | $(call ackfile, lang/pc/libpc/wrz.c) | ||||||
|  | 
 | ||||||
|  | $(call acklibrary, $(LIBDIR)/$(PLATFORM)/libpascal.a) | ||||||
|  | $(call installto, $(PLATIND)/$(PLATFORM)/libpascal.a) | ||||||
|  | 
 | ||||||
|  | $(call reset) | ||||||
|  | $(eval objdir := $(PLATFORM)) | ||||||
|  | $(call ackfile, lang/pc/libpc/head_pc.e) | ||||||
|  | $(call installto, $(PLATIND)/$(PLATFORM)/pascal.o) | ||||||
|  | 
 | ||||||
|  | endef | ||||||
|  | 
 | ||||||
|  | build-runtime-libpascal = $(eval $(build-runtime-libpascal-impl)) | ||||||
|  | 
 | ||||||
|  | $(eval RUNTIMES += libpascal) | ||||||
|  | 
 | ||||||
|  | @ -60,6 +60,9 @@ define build-em_code-impl | ||||||
| 	$(call cfile, $D/em.c) | 	$(call cfile, $D/em.c) | ||||||
| 
 | 
 | ||||||
| 	$(eval $q: $(INCDIR)/em_codeEK.h) | 	$(eval $q: $(INCDIR)/em_codeEK.h) | ||||||
|  | 	$(eval $q: $(INCDIR)/em_path.h) | ||||||
|  | 	$(eval $q: $(INCDIR)/system.h) | ||||||
|  | 	$(eval $q: $(INCDIR)/local.h) | ||||||
| 
 | 
 | ||||||
| 	$(call clibrary, $(LIBDIR)/libem$2.a) | 	$(call clibrary, $(LIBDIR)/libem$2.a) | ||||||
| 	$(eval LIBEM$1 := $o) | 	$(eval LIBEM$1 := $o) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue