diff --git a/first/ackbuilder.lua b/first/ackbuilder.lua index c1c19370a..d5f6595e9 100644 --- a/first/ackbuilder.lua +++ b/first/ackbuilder.lua @@ -7,7 +7,6 @@ -- is = { set of rule types which made the target } -- } -local posix = require("posix") local emitter = {} local rules = {} local targets = {} @@ -125,7 +124,7 @@ local function concatpath(...) end -- Returns a list of the targets within the given collection; the keys of any --- keyed items are lost. Lists and wildcards are expanded. +-- keyed items are lost. Lists are expanded. local function targetsof(...) local o = {} @@ -226,9 +225,6 @@ local function abspath(...) return dotocollection({...}, function(filename) assertString(filename, 1) - if not filename:find("^[/$]") then - filename = concatpath(posix.getcwd(), filename) - end return filename end ) @@ -397,13 +393,17 @@ end local function loadbuildfilefor(filepart, targetpart) local normalname = concatpath(filepart, "/build.lua") - if posix.access(normalname, "r") then + local fp = io.open(normalname, "r") + if fp then + fp:close() loadbuildfile(normalname) return end local extendedname = concatpath(filepart, "/build-"..targetpart..".lua") - if posix.access(extendedname, "r") then + fp = io.open(extendedname, "r") + if fp then + fp:close() loadbuildfile(extendedname) return end @@ -420,10 +420,7 @@ loadtarget = function(targetname) if not targetname:find("%+") then local files if targetname:find("[?*]") then - files = posix.glob(targetname) - if not files then - files = {} - end + error("wildcards not supported") else files = {targetname} end @@ -819,8 +816,6 @@ local function parse_arguments(argmap, arg) end globals = { - posix = posix, - abspath = abspath, asstring = asstring, basename = basename, diff --git a/h/build.lua b/h/build.lua index ad677aacf..4163e8249 100644 --- a/h/build.lua +++ b/h/build.lua @@ -23,7 +23,23 @@ normalrule { clibrary { name = "emheaders", hdrs = { - "./*.h", + "./arch.h", + "./as_spec.h", + "./cgg_cg.h", + "./cg_pattern.h", + "./em_abs.h", + "./em_ego.h", + "./em_flag.h", + "./em_mes.h", + "./em_ptyp.h", + "./em_reg.h", + "./ip_spec.h", + "./ocm_chan.h", + "./ocm_parco.h", + "./ocm_proc.h", + "./out.h", + "./ranlib.h", + "./stb.h", "./con_float", "+em_path", "+local", diff --git a/lang/b/compiler/build.lua b/lang/b/compiler/build.lua index c647f6036..a195b7fdd 100644 --- a/lang/b/compiler/build.lua +++ b/lang/b/compiler/build.lua @@ -2,10 +2,11 @@ cprogram { name = "em_b", srcs = { - "./*.c", + "./b0.c", + "./b1.c", }, deps = { - "./*.h", + "./b.h", "modules+headers", "modules/src/alloc+lib", "modules/src/data+lib", diff --git a/lang/b/lib/build.lua b/lang/b/lib/build.lua index 62ae88966..d778fe092 100644 --- a/lang/b/lib/build.lua +++ b/lang/b/lib/build.lua @@ -4,12 +4,12 @@ for _, plat in ipairs(vars.plats) do acklibrary { name = "lib_"..plat, srcs = { - "./*.c", - "./*.e", + "./init.c", + "./main.c", }, hdrs = {}, -- must be empty deps = { - "./*.h", + "./b.h", "h+emheaders", "lang/cem/libcc.ansi/headers+pkg", "plat/"..plat.."/include+pkg", diff --git a/lang/basic/lib/build.lua b/lang/basic/lib/build.lua index f99ebfed3..d48879f75 100644 --- a/lang/basic/lib/build.lua +++ b/lang/basic/lib/build.lua @@ -4,15 +4,47 @@ for _, plat in ipairs(vars.plats) do acklibrary { name = "lib_"..plat, srcs = { - "./*.c", - "./*.e", + "./abs.c", + "./asc.c", + "./asrt.c", + "./atn.c", + "./chr.c", + "./conversion.c", + "./error.c", + "./exp.c", + "./file.c", + "./hlt.c", + "./io.c", + "./log.c", + "./mki.c", + "./oct.c", + "./peek.c", + "./power.c", + "./print.c", + "./random.c", + "./read.c", + "./return.c", + "./salloc.c", + "./sgn.c", + "./sin.c", + "./sqt.c", + "./stop.c", + "./string.c", + "./swap.c", + "./trace.c", + "./trap.c", + "./write.c", + "./fef.e", + "./fif.e", + "./setline.e", }, hdrs = {}, -- must be empty deps = { "h+emheaders", "lang/cem/libcc.ansi/headers+pkg", "plat/"..plat.."/include+pkg", - "./*.h", + "./bc_io.h", + "./lib.h", }, vars = { plat = plat } } diff --git a/lang/basic/src/build.lua b/lang/basic/src/build.lua index 26e3074de..c02e9621e 100644 --- a/lang/basic/src/build.lua +++ b/lang/basic/src/build.lua @@ -2,7 +2,7 @@ include("util/LLgen/build.lua") llgen { name = "llgen", - srcs = { "./*.g" } + srcs = { "./basic.g" } } normalrule { @@ -21,11 +21,29 @@ normalrule { cprogram { name = "em_bem", srcs = { - "./*.c", + "./bem.c", + "./compile.c", + "./eval.c", + "./func.c", + "./gencode.c", + "./graph.c", + "./initialize.c", + "./parsepar.c", + "./symbols.c", + "./util.c", matching(filenamesof("+llgen"), "%.c$"), }, deps = { - "./*.h", + "./bem.h", + "./eval.h", + "./func.h", + "./gencode.h", + "./graph.h", + "./llmess.h", + "./parsepar.h", + "./symbols.h", + "./util.h", + "./yylexp.h", "+llgen", "+tokentab_h", "h+emheaders", diff --git a/lang/cem/cemcom.ansi/build.lua b/lang/cem/cemcom.ansi/build.lua index 8d9f0d6c0..51554e728 100644 --- a/lang/cem/cemcom.ansi/build.lua +++ b/lang/cem/cemcom.ansi/build.lua @@ -13,11 +13,34 @@ normalrule { } } -local str_files = basename(filenamesof("./*.str")) +local str_files = { + "./code.str", + "./declar.str", + "./def.str", + "./estack.str", + "./expr.str", + "./field.str", + "./idf.str", + "./l_brace.str", + "./l_outdef.str", + "./l_state.str", + "./macro.str", + "./next.str", + "./proto.str", + "./stack.str", + "./stmt.str", + "./struct.str", + "./switch.str", + "./type.str", + "./util.str" +} + +local str_bases = basename(filenamesof(str_files)) + local str_targets = {} -for _, f in ipairs(str_files) do - local bf = f:gsub("%.str$", "") +for _, f in ipairs(str_bases) do + local bf = f:gsub("%.str$", ""):gsub("^$./", "") str_targets[#str_targets+1] = normalrule { name = "allocd_header/"..bf, ins = { "./make.allocd", "./"..f }, @@ -32,7 +55,7 @@ normalrule { name = "next-c", ins = { "./make.next", - "./*.str", + str_files }, outleaves = { "next.c" }, commands = { @@ -78,7 +101,11 @@ llgen { name = "llgen", srcs = { "+tokenfile-g", -- must be first - "./*.g", + "./declar.g", + "./expression.g", + "./ival.g", + "./program.g", + "./statement.g", }, } diff --git a/lang/cem/cpp.ansi/build.lua b/lang/cem/cpp.ansi/build.lua index 66f1eae84..0ce67c5c7 100644 --- a/lang/cem/cpp.ansi/build.lua +++ b/lang/cem/cpp.ansi/build.lua @@ -58,7 +58,8 @@ normalrule { name = "next_c", ins = { "./make.next", - "./*.str", + "./macro.str", + "./replace.str", }, outleaves = { "next.c" }, commands = { @@ -82,7 +83,22 @@ tabgen { cprogram { name = "cpp", srcs = concat( - "./*.c", + "./ch3bin.c", + "./ch3mon.c", + "./domacro.c", + "./error.c", + "./expr.c", + "./idf.c", + "./init.c", + "./input.c", + "./LLlex.c", + "./LLmessage.c", + "./main.c", + "./options.c", + "./preprocess.c", + "./replace.c", + "./skip.c", + "./tokenname.c", matching(filenamesof(llgen), "%.c$"), "+next_c", "+symbol2str_c", diff --git a/lang/cem/libcc.ansi/build.lua b/lang/cem/libcc.ansi/build.lua index 29c85b351..7b38d82e5 100644 --- a/lang/cem/libcc.ansi/build.lua +++ b/lang/cem/libcc.ansi/build.lua @@ -33,24 +33,163 @@ for _, plat in ipairs(vars.plats) do srcs = { "+ctype_files", "+ctype_tab", - "./core/ctype/*.c", - "./core/errno/*.c", - "./core/locale/*.c", - "./core/math/*.c", - "./core/math/*.e", - "./core/misc/*.c", - "./core/printf/*.c", - "./core/scanf/*.c", - "./core/setjmp/*.c", - "./core/setjmp/*.e", - "./core/stdlib/*.c", - "./core/stdio/*.c", - "./core/string/*.c", - "./core/time/*.c", - "./sys/exit/*.c", - "./sys/malloc/*.c", - "./sys/misc/*.c", - "./sys/stdio/*.c", + "./core/ctype/tolower.c", + "./core/ctype/toupper.c", + "./core/errno/errlist.c", + "./core/errno/perror.c", + "./core/errno/strerror.c", + "./core/locale/localeconv.c", + "./core/locale/setlocale.c", + "./core/math/asin.c", + "./core/math/atan2.c", + "./core/math/atan.c", + "./core/math/ceil.c", + "./core/math/exp.c", + "./core/math/fabs.c", + "./core/math/floor.c", + "./core/math/fmod.c", + "./core/math/frexp.e", + "./core/math/hugeval.c", + "./core/math/hypot.c", + "./core/math/isnan.c", + "./core/math/ldexp.c", + "./core/math/log10.c", + "./core/math/log.c", + "./core/math/modf.e", + "./core/math/pow.c", + "./core/math/sin.c", + "./core/math/sinh.c", + "./core/math/sqrt.c", + "./core/math/tan.c", + "./core/math/tanh.c", + "./core/misc/abort.c", + "./core/misc/assert.c", + "./core/misc/getopt.c", + "./core/misc/raise.c", + "./core/misc/termcap.c", + "./core/printf/doprnt.c", + "./core/printf/fltpr.c", + "./core/printf/fprintf.c", + "./core/printf/icompute.c", + "./core/printf/itoa.c", + "./core/printf/printf.c", + "./core/printf/snprintf.c", + "./core/printf/sprintf.c", + "./core/printf/vfprintf.c", + "./core/printf/vprintf.c", + "./core/printf/vsnprintf.c", + "./core/printf/vsprintf.c", + "./core/scanf/doscan.c", + "./core/scanf/fscanf.c", + "./core/scanf/scanf.c", + "./core/scanf/sscanf.c", + "./core/scanf/vfscanf.c", + "./core/setjmp/setjmp.e", + "./core/setjmp/sigmisc.c", + "./core/stdio/clearerr.c", + "./core/stdio/feof.c", + "./core/stdio/ferror.c", + "./core/stdio/fgetc.c", + "./core/stdio/fgetpos.c", + "./core/stdio/fgets.c", + "./core/stdio/fputc.c", + "./core/stdio/fputs.c", + "./core/stdio/fread.c", + "./core/stdio/fsetpos.c", + "./core/stdio/fwrite.c", + "./core/stdio/getc.c", + "./core/stdio/getchar.c", + "./core/stdio/gets.c", + "./core/stdio/getw.c", + "./core/stdio/putc.c", + "./core/stdio/putchar.c", + "./core/stdio/puts.c", + "./core/stdio/putw.c", + "./core/stdio/rewind.c", + "./core/stdlib/abs.c", + "./core/stdlib/atof.c", + "./core/stdlib/atoi.c", + "./core/stdlib/atol.c", + "./core/stdlib/bsearch.c", + "./core/stdlib/div.c", + "./core/stdlib/ecvt.c", + "./core/stdlib/environ.c", + "./core/stdlib/ext_comp.c", + "./core/stdlib/getenv.c", + "./core/stdlib/labs.c", + "./core/stdlib/ldiv.c", + "./core/stdlib/mblen.c", + "./core/stdlib/mbstowcs.c", + "./core/stdlib/mbtowc.c", + "./core/stdlib/putenv.c", + "./core/stdlib/qsort.c", + "./core/stdlib/rand.c", + "./core/stdlib/setenv.c", + "./core/stdlib/strtod.c", + "./core/stdlib/strtol.c", + "./core/stdlib/wcstombs.c", + "./core/stdlib/wctomb.c", + "./core/string/memchr.c", + "./core/string/memcmp.c", + "./core/string/memcpy.c", + "./core/string/memmove.c", + "./core/string/memset.c", + "./core/string/strcat.c", + "./core/string/strchr.c", + "./core/string/strcmp.c", + "./core/string/strcoll.c", + "./core/string/strcpy.c", + "./core/string/strcspn.c", + "./core/string/strdup.c", + "./core/string/strlen.c", + "./core/string/strncat.c", + "./core/string/strncmp.c", + "./core/string/strncpy.c", + "./core/string/strpbrk.c", + "./core/string/strrchr.c", + "./core/string/strspn.c", + "./core/string/strstr.c", + "./core/string/strtok.c", + "./core/string/strxfrm.c", + "./core/time/asctime.c", + "./core/time/ctime.c", + "./core/time/difftime.c", + "./core/time/gmtime.c", + "./core/time/localtime.c", + "./core/time/misc.c", + "./core/time/mktime.c", + "./core/time/strftime.c", + "./core/time/tzset.c", + "./sys/exit/atexit.c", + "./sys/exit/exit.c", + "./sys/malloc/calloc.c", + "./sys/malloc/malloc.c", + "./sys/malloc/realloc.c", + "./sys/misc/clock.c", + "./sys/misc/getpass.c", + "./sys/misc/isatty.c", + "./sys/misc/mktemp.c", + "./sys/misc/popen.c", + "./sys/misc/remove.c", + "./sys/misc/sleep.c", + "./sys/misc/system.c", + "./sys/misc/time.c", + "./sys/stdio/data.c", + "./sys/stdio/fclose.c", + "./sys/stdio/fdopen.c", + "./sys/stdio/fflush.c", + "./sys/stdio/fileno.c", + "./sys/stdio/fillbuf.c", + "./sys/stdio/flushbuf.c", + "./sys/stdio/fopen.c", + "./sys/stdio/freopen.c", + "./sys/stdio/fseek.c", + "./sys/stdio/ftell.c", + "./sys/stdio/setbuf.c", + "./sys/stdio/setvbuf.c", + "./sys/stdio/tmpfile.c", + "./sys/stdio/tmpnam.c", + "./sys/stdio/ungetc.c", }, hdrs = {}, -- must be empty deps = { diff --git a/lang/cem/libcc.ansi/headers/build.lua b/lang/cem/libcc.ansi/headers/build.lua index 57e4c12ee..99c4162eb 100644 --- a/lang/cem/libcc.ansi/headers/build.lua +++ b/lang/cem/libcc.ansi/headers/build.lua @@ -11,9 +11,38 @@ local function addheader(dir, list) end end -addheader("", filenamesof("./*.h")) -addheader("sys/", filenamesof("./sys/*.h")) -addheader("ack/", filenamesof("./ack/*.h")) +addheader("", filenamesof( + "./assert.h", + "./ctype.h", + "./errno.h", + "./fcntl.h", + "./float.h", + "./iso646.h", + "./limits.h", + "./locale.h", + "./math.h", + "./setjmp.h", + "./signal.h", + "./stdarg.h", + "./stdbool.h", + "./stddef.h", + "./stdint.h", + "./stdio.h", + "./stdlib.h", + "./string.h", + "./time.h", + "./unistd.h" + )) + +addheader("sys/", filenamesof( + "./sys/time.h", + "./sys/times.h" + )) + +addheader("ack/", filenamesof( + "./ack/config.h", + "./ack/emufile.h" + )) acklibrary { name = "headers", diff --git a/lang/m2/comp/build.lua b/lang/m2/comp/build.lua index 0c60ffbab..20dc433d9 100644 --- a/lang/m2/comp/build.lua +++ b/lang/m2/comp/build.lua @@ -15,7 +15,10 @@ llgen { srcs = { -- order here is important "+tokenfile_g", - "./*.g", + "./declar.g", + "./expression.g", + "./program.g", + "./statement.g", } } @@ -31,7 +34,14 @@ normalrule { } } -for _, f in ipairs(filenamesof("./*.xh")) do +local xh_files = { + "./def.xh", + "./node.xh", + "./real.xh", + "./type.xh", +} + +for _, f in ipairs(filenamesof(xh_files)) do local name = replace(basename(f), "%.xh$", "") normalrule { name = name.."_h", @@ -46,7 +56,13 @@ for _, f in ipairs(filenamesof("./*.xh")) do } end -for _, f in ipairs(filenamesof("./*.xc")) do +local xc_files = { + "./casestat.xc", + "./scope.xc", + "./tmpvar.xc", +} + +for _, f in ipairs(filenamesof(xc_files)) do local name = replace(basename(f), "%.xc$", "") normalrule { name = name.."_c", @@ -65,8 +81,8 @@ normalrule { name = "next_c", ins = { "./make.next", - "./*.xh", - "./*.xc", + xh_files, + xc_files }, outleaves = { "next.c" }, commands = { @@ -94,7 +110,28 @@ tabgen { cprogram { name = "em_m2", srcs = { - "./*.c", + "./chk_expr.c", + "./code.c", + "./cstoper.c", + "./def.c", + "./defmodule.c", + "./desig.c", + "./enter.c", + "./error.c", + "./idf.c", + "./input.c", + "./LLlex.c", + "./LLmessage.c", + "./lookup.c", + "./main.c", + "./misc.c", + "./node.c", + "./options.c", + "./stab.c", + "./tokenname.c", + "./type.c", + "./typequiv.c", + "./walk.c", "+casestat_c", "+next_c", "+scope_c", diff --git a/lang/m2/include/build.lua b/lang/m2/include/build.lua index 24f43084a..096e9441c 100644 --- a/lang/m2/include/build.lua +++ b/lang/m2/include/build.lua @@ -1,4 +1,7 @@ clibrary { name = "headers", - hdrs = {"./*.h"} + hdrs = { + "./libm2.h", + "./m2_traps.h", + } } diff --git a/lang/m2/libm2/build.lua b/lang/m2/libm2/build.lua index 2efe707ae..90bad0f4c 100644 --- a/lang/m2/libm2/build.lua +++ b/lang/m2/libm2/build.lua @@ -9,7 +9,34 @@ local function addheader(dir, list) end end -addheader("", filenamesof("./*.def")) +addheader("", filenamesof( + "./Arguments.def", + "./ArraySort.def", + "./ASCII.def", + "./Conversions.def", + "./CSP.def", + "./EM.def", + "./Epilogue.def", + "./InOut.def", + "./MathLib0.def", + "./Mathlib.def", + "./PascalIO.def", + "./Processes.def", + "./random.def", + "./RealConversions.def", + "./RealInOut.def", + "./Semaphores.def", + "./Storage.def", + "./Streams.def", + "./Strings.def", + "./StripUnix.def", + "./Termcap.def", + "./Terminal.def", + "./Traps.def", + "./Unix.def", + "./XXTermcap.def" + )) + installable { name = "headers", @@ -20,8 +47,47 @@ for _, plat in ipairs(vars.plats) do acklibrary { name = "lib_"..plat, srcs = { - "./*.c", - "./*.mod", + "./absd.c", + "./absi.c", + "./absl.c", + "./Arguments.c", + "./ArraySort.mod", + "./blockmove.c", + "./cap.c", + "./catch.c", + "./confarray.c", + "./Conversions.mod", + "./CSP.mod", + "./dvi.c", + "./halt.c", + "./init.c", + "./InOut.mod", + "./load.c", + "./MathLib0.mod", + "./Mathlib.mod", + "./PascalIO.mod", + "./Processes.mod", + "./random.mod", + "./rcka.c", + "./rcki.c", + "./rckil.c", + "./rcku.c", + "./rckul.c", + "./RealConversions.mod", + "./RealInOut.mod", + "./Semaphores.mod", + "./sigtrp.c", + "./stackprio.c", + "./Storage.mod", + "./store.c", + "./StrAss.c", + "./Streams.mod", + "./Strings.mod", + "./SYSTEM.c", + "./Termcap.mod", + "./Terminal.mod", + "./Traps.mod", + "./ucheck.c", "./EM.e", "./LtoUset.e", "./absf.e", diff --git a/lang/pc/comp/build.lua b/lang/pc/comp/build.lua index 740f88f43..2aff76538 100644 --- a/lang/pc/comp/build.lua +++ b/lang/pc/comp/build.lua @@ -15,7 +15,10 @@ llgen { srcs = { -- order here is important "+tokenfile_g", - "./*.g", + "./declar.g", + "./expression.g", + "./program.g", + "./statement.g", } } @@ -31,7 +34,15 @@ normalrule { } } -for _, f in ipairs(filenamesof("./*.xh")) do +local xh_files = { + "./def.xh", + "./desig.xh", + "./node.xh", + "./scope.xh", + "./type.xh", +} + +for _, f in ipairs(filenamesof(xh_files)) do local name = replace(basename(f), "%.xh$", "") normalrule { name = name.."_h", @@ -46,7 +57,12 @@ for _, f in ipairs(filenamesof("./*.xh")) do } end -for _, f in ipairs(filenamesof("./*.xc")) do +local xc_files = { + "./casestat.xc", + "./tmpvar.xc", +} + +for _, f in ipairs(filenamesof(xc_files)) do local name = replace(basename(f), "%.xc$", "") normalrule { name = name.."_c", @@ -65,8 +81,8 @@ normalrule { name = "next_c", ins = { "./make.next", - "./*.xh", - "./*.xc", + xh_files, + xc_files }, outleaves = { "next.c" }, commands = { @@ -94,7 +110,31 @@ tabgen { cprogram { name = "em_pc", srcs = { - "./*.c", + "./body.c", + "./chk_expr.c", + "./code.c", + "./cstoper.c", + "./def.c", + "./desig.c", + "./enter.c", + "./error.c", + "./idf.c", + "./input.c", + "./label.c", + "./LLlex.c", + "./LLmessage.c", + "./lookup.c", + "./main.c", + "./misc.c", + "./node.c", + "./options.c", + "./progs.c", + "./readwrite.c", + "./scope.c", + "./stab.c", + "./tokenname.c", + "./type.c", + "./typequiv.c", "+casestat_c", "+chartab_c", "+next_c", diff --git a/lang/pc/include/build.lua b/lang/pc/include/build.lua index 24f43084a..d4fac6203 100644 --- a/lang/pc/include/build.lua +++ b/lang/pc/include/build.lua @@ -1,4 +1,9 @@ clibrary { name = "headers", - hdrs = {"./*.h"} + hdrs = { + "./pc_err.h", + "./pc_file.h", + "./pc.h", + "./pc_math.h", + } } diff --git a/lang/pc/libpc/build.lua b/lang/pc/libpc/build.lua index 08c3ef187..42fe7a5c8 100644 --- a/lang/pc/libpc/build.lua +++ b/lang/pc/libpc/build.lua @@ -4,7 +4,66 @@ for _, plat in ipairs(vars.plats) do acklibrary { name = "lib_"..plat, srcs = { - "./*.c", + "./abi.c", + "./abl.c", + "./abr.c", + "./arg.c", + "./ass.c", + "./asz.c", + "./atn.c", + "./bcp.c", + "./buff.c", + "./catch.c", + "./cls.c", + "./cvt.c", + "./diag.c", + "./efl.c", + "./eln.c", + "./exp.c", + "./get.c", + "./hlt.c", + "./incpt.c", + "./ini.c", + "./log.c", + "./mdi.c", + "./mdl.c", + "./new.c", + "./nfa.c", + "./nobuff.c", + "./notext.c", + "./opn.c", + "./outcpt.c", + "./pac.c", + "./pclose.c", + "./pcreat.c", + "./pentry.c", + "./perrno.c", + "./pexit.c", + "./popen.c", + "./put.c", + "./rcka.c", + "./rdc.c", + "./rdi.c", + "./rdl.c", + "./rdr.c", + "./rf.c", + "./rln.c", + "./rnd.c", + "./sin.c", + "./sqt.c", + "./string.c", + "./unp.c", + "./uread.c", + "./uwrite.c", + "./wdw.c", + "./wf.c", + "./wrc.c", + "./wrf.c", + "./wri.c", + "./wrl.c", + "./wrr.c", + "./wrs.c", + "./wrz.c", "./bts.e", "./encaps.e", "./fef.e", diff --git a/mach/em22/libem/build.lua b/mach/em22/libem/build.lua index c786a6566..f7a23933b 100644 --- a/mach/em22/libem/build.lua +++ b/mach/em22/libem/build.lua @@ -1,7 +1,7 @@ for _, plat in ipairs(vars.plats) do acklibrary { name = "lib_"..plat, - srcs = { "./*.e" }, + srcs = { "./dummy.e", }, vars = { plat = plat }, } end diff --git a/mach/em22/libend/build.lua b/mach/em22/libend/build.lua index c786a6566..05ab3319d 100644 --- a/mach/em22/libend/build.lua +++ b/mach/em22/libend/build.lua @@ -1,7 +1,12 @@ for _, plat in ipairs(vars.plats) do acklibrary { name = "lib_"..plat, - srcs = { "./*.e" }, + srcs = { + "./edata.e", + "./em_end.e", + "./end.e", + "./etext.e", + }, vars = { plat = plat }, } end diff --git a/mach/i386/as/build.lua b/mach/i386/as/build.lua new file mode 100644 index 000000000..788b76863 --- /dev/null +++ b/mach/i386/as/build.lua @@ -0,0 +1,12 @@ +bundle { + name = "headers", + srcs = { + "./mach0.c", + "./mach1.c", + "./mach2.c", + "./mach3.c", + "./mach4.c", + "./mach5.c", + } +} + diff --git a/mach/i386/libem/build.lua b/mach/i386/libem/build.lua index 6d4322a9c..9dfe8b85b 100644 --- a/mach/i386/libem/build.lua +++ b/mach/i386/libem/build.lua @@ -1,7 +1,59 @@ for _, plat in ipairs(vars.plats) do acklibrary { name = "lib_"..plat, - srcs = { "./*.s" }, -- csb8.s + srcs = { + "./adi.s", + "./and.s", + "./blm.s", + "./cii.s", + "./cms.s", + "./com.s", + "./csa4.s", + "./csa8.s", + "./csb4.s", + "./csb8.s", + "./cuu.s", + "./divrem8.s", + "./dup.s", + "./dvi8.s", + "./dvi.s", + "./dvu8.s", + "./dvu.s", + "./error.s", + "./exg.s", + "./fat.s", + "./fp8087.s", + "./gto.s", + "./iaar.s", + "./ilar.s", + "./inn.s", + "./ior.s", + "./isar.s", + "./lar4.s", + "./loi.s", + "./mli8.s", + "./mli.s", + "./mon.s", + "./ngi.s", + "./nop.s", + "./print.s", + "./rck.s", + "./rmi8.s", + "./rmi.s", + "./rmu.s", + "./rol.s", + "./ror.s", + "./sar4.s", + "./sbi.s", + "./set.s", + "./sli.s", + "./sri.s", + "./sti.s", + "./strhp.s", + "./trp.s", + "./unknown.s", + "./xor.s", + }, vars = { plat = plat }, } end diff --git a/mach/i386/libend/build.lua b/mach/i386/libend/build.lua index ca5a13c65..bfbf21cd0 100644 --- a/mach/i386/libend/build.lua +++ b/mach/i386/libend/build.lua @@ -1,7 +1,12 @@ for _, plat in ipairs(vars.plats) do acklibrary { name = "lib_"..plat, - srcs = { "./*.s" }, + srcs = { + "./edata.s", + "./em_end.s", + "./end.s", + "./etext.s", + }, vars = { plat = plat }, } end diff --git a/mach/i386/ncg/build.lua b/mach/i386/ncg/build.lua new file mode 100644 index 000000000..cc47f9b7b --- /dev/null +++ b/mach/i386/ncg/build.lua @@ -0,0 +1,8 @@ +bundle { + name = "headers", + srcs = { + "./mach.c", + "./mach.h" + } +} + diff --git a/mach/i80/as/build.lua b/mach/i80/as/build.lua new file mode 100644 index 000000000..788b76863 --- /dev/null +++ b/mach/i80/as/build.lua @@ -0,0 +1,12 @@ +bundle { + name = "headers", + srcs = { + "./mach0.c", + "./mach1.c", + "./mach2.c", + "./mach3.c", + "./mach4.c", + "./mach5.c", + } +} + diff --git a/mach/i80/libem/build.lua b/mach/i80/libem/build.lua index 45a32ba94..f809b94f4 100644 --- a/mach/i80/libem/build.lua +++ b/mach/i80/libem/build.lua @@ -58,7 +58,52 @@ end for _, plat in ipairs(vars.plats) do acklibrary { name = "lib_"..plat, - srcs = concat("./*.s", generated), + srcs = { + "./aar2.s", + "./adi4.s", + "./and.s", + "./blm.s", + "./cii.s", + "./cmi4.s", + "./cmps_mag.s", + "./cmpu_mag.s", + "./cms.s", + "./com.s", + "./csa.s", + "./csb.s", + "./dup.s", + "./dvi2.s", + "./dvi4.s", + "./exg.s", + "./flp.s", + "./inn.s", + "./ior.s", + "./lar2.s", + "./loi.s", + "./mli2.s", + "./mli4.s", + "./mlu2.s", + "./ngi4.s", + "./nop.s", + "./pchl.s", + "./pro.s", + "./rck.s", + "./ret.s", + "./rol4.s", + "./ror4.s", + "./rst.s", + "./sar2.s", + "./sbi4.s", + "./set2.s", + "./set.s", + "./sli2.s", + "./sli4.s", + "./sri2.s", + "./sri4.s", + "./sti.s", + "./xor.s", + generated + }, vars = { plat = plat, ["+ackcflags"] = {"-Imach/i80/libem"} diff --git a/mach/i80/libend/build.lua b/mach/i80/libend/build.lua index ca5a13c65..bfbf21cd0 100644 --- a/mach/i80/libend/build.lua +++ b/mach/i80/libend/build.lua @@ -1,7 +1,12 @@ for _, plat in ipairs(vars.plats) do acklibrary { name = "lib_"..plat, - srcs = { "./*.s" }, + srcs = { + "./edata.s", + "./em_end.s", + "./end.s", + "./etext.s", + }, vars = { plat = plat }, } end diff --git a/mach/i80/ncg/build.lua b/mach/i80/ncg/build.lua new file mode 100644 index 000000000..cc47f9b7b --- /dev/null +++ b/mach/i80/ncg/build.lua @@ -0,0 +1,8 @@ +bundle { + name = "headers", + srcs = { + "./mach.c", + "./mach.h" + } +} + diff --git a/mach/i86/as/build.lua b/mach/i86/as/build.lua new file mode 100644 index 000000000..788b76863 --- /dev/null +++ b/mach/i86/as/build.lua @@ -0,0 +1,12 @@ +bundle { + name = "headers", + srcs = { + "./mach0.c", + "./mach1.c", + "./mach2.c", + "./mach3.c", + "./mach4.c", + "./mach5.c", + } +} + diff --git a/mach/i86/libem/build.lua b/mach/i86/libem/build.lua index ca5a13c65..db45ca763 100644 --- a/mach/i86/libem/build.lua +++ b/mach/i86/libem/build.lua @@ -1,7 +1,67 @@ for _, plat in ipairs(vars.plats) do acklibrary { name = "lib_"..plat, - srcs = { "./*.s" }, + srcs = { + "./adi.s", + "./and.s", + "./blm.s", + "./cii.s", + "./cmi4.s", + "./cms.s", + "./cmu4.s", + "./com.s", + "./csa2.s", + "./csa4.s", + "./csb2.s", + "./csb4.s", + "./cuu.s", + "./dup.s", + "./dvi4.s", + "./dvi.s", + "./dvu4.s", + "./dvu.s", + "./error.s", + "./exg.s", + "./fat.s", + "./fp8087.s", + "./gto.s", + "./iaar.s", + "./ilar.s", + "./inn.s", + "./ior.s", + "./isar.s", + "./lar2.s", + "./lfr6.s", + "./lfr8.s", + "./loi.s", + "./mli4.s", + "./mli.s", + "./mon.s", + "./ngi.s", + "./nop.s", + "./print.s", + "./rck.s", + "./ret6.s", + "./ret8.s", + "./retarea.s", + "./return.s", + "./rmi4.s", + "./rmi.s", + "./rmu4.s", + "./rmu.s", + "./rol.s", + "./ror.s", + "./sar2.s", + "./sbi.s", + "./set.s", + "./sli.s", + "./sri.s", + "./sti.s", + "./strhp.s", + "./trp.s", + "./unknown.s", + "./xor.s", + }, vars = { plat = plat }, } end diff --git a/mach/i86/libend/build.lua b/mach/i86/libend/build.lua index ca5a13c65..bfbf21cd0 100644 --- a/mach/i86/libend/build.lua +++ b/mach/i86/libend/build.lua @@ -1,7 +1,12 @@ for _, plat in ipairs(vars.plats) do acklibrary { name = "lib_"..plat, - srcs = { "./*.s" }, + srcs = { + "./edata.s", + "./em_end.s", + "./end.s", + "./etext.s", + }, vars = { plat = plat }, } end diff --git a/mach/i86/ncg/build.lua b/mach/i86/ncg/build.lua new file mode 100644 index 000000000..cc47f9b7b --- /dev/null +++ b/mach/i86/ncg/build.lua @@ -0,0 +1,8 @@ +bundle { + name = "headers", + srcs = { + "./mach.c", + "./mach.h" + } +} + diff --git a/mach/m68020/as/build.lua b/mach/m68020/as/build.lua new file mode 100644 index 000000000..788b76863 --- /dev/null +++ b/mach/m68020/as/build.lua @@ -0,0 +1,12 @@ +bundle { + name = "headers", + srcs = { + "./mach0.c", + "./mach1.c", + "./mach2.c", + "./mach3.c", + "./mach4.c", + "./mach5.c", + } +} + diff --git a/mach/m68020/libem/build.lua b/mach/m68020/libem/build.lua index c0356c61c..2c56f2a37 100644 --- a/mach/m68020/libem/build.lua +++ b/mach/m68020/libem/build.lua @@ -2,8 +2,37 @@ for _, plat in ipairs(vars.plats) do acklibrary { name = "lib_"..plat, srcs = { - "./*.s", -- csb8.s - "./*.c" + "./aar.s", + "./cii.s", + "./cmi.s", + "./cms.s", + "./cmu.s", + "./csa8.s", + "./csa.s", + "./csb8.s", + "./csb.s", + "./cuu.s", + "./cvf.s", + "./dia.s", + "./divrem8.s", + "./dvi8.s", + "./dvu8.s", + "./exg.s", + "./fat.s", + "./fp68881.s", + "./inn.s", + "./lar.s", + "./los.s", + "./mon.s", + "./nop.s", + "./rmi8.s", + "./rmu8.s", + "./sar.s", + "./set.s", + "./shp.s", + "./sts.s", + "./trp.s", + "./trpstr.c", }, vars = { plat = plat }, deps = { diff --git a/mach/m68020/libend/build.lua b/mach/m68020/libend/build.lua index ca5a13c65..bfbf21cd0 100644 --- a/mach/m68020/libend/build.lua +++ b/mach/m68020/libend/build.lua @@ -1,7 +1,12 @@ for _, plat in ipairs(vars.plats) do acklibrary { name = "lib_"..plat, - srcs = { "./*.s" }, + srcs = { + "./edata.s", + "./em_end.s", + "./end.s", + "./etext.s", + }, vars = { plat = plat }, } end diff --git a/mach/m68020/ncg/build.lua b/mach/m68020/ncg/build.lua new file mode 100644 index 000000000..35af754e4 --- /dev/null +++ b/mach/m68020/ncg/build.lua @@ -0,0 +1,9 @@ +bundle { + name = "headers", + srcs = { + "./mach.c", + "./mach.h", + "./whichone.h" + } +} + diff --git a/mach/mips/as/build.lua b/mach/mips/as/build.lua index 8732fdf14..d330957a0 100644 --- a/mach/mips/as/build.lua +++ b/mach/mips/as/build.lua @@ -4,3 +4,16 @@ normalrule { ins = {"./mktables.lua", "./instructions.dat"}, commands = {"$(LUA) %{ins[1]} %{outs} < %{ins[2]}"} } + +bundle { + name = "headers", + srcs = { + "./mach0.c", + "./mach1.c", + "./mach2.c", + "./mach3.c", + "./mach4.c", + "./mach5.c", + } +} + diff --git a/mach/mips/libem/build.lua b/mach/mips/libem/build.lua index 5ed9b52e8..9145f6730 100644 --- a/mach/mips/libem/build.lua +++ b/mach/mips/libem/build.lua @@ -6,7 +6,33 @@ for _, plat in ipairs(vars.plats) do acklibrary { name = "lib_"..plat, srcs = { - "./*.s", -- dus4.s + "./aar4.s", + "./and.s", + "./bls4.s", + "./cms.s", + "./compareul.s", + "./com.s", + "./csa.s", + "./csb.s", + "./c_ud_i.s", + "./c_uf_i.s", + "./c_ui_d.s", + "./c_ui_f.s", + "./dus4.s", + "./exg.s", + "./fef8.s", + "./fif8.s", + "./inn.s", + "./ior.s", + "./lar4.s", + "./los4.s", + "./rck.s", + "./sar4.s", + "./set.s", + "./sts4.s", + "./trp.s", + "./xor.s", + "./zer.s", }, vars = { plat = plat }, deps = { diff --git a/mach/mips/libend/build.lua b/mach/mips/libend/build.lua index ca5a13c65..bfbf21cd0 100644 --- a/mach/mips/libend/build.lua +++ b/mach/mips/libend/build.lua @@ -1,7 +1,12 @@ for _, plat in ipairs(vars.plats) do acklibrary { name = "lib_"..plat, - srcs = { "./*.s" }, + srcs = { + "./edata.s", + "./em_end.s", + "./end.s", + "./etext.s", + }, vars = { plat = plat }, } end diff --git a/mach/mips/mcg/build.lua b/mach/mips/mcg/build.lua new file mode 100644 index 000000000..ed2d2687c --- /dev/null +++ b/mach/mips/mcg/build.lua @@ -0,0 +1,7 @@ +bundle { + name = "headers", + srcs = { + "./platform.c", + } +} + diff --git a/mach/pdp/as/build.lua b/mach/pdp/as/build.lua new file mode 100644 index 000000000..788b76863 --- /dev/null +++ b/mach/pdp/as/build.lua @@ -0,0 +1,12 @@ +bundle { + name = "headers", + srcs = { + "./mach0.c", + "./mach1.c", + "./mach2.c", + "./mach3.c", + "./mach4.c", + "./mach5.c", + } +} + diff --git a/mach/pdp/cv/build.lua b/mach/pdp/cv/build.lua index 5ba9e5efa..58df93b43 100644 --- a/mach/pdp/cv/build.lua +++ b/mach/pdp/cv/build.lua @@ -1,6 +1,6 @@ cprogram { name = "cv", - srcs = { "./*.c" }, + srcs = { "./cv.c" }, deps = { "h+emheaders", "modules/src/object+lib", diff --git a/mach/pdp/libem/build.lua b/mach/pdp/libem/build.lua index ca5a13c65..e70ba80ce 100644 --- a/mach/pdp/libem/build.lua +++ b/mach/pdp/libem/build.lua @@ -1,7 +1,79 @@ for _, plat in ipairs(vars.plats) do acklibrary { name = "lib_"..plat, - srcs = { "./*.s" }, + srcs = { + "./aar.s", + "./adf.s", + "./adi.s", + "./and.s", + "./cff.s", + "./cfi.s", + "./cif.s", + "./cii.s", + "./ciu.s", + "./cmf.s", + "./cmi4.s", + "./cmi.s", + "./cms.s", + "./cmu4.s", + "./cmu.s", + "./csa.s", + "./csb.s", + "./dup.s", + "./dvf.s", + "./dvi4.s", + "./dvi.s", + "./dvu2.s", + "./dvu4.s", + "./dvu.s", + "./eret.s", + "./exg.s", + "./fef.s", + "./fif.s", + "./gto.s", + "./iaar.s", + "./ilar.s", + "./inn.s", + "./isar.s", + "./lar.s", + "./los2.s", + "./mlf.s", + "./mli4.s", + "./mli.s", + "./mlu4.s", + "./mlu.s", + "./mon.s", + "./ngf.s", + "./ngi.s", + "./nop.s", + "./prf.s", + "./printf.s", + "./rck.s", + "./ret.s", + "./rmi4.s", + "./rmi.s", + "./rmu2.s", + "./rmu4.s", + "./rmu.s", + "./rol.s", + "./ror.s", + "./RT.s", + "./sar.s", + "./save.s", + "./sbf.s", + "./sbi.s", + "./setfl.s", + "./set.s", + "./sim.s", + "./sli.s", + "./sri.s", + "./sru.s", + "./sto2.s", + "./strhp.s", + "./trp.s", + "./unknown.s", + "./xor.s", + }, vars = { plat = plat }, } end diff --git a/mach/pdp/libend/build.lua b/mach/pdp/libend/build.lua index ca5a13c65..bfbf21cd0 100644 --- a/mach/pdp/libend/build.lua +++ b/mach/pdp/libend/build.lua @@ -1,7 +1,12 @@ for _, plat in ipairs(vars.plats) do acklibrary { name = "lib_"..plat, - srcs = { "./*.s" }, + srcs = { + "./edata.s", + "./em_end.s", + "./end.s", + "./etext.s", + }, vars = { plat = plat }, } end diff --git a/mach/powerpc/as/build.lua b/mach/powerpc/as/build.lua new file mode 100644 index 000000000..788b76863 --- /dev/null +++ b/mach/powerpc/as/build.lua @@ -0,0 +1,12 @@ +bundle { + name = "headers", + srcs = { + "./mach0.c", + "./mach1.c", + "./mach2.c", + "./mach3.c", + "./mach4.c", + "./mach5.c", + } +} + diff --git a/mach/powerpc/libem/build.lua b/mach/powerpc/libem/build.lua index 5ed9b52e8..832f3cf59 100644 --- a/mach/powerpc/libem/build.lua +++ b/mach/powerpc/libem/build.lua @@ -6,7 +6,35 @@ for _, plat in ipairs(vars.plats) do acklibrary { name = "lib_"..plat, srcs = { - "./*.s", -- dus4.s + "./aar4.s", + "./and.s", + "./bls4.s", + "./cfi8.s", + "./cfu8.s", + "./cif8.s", + "./cms.s", + "./com.s", + "./csa.s", + "./csb.s", + "./cuf8.s", + -- "./dus4.s", + "./exg.s", + "./fd_00000000.s", + "./fef4.s", + "./fef8.s", + "./fif4.s", + "./fif8.s", + "./inn.s", + "./ior.s", + "./lar4.s", + "./los4.s", + "./rck.s", + "./sar4.s", + "./set.s", + "./sts4.s", + "./trp.s", + "./xor.s", + "./zer.s", }, vars = { plat = plat }, deps = { diff --git a/mach/powerpc/libend/build.lua b/mach/powerpc/libend/build.lua index ca5a13c65..bfbf21cd0 100644 --- a/mach/powerpc/libend/build.lua +++ b/mach/powerpc/libend/build.lua @@ -1,7 +1,12 @@ for _, plat in ipairs(vars.plats) do acklibrary { name = "lib_"..plat, - srcs = { "./*.s" }, + srcs = { + "./edata.s", + "./em_end.s", + "./end.s", + "./etext.s", + }, vars = { plat = plat }, } end diff --git a/mach/powerpc/mcg/build.lua b/mach/powerpc/mcg/build.lua new file mode 100644 index 000000000..ed2d2687c --- /dev/null +++ b/mach/powerpc/mcg/build.lua @@ -0,0 +1,7 @@ +bundle { + name = "headers", + srcs = { + "./platform.c", + } +} + diff --git a/mach/powerpc/ncg/build.lua b/mach/powerpc/ncg/build.lua new file mode 100644 index 000000000..cc47f9b7b --- /dev/null +++ b/mach/powerpc/ncg/build.lua @@ -0,0 +1,8 @@ +bundle { + name = "headers", + srcs = { + "./mach.c", + "./mach.h" + } +} + diff --git a/mach/proto/as/build.lua b/mach/proto/as/build.lua index d9718e06f..44178d9d0 100644 --- a/mach/proto/as/build.lua +++ b/mach/proto/as/build.lua @@ -11,10 +11,7 @@ definerule("build_as", local archlib = clibrary { name = e.name.."/archlib", srcs = {}, - hdrs = { - "mach/"..e.arch.."/as/mach*.c", - "mach/"..e.arch.."/as/*.h" - } + hdrs = { "mach/"..e.arch.."/as+headers" }, } local preprocessedy = cppfile { @@ -38,7 +35,12 @@ definerule("build_as", return cprogram { name = e.name, srcs = concat( - "mach/proto/as/*.c", + "mach/proto/as/comm3.c", + "mach/proto/as/comm4.c", + "mach/proto/as/comm5.c", + "mach/proto/as/comm6.c", + "mach/proto/as/comm7.c", + "mach/proto/as/comm8.c", matching(filenamesof(yaccfiles), "%.c$") ), deps = { diff --git a/mach/proto/cg/build.lua b/mach/proto/cg/build.lua index a754ebb4f..d9b0fb240 100644 --- a/mach/proto/cg/build.lua +++ b/mach/proto/cg/build.lua @@ -11,9 +11,24 @@ definerule("build_cg", name = e.name.."/headers", srcs = {}, hdrs = { - "mach/proto/cg/*.h", + "mach/proto/cg/assert.h", + "mach/proto/cg/codegen.h", + "mach/proto/cg/data.h", + "mach/proto/cg/equiv.h", + "mach/proto/cg/extern.h", + "mach/proto/cg/fillem.h", + "mach/proto/cg/gencode.h", + "mach/proto/cg/glosym.h", + "mach/proto/cg/param.h", + "mach/proto/cg/reg.h", + "mach/proto/cg/regvar.h", + "mach/proto/cg/result.h", + "mach/proto/cg/salloc.h", + "mach/proto/cg/state.h", + "mach/proto/cg/subr.h", + "mach/proto/cg/types.h", "mach/"..e.arch.."/cg/mach.c", - "mach/"..e.arch.."/cg/*.h", + "mach/"..e.arch.."/cg/mach.h", } } @@ -25,7 +40,21 @@ definerule("build_cg", return cprogram { name = e.name, srcs = { - "mach/proto/cg/*.c", + "mach/proto/cg/codegen.c", + "mach/proto/cg/compute.c", + "mach/proto/cg/equiv.c", + "mach/proto/cg/fillem.c", + "mach/proto/cg/gencode.c", + "mach/proto/cg/glosym.c", + "mach/proto/cg/main.c", + "mach/proto/cg/move.c", + "mach/proto/cg/nextem.c", + "mach/proto/cg/reg.c", + "mach/proto/cg/regvar.c", + "mach/proto/cg/salloc.c", + "mach/proto/cg/state.c", + "mach/proto/cg/subr.c", + "mach/proto/cg/var.c", matching(filenamesof(tables), "%.c$") }, deps = { diff --git a/mach/proto/fp/build.lua b/mach/proto/fp/build.lua index 3dd62d56d..db4bd7b59 100644 --- a/mach/proto/fp/build.lua +++ b/mach/proto/fp/build.lua @@ -3,10 +3,51 @@ include("plat/build.lua") -- For now, all floats are little-endian. local byte_order = "mach/i86/libfp/byte_order.h" +local srcs = { + "./adder.c", + "./add_ext.c", + "./adf4.c", + "./adf8.c", + "./cff4.c", + "./cff8.c", + "./cfi.c", + "./cfu.c", + "./cif4.c", + "./cif8.c", + "./cmf4.c", + "./cmf8.c", + "./compact.c", + "./cuf4.c", + "./cuf8.c", + "./div_ext.c", + "./dvf4.c", + "./dvf8.c", + "./extend.c", + "./fef4.c", + "./fef8.c", + "./fif4.c", + "./fif8.c", + "./fptrp.e", + "./mlf4.c", + "./mlf8.c", + "./mul_ext.c", + "./ngf4.c", + "./ngf8.c", + "./nrm_ext.c", + "./sbf4.c", + "./sbf8.c", + "./sft_ext.c", + "./shifter.c", + "./sub_ext.c", + "./zrf4.c", + "./zrf8.c", + "./zrf_ext.c", +} + -- For now, only cpm uses software floating-point. for _, plat in ipairs({"cpm"}) do local edits = {} - for _, src in fpairs("./*.c", "./*.e") do + for _, src in fpairs(srcs) do -- Compile each src file into assembly code. local n = basename(src):gsub("%.%w*$", "") @@ -14,7 +55,11 @@ for _, plat in ipairs({"cpm"}) do name = "s_"..plat.."/"..n, srcs = { src }, deps = { - "./*.h", + "./FP_bias.h", + "./FP_shift.h", + "./FP_trap.h", + "./FP_types.h", + "./get_put.h", byte_order, }, suffix = ".s", diff --git a/mach/proto/mcg/build.lua b/mach/proto/mcg/build.lua index 67c0645b5..b8a244034 100644 --- a/mach/proto/mcg/build.lua +++ b/mach/proto/mcg/build.lua @@ -11,8 +11,16 @@ definerule("build_mcg", name = e.name.."/headers", srcs = {}, hdrs = { - "mach/proto/mcg/*.h", - "mach/"..e.arch.."/mcg/*.h", + "mach/proto/mcg/basicblock.h", + "mach/proto/mcg/graph.h", + "mach/proto/mcg/hop.h", + "mach/proto/mcg/ir.h", + "mach/proto/mcg/mcgg_generated_footer.h", + "mach/proto/mcg/mcgg_generated_header.h", + "mach/proto/mcg/mcg.h", + "mach/proto/mcg/procedure.h", + "mach/proto/mcg/reg.h", + "mach/"..e.arch.."/mcg+headers", } } @@ -24,7 +32,33 @@ definerule("build_mcg", return cprogram { name = e.name, srcs = { - "mach/proto/mcg/*.c", + "mach/proto/mcg/basicblock.c", + "mach/proto/mcg/data.c", + "mach/proto/mcg/graph.c", + "mach/proto/mcg/hop.c", + "mach/proto/mcg/ir.c", + "mach/proto/mcg/main.c", + "mach/proto/mcg/parse_em.c", + "mach/proto/mcg/pass_convertstackops.c", + "mach/proto/mcg/pass_eliminatetrivialblocks.c", + "mach/proto/mcg/pass_groupirs.c", + "mach/proto/mcg/pass_instructionselection.c", + "mach/proto/mcg/pass_livevreganalysis.c", + "mach/proto/mcg/pass_lowerpushes.c", + "mach/proto/mcg/pass_phigroups.c", + "mach/proto/mcg/pass_prologueepilogue.c", + "mach/proto/mcg/pass_registerallocator.c", + "mach/proto/mcg/pass_removedeadblocks.c", + "mach/proto/mcg/pass_removedeadphis.c", + "mach/proto/mcg/pass_returnvalues.c", + "mach/proto/mcg/pass_splitcriticaledges.c", + "mach/proto/mcg/pass_ssa.c", + "mach/proto/mcg/pass_typeinference.c", + "mach/proto/mcg/predicates.c", + "mach/proto/mcg/procedure.c", + "mach/proto/mcg/reg.c", + "mach/proto/mcg/symbol.c", + "mach/proto/mcg/treebuilder.c", "mach/"..e.arch.."/mcg/platform.c", matching(filenamesof(tables), "%.c$") }, diff --git a/mach/proto/ncg/build.lua b/mach/proto/ncg/build.lua index 6ab573a8a..f8d42ba56 100644 --- a/mach/proto/ncg/build.lua +++ b/mach/proto/ncg/build.lua @@ -2,7 +2,7 @@ include("util/ncgg/build.lua") definerule("build_ncg", { - arch = { type="string" } + arch = { type="string" }, }, function(e) -- Remember this is executed from the caller's directory; local @@ -21,8 +21,7 @@ definerule("build_ncg", "mach/proto/ncg/state.h", "mach/proto/ncg/types.h", "mach/proto/ncg/xmach.h", - "mach/"..e.arch.."/ncg/mach.c", - "mach/"..e.arch.."/ncg/*.h", + "mach/"..e.arch.."/ncg+headers", } } @@ -34,7 +33,22 @@ definerule("build_ncg", return cprogram { name = e.name, srcs = { - "mach/proto/ncg/*.c", + "mach/proto/ncg/codegen.c", + "mach/proto/ncg/compute.c", + "mach/proto/ncg/equiv.c", + "mach/proto/ncg/fillem.c", + "mach/proto/ncg/gencode.c", + "mach/proto/ncg/glosym.c", + "mach/proto/ncg/label.c", + "mach/proto/ncg/main.c", + "mach/proto/ncg/move.c", + "mach/proto/ncg/nextem.c", + "mach/proto/ncg/reg.c", + "mach/proto/ncg/regvar.c", + "mach/proto/ncg/salloc.c", + "mach/proto/ncg/state.c", + "mach/proto/ncg/subr.c", + "mach/proto/ncg/var.c", matching(filenamesof(tables), "%.c$") }, deps = { diff --git a/mach/proto/top/build.lua b/mach/proto/top/build.lua index 56ee652b9..525083d34 100644 --- a/mach/proto/top/build.lua +++ b/mach/proto/top/build.lua @@ -12,7 +12,10 @@ definerule("build_top", return cprogram { name = e.name, - srcs = { "mach/proto/top/*.c", }, + srcs = { + "mach/proto/top/queue.c", + "mach/proto/top/top.c", + }, deps = { t }, } end diff --git a/mach/vc4/as/build.lua b/mach/vc4/as/build.lua new file mode 100644 index 000000000..2c2d45031 --- /dev/null +++ b/mach/vc4/as/build.lua @@ -0,0 +1,13 @@ +bundle { + name = "headers", + srcs = { + "./mach0.c", + "./mach1.c", + "./mach2.c", + "./mach3.c", + "./mach4.c", + "./mach5.c", + "./binary.h", + } +} + diff --git a/mach/vc4/libem/build.lua b/mach/vc4/libem/build.lua index ca5a13c65..61cd461b2 100644 --- a/mach/vc4/libem/build.lua +++ b/mach/vc4/libem/build.lua @@ -1,7 +1,10 @@ for _, plat in ipairs(vars.plats) do acklibrary { name = "lib_"..plat, - srcs = { "./*.s" }, + srcs = { + "./csa.s", + "./csb.s", + }, vars = { plat = plat }, } end diff --git a/mach/vc4/libend/build.lua b/mach/vc4/libend/build.lua index ca5a13c65..bfbf21cd0 100644 --- a/mach/vc4/libend/build.lua +++ b/mach/vc4/libend/build.lua @@ -1,7 +1,12 @@ for _, plat in ipairs(vars.plats) do acklibrary { name = "lib_"..plat, - srcs = { "./*.s" }, + srcs = { + "./edata.s", + "./em_end.s", + "./end.s", + "./etext.s", + }, vars = { plat = plat }, } end diff --git a/mach/vc4/ncg/build.lua b/mach/vc4/ncg/build.lua new file mode 100644 index 000000000..cc47f9b7b --- /dev/null +++ b/mach/vc4/ncg/build.lua @@ -0,0 +1,8 @@ +bundle { + name = "headers", + srcs = { + "./mach.c", + "./mach.h" + } +} + diff --git a/modules/build.lua b/modules/build.lua index a2228f2a8..2838eb7c8 100644 --- a/modules/build.lua +++ b/modules/build.lua @@ -1,7 +1,12 @@ clibrary { name = "headers", hdrs = { - "./h/*.h" + "./h/ansi.h", + "./h/em_arith.h", + "./h/em.h", + "./h/em_label.h", + "./h/em_mesX.h", + "./h/emO_code.h", } } diff --git a/modules/src/alloc/build.lua b/modules/src/alloc/build.lua index c8124c318..001234579 100644 --- a/modules/src/alloc/build.lua +++ b/modules/src/alloc/build.lua @@ -1,11 +1,21 @@ clibrary { name = "lib", - srcs = { "./*.c" }, + srcs = { + "./botch.c", + "./clear.c", + "./Malloc.c", + "./No_Mem.c", + "./Realloc.c", + "./Salloc.c", + "./Srealloc.c", + "./st_alloc.c", + "./std_alloc.c", + }, hdrs = { "./alloc.h" }, deps = { "modules+headers", "modules/src/system+lib", - "./*.h" + "./alloc.h" }, } diff --git a/modules/src/data/build.lua b/modules/src/data/build.lua index 9f5941808..331ff9a81 100644 --- a/modules/src/data/build.lua +++ b/modules/src/data/build.lua @@ -1,7 +1,25 @@ -clibrary { - name = "lib", - srcs = { "./*.c" }, - hdrs = { "./*.h" }, - deps = { "./*.h" }, +local hfiles = { + "./array.h", + "./astring.h", + "./diagnostics.h", + "./imap.h", + "./pmap.h", + "./smap.h", + "./stringlist.h", +} + +clibrary { + name = "lib", + srcs = { + "./array.c", + "./astring.c", + "./diagnostics.c", + "./imap.c", + "./pmap.c", + "./smap.c", + "./stringlist.c", + }, + hdrs = hfiles, + deps = hfiles, } diff --git a/modules/src/em_mes/build.lua b/modules/src/em_mes/build.lua index b094f4a84..1b4680b0e 100644 --- a/modules/src/em_mes/build.lua +++ b/modules/src/em_mes/build.lua @@ -1,6 +1,19 @@ clibrary { name = "lib", - srcs = { "./*.c" }, + srcs = { + "./C_ms_com.c", + "./C_ms_ego.c", + "./C_ms_emx.c", + "./C_ms_err.c", + "./C_ms_flt.c", + "./C_ms_gto.c", + "./C_ms_opt.c", + "./C_ms_par.c", + "./C_ms_reg.c", + "./C_ms_src.c", + "./C_ms_stb.c", + "./C_ms_std.c", + }, deps = { "h+emheaders", "modules+headers", diff --git a/modules/src/flt_arith/build.lua b/modules/src/flt_arith/build.lua index 54aa3b097..e248f9003 100644 --- a/modules/src/flt_arith/build.lua +++ b/modules/src/flt_arith/build.lua @@ -19,7 +19,8 @@ clibrary { hdrs = { "./flt_arith.h" }, deps = { "modules+headers", - "./*.h", + "./flt_arith.h", + "./flt_misc.h", } } diff --git a/modules/src/idf/build.lua b/modules/src/idf/build.lua index ac30ac54e..04e501997 100644 --- a/modules/src/idf/build.lua +++ b/modules/src/idf/build.lua @@ -1,7 +1,10 @@ clibrary { name = "lib", srcs = {}, - hdrs = { "./idf_pkg.*" }, + hdrs = { + "./idf_pkg.body", + "./idf_pkg.spec", + } } diff --git a/modules/src/input/build.lua b/modules/src/input/build.lua index 7f59455e0..bb6c5ac0e 100644 --- a/modules/src/input/build.lua +++ b/modules/src/input/build.lua @@ -1,9 +1,13 @@ clibrary { name = "lib", srcs = { - "./*.c" + "./AtEoIF.c", + "./AtEoIT.c", }, - hdrs = { "./inp_pkg.*" } + hdrs = { + "./inp_pkg.body", + "./inp_pkg.spec", + } } diff --git a/modules/src/object/build.lua b/modules/src/object/build.lua index 6a8bea04e..f6c32aadc 100644 --- a/modules/src/object/build.lua +++ b/modules/src/object/build.lua @@ -1,12 +1,28 @@ clibrary { name = "lib", - srcs = { "./*.c" }, + srcs = { + "./rd_arhdr.c", + "./rd_bytes.c", + "./rd.c", + "./rd_int2.c", + "./rd_int4.c", + "./rd_ranlib.c", + "./rd_unsig2.c", + "./wr_arhdr.c", + "./wr_bytes.c", + "./wr.c", + "./wr_int2.c", + "./wr_int4.c", + "./wr_putc.c", + "./wr_ranlib.c", + }, hdrs = { "./object.h" }, deps = { "modules+headers", "h+local", "h+emheaders", - "./*.h", + "./object.h", + "./obj.h", }, } diff --git a/modules/src/read_em/build.lua b/modules/src/read_em/build.lua index c1c3c257a..0d570416b 100644 --- a/modules/src/read_em/build.lua +++ b/modules/src/read_em/build.lua @@ -56,7 +56,7 @@ local function variant(name, cflags) "modules/src/em_data+lib", "modules/src/string+lib", "modules/src/system+lib", - "./*.h", + "./em_comp.h", } } end diff --git a/plat/cpm/emu/build.lua b/plat/cpm/emu/build.lua index ce831aa45..158e8f152 100644 --- a/plat/cpm/emu/build.lua +++ b/plat/cpm/emu/build.lua @@ -1,6 +1,8 @@ ackfile { name = "bdos_o", - srcs = { "./*.s" }, + srcs = { + "./bdos.s", + }, vars = { plat = "cpm" }, } @@ -38,7 +40,12 @@ cprogram { name = "emu", srcs = { "+bdos_c", - "./*.c" + "./biosbdos.c", + "./dis8080.c", + "./emulator.c", + "./fileio.c", + "./intel_8080_emulator.c", + "./main.c", }, } diff --git a/plat/cpm/libsys/build.lua b/plat/cpm/libsys/build.lua index b7b0c6d8c..1159e0778 100644 --- a/plat/cpm/libsys/build.lua +++ b/plat/cpm/libsys/build.lua @@ -1,6 +1,9 @@ acklibrary { name = "internal", - hdrs = { "./*.h" } + hdrs = { + "./asm.h", + "./cpmsys.h", + } } local bdos_calls = { @@ -125,8 +128,32 @@ end acklibrary { name = "lib", srcs = { - "./*.c", - "./*.s", + "./_bdos.s", + "./_bios_raw.s", + "./_bios.s", + "./bios_sectran.s", + "./bios_seldsk.s", + "./brk.c", + "./close.c", + "./cpm_overwrite_ccp.s", + "./cpm_printstring0.s", + "./cpm_read_random_safe.c", + "./creat.c", + -- "./errno.s", + "./fcb.c", + "./fd.c", + "./getpid.c", + "./_hol0.s", + "./_inn2.s", + "./isatty.c", + "./kill.c", + "./lseek.c", + "./open.c", + "./read.c", + "./signal.c", + "./time.c", + "./_trap.s", + "./write.c", generated }, deps = { diff --git a/plat/cpm/tests/build.lua b/plat/cpm/tests/build.lua index 81d17d4dc..a17dfa47a 100644 --- a/plat/cpm/tests/build.lua +++ b/plat/cpm/tests/build.lua @@ -9,5 +9,7 @@ plat_testsuite { "floats", -- floats aren't supported "long-long", }, - tests = { "./*.c" }, + tests = { + "./parsefcb_c.c", + } } diff --git a/plat/em/libsys/build.lua b/plat/em/libsys/build.lua new file mode 100644 index 000000000..3ba351631 --- /dev/null +++ b/plat/em/libsys/build.lua @@ -0,0 +1,74 @@ +bundle { + name = "srcs", + srcs = { + "./access.e", + "./acct.e", + "./alarm.e", + "./brk.e", + "./chdir.e", + "./chmod.e", + "./chown.e", + "./chroot.e", + "./close.e", + "./creat.e", + "./dup2.e", + "./dup.e", + "./errno.e", + "./execl.e", + "./execle.e", + "./execv.e", + "./execve.e", + "./_exit.e", + "./fork.e", + "./fstat.e", + "./ftime.e", + "./getegid.e", + "./geteuid.e", + "./getgid.e", + "./getpid.e", + "./getuid.e", + "./gtty.c", + "./ioctl.e", + "./isatty.c", + "./kill.e", + "./link.e", + "./lock.e", + "./lseek.e", + "./mknod.e", + "./mount.e", + "./mpxcall.e", + "./nice.e", + "./open.e", + "./pause.e", + "./pipe.e", + "./prof.e", + "./ptrace.e", + "./read.e", + "./sbrk.e", + "./setgid.e", + "./setsig.e", + "./setuid.e", + "./signal.c", + "./sigtrp.e", + "./stat.e", + "./stime.e", + "./stty.c", + "./sync.e", + "./tell.c", + "./time.c", + "./times.e", + "./umask.e", + "./umount.e", + "./unlink.e", + "./utime.e", + "./wait.e", + "./write.e", + } +} + +bundle { + name = "headers", + srcs = { + } +} + diff --git a/plat/em22/libsys/build.lua b/plat/em22/libsys/build.lua index 7fdc388c4..919285da3 100644 --- a/plat/em22/libsys/build.lua +++ b/plat/em22/libsys/build.lua @@ -1,13 +1,10 @@ acklibrary { name = "lib", srcs = { - "./*.e", - "./*.c", - "plat/em/libsys/*.c", - "plat/em/libsys/*.e", + "plat/em/libsys+srcs", }, deps = { - "plat/em/libsys/*.h", + "plat/em/libsys+headers", "lang/cem/libcc.ansi/headers+headers", "plat/em22/include+pkg", "h+emheaders", diff --git a/plat/linux/libsys/build.lua b/plat/linux/libsys/build.lua new file mode 100644 index 000000000..b18eb4ec0 --- /dev/null +++ b/plat/linux/libsys/build.lua @@ -0,0 +1,35 @@ +bundle { + name = "srcs", + srcs = { + "./close.c", + "./creat.c", + "./execve.c", + "./_exit.c", + "./fork.c", + "./getpid.c", + "./gettimeofday.c", + "./_hol0.s", + "./ioctl.c", + "./isatty.c", + "./kill.c", + "./lseek.c", + "./open.c", + "./read.c", + "./sbrk.c", + "./signal.c", + "./sigprocmask.c", + "./unlink.c", + "./wait.c", + "./waitpid.c", + "./write.c", + } +} + +bundle { + name = "headers", + srcs = { + "./libsys.h", + "./syscalls.h", + } +} + diff --git a/plat/linux386/libsys/build.lua b/plat/linux386/libsys/build.lua index 908682d47..63fa3370a 100644 --- a/plat/linux386/libsys/build.lua +++ b/plat/linux386/libsys/build.lua @@ -1,12 +1,13 @@ acklibrary { name = "lib", srcs = { - "./*.s", - "plat/linux/libsys/*.c", - "plat/linux/libsys/*.s", + "./execl.s", + "./_syscall.s", + "./trapno.s", + "plat/linux/libsys+srcs", }, deps = { - "plat/linux/libsys/*.h", + "plat/linux/libsys+headers", "lang/cem/libcc.ansi/headers+headers", "plat/linux386/include+pkg", }, diff --git a/plat/linux68k/libsys/build.lua b/plat/linux68k/libsys/build.lua index e0d5b610b..5b16cba3a 100644 --- a/plat/linux68k/libsys/build.lua +++ b/plat/linux68k/libsys/build.lua @@ -1,12 +1,11 @@ acklibrary { name = "lib", srcs = { - "./*.s", - "plat/linux/libsys/*.c", - "plat/linux/libsys/*.s", + "./_syscall.s", + "plat/linux/libsys+srcs", }, deps = { - "plat/linux/libsys/*.h", + "plat/linux/libsys+headers", "lang/cem/libcc.ansi/headers+headers", "plat/linux68k/include+pkg", }, diff --git a/plat/linuxmips/libsys/build.lua b/plat/linuxmips/libsys/build.lua index dffef4742..462f687fc 100644 --- a/plat/linuxmips/libsys/build.lua +++ b/plat/linuxmips/libsys/build.lua @@ -25,7 +25,7 @@ acklibrary { "plat/linux/libsys/write.c", }, deps = { - "plat/linux/libsys/*.h", + "plat/linux/libsys+headers", "lang/cem/libcc.ansi/headers+headers", "plat/linuxmips/include+pkg", }, diff --git a/plat/linuxppc/emu/build.lua b/plat/linuxppc/emu/build.lua index de5208513..0f19e59d8 100644 --- a/plat/linuxppc/emu/build.lua +++ b/plat/linuxppc/emu/build.lua @@ -20,7 +20,10 @@ clibrary { cprogram { name = "emuppc", - srcs = { "./*.c" }, + srcs = { + "./emu.c", + "./main.c", + }, deps = { "+dispatcher_lib" } diff --git a/plat/linuxppc/libsys/build.lua b/plat/linuxppc/libsys/build.lua index 8d7086aa0..be5658cd2 100644 --- a/plat/linuxppc/libsys/build.lua +++ b/plat/linuxppc/libsys/build.lua @@ -27,7 +27,7 @@ acklibrary { "plat/linux/libsys/write.c", }, deps = { - "plat/linux/libsys/*.h", + "plat/linux/libsys+headers", "lang/cem/libcc.ansi/headers+headers", "plat/linuxppc/include+pkg", }, diff --git a/plat/msdos86/libsys/build.lua b/plat/msdos86/libsys/build.lua index dd357082a..eddbbf262 100644 --- a/plat/msdos86/libsys/build.lua +++ b/plat/msdos86/libsys/build.lua @@ -1,8 +1,39 @@ acklibrary { name = "lib", srcs = { - "./*.c", - "./*.s", + "./brk.c", + "./close.s", + "./creat.c", + "./errno.s", + "./getpid.s", + "./gettimeofday.c", + "./_hol0.s", + "./isatty.s", + "./kill.c", + "./lseek.c", + "./open.c", + "./read.c", + "./setmode.c", + "./signal.c", + "./sys_exists.s", + "./sys_fdmodes.c", + "./sys_getdate.s", + "./sys_getmode.c", + "./sys_gettime.s", + "./sys_initmain.c", + "./sys_iseof.c", + "./sys_isopen.s", + "./sys_isreadyr.s", + "./sys_rawcreat.s", + "./sys_rawlseek.s", + "./sys_rawopen.s", + "./sys_rawrw.s", + "./sys_seteof.c", + "./sys_seterrno.c", + "./sys_setmode.c", + "./sys_xret.s", + "./unlink.s", + "./write.c", }, deps = { "lang/cem/libcc.ansi/headers+headers", diff --git a/plat/pc86/emu/build.lua b/plat/pc86/emu/build.lua index b3b81f15f..c8a970861 100644 --- a/plat/pc86/emu/build.lua +++ b/plat/pc86/emu/build.lua @@ -3,7 +3,15 @@ clibrary { vars = { ["+cflags"] = {"-Iplat/pc86/emu/x86emu", "-DDEBUG"} }, - srcs = {"./x86emu/*.c"} + srcs = { + "./x86emu/debug.c", + "./x86emu/decode.c", + "./x86emu/fpu.c", + "./x86emu/ops2.c", + "./x86emu/ops.c", + "./x86emu/prim_ops.c", + "./x86emu/sys.c", + } } cprogram { diff --git a/plat/pc86/libsys/build.lua b/plat/pc86/libsys/build.lua index a30ecae9e..285db8f12 100644 --- a/plat/pc86/libsys/build.lua +++ b/plat/pc86/libsys/build.lua @@ -1,8 +1,22 @@ acklibrary { name = "lib", srcs = { - "./*.c", - "./*.s", + "./brk.c", + "./close.c", + "./creat.c", + "./errno.s", + "./getpid.c", + "./_hol0.s", + "./isatty.c", + "./kill.c", + "./lseek.c", + "./open.c", + "./read.c", + "./signal.c", + "./_sys_rawread.s", + "./_sys_rawwrite.s", + "./time.c", + "./write.c", }, deps = { "lang/cem/libcc.ansi/headers+headers", diff --git a/plat/pdpv7/libsys/build.lua b/plat/pdpv7/libsys/build.lua index 27c90a8d1..ae51150f9 100644 --- a/plat/pdpv7/libsys/build.lua +++ b/plat/pdpv7/libsys/build.lua @@ -1,8 +1,87 @@ acklibrary { name = "lib", srcs = { - "./*.c", - "./*.s", + "./access.s", + "./acct.s", + "./alarm.s", + "./chdir.s", + "./chmod.s", + "./chown.s", + "./chroot.s", + "./cleanup.c", + "./close.s", + "./creat.s", + "./dup.s", + "./errno.s", + "./execle.s", + "./execl.s", + "./execve.s", + "./execv.s", + "./exit.c", + "./_exit.s", + "./fetchi.s", + "./fork.s", + "./fperr.s", + "./fstat.s", + "./ftime.s", + "./getgid.s", + "./getgrp.s", + "./getpid.s", + "./getppid.s", + "./getuid.s", + "./gldav.s", + "./gtty.c", + "./ioctl.s", + "./isatty.c", + "./killbkg.s", + "./killpg.s", + "./kill.s", + "./link.s", + "./lock.s", + "./login.s", + "./lseek.s", + "./lstat.s", + "./mknod.s", + "./mount.s", + "./mpxcall.s", + "./nice.s", + "./nostk.s", + "./open.s", + "./pause.s", + "./phys.s", + "./pipe.s", + "./profil.s", + "./ptrace.s", + "./qfstat.s", + "./qstat.s", + "./quota.s", + "./readlink.s", + "./read.s", + "./reboot.s", + "./renice.s", + "./rtp.s", + "./sbrk.s", + "./setgid.s", + "./setgrp.s", + "./setuid.s", + "./signal.s", + "./stat.s", + "./stime.s", + "./stty.c", + "./submit.s", + "./symlink.s", + "./sync.s", + "./time.s", + "./times.s", + "./ucall.s", + "./umask.s", + "./umount.s", + "./unlink.s", + "./utime.s", + "./vfork.s", + "./vhangup.s", + "./wait.s", + "./write.s", }, deps = { "lang/cem/libcc.ansi/headers+headers", diff --git a/plat/rpi/libsys/build.lua b/plat/rpi/libsys/build.lua index db579d41b..114df8751 100644 --- a/plat/rpi/libsys/build.lua +++ b/plat/rpi/libsys/build.lua @@ -1,8 +1,27 @@ acklibrary { name = "lib", srcs = { - "./*.c", - "./*.s", + "./brk.c", + "./close.c", + "./creat.c", + "./errno.s", + "./getpid.c", + "./_hol0.s", + "./isatty.c", + "./kill.c", + "./lseek.c", + "./open.c", + "./pi_fast_mode.s", + "./pi_phys_to_user.s", + "./pi_uart.s", + "./pi_user_to_phys.s", + "./read.c", + "./select.c", + "./signal.c", + "./tcgetattr.c", + "./tcsetattr.c", + "./time.c", + "./write.c", }, deps = { "lang/cem/libcc.ansi/headers+headers", diff --git a/tests/plat/b/build.lua b/tests/plat/b/build.lua new file mode 100644 index 000000000..841c49612 --- /dev/null +++ b/tests/plat/b/build.lua @@ -0,0 +1,9 @@ +bundle { + name = "srcs", + srcs = { + "./control_b.b", + "./incdec_b.b", + "./operators_b.b", + } +} + diff --git a/tests/plat/bugs/build.lua b/tests/plat/bugs/build.lua new file mode 100644 index 000000000..833d0f120 --- /dev/null +++ b/tests/plat/bugs/build.lua @@ -0,0 +1,12 @@ +bundle { + name = "srcs", + srcs = { + "./bug-157-i80-varargs_c.c", + "./bug-164-faddrn_c.c", + "./bug-203-ego-sr_c-O3.c", + "./bug-22-inn_mod.mod", + "./bug-62-notvar_var_e.c", + } +} + + diff --git a/tests/plat/build.lua b/tests/plat/build.lua index 0ae4a5c19..cbc5632d1 100644 --- a/tests/plat/build.lua +++ b/tests/plat/build.lua @@ -20,7 +20,7 @@ definerule("plat_testsuite", end for _, set in ipairs(e.sets) do if not skipsets[set] then - local fs = filenamesof("tests/plat/"..set.."/*") + local fs = filenamesof("tests/plat/"..set.."+srcs") for _, f in ipairs(fs) do testfiles[#testfiles+1] = f end diff --git a/tests/plat/core/build.lua b/tests/plat/core/build.lua new file mode 100644 index 000000000..f6a60cf90 --- /dev/null +++ b/tests/plat/core/build.lua @@ -0,0 +1,42 @@ +bundle { + name = "srcs", + srcs = { + "./aar_e.e", + "./and_e.e", + "./andv_e.e", + "./brk_c.c", + "./bss_e.c", + "./calloc_c.c", + "./cii_e.e", + "./cmi_e.e", + "./cms_e.e", + "./cmu_e.e", + "./csa_e.c", + "./csb_e.c", + "./_dummy_e.c", + "./dup_e.e", + "./exg_e.e", + "./inn_e.e", + "./intadd_e.c", + "./intcmp_e.c", + "./intdiv_e.c", + "./intrem_e.c", + "./intshift_e.c", + "./intsub_e.c", + "./ior_e.e", + "./iorv_e.e", + "./lar_e.e", + "./newdispose_p.p", + "./pascalsets_p.p", + "./rck_e.e", + "./rotate_e.e", + "./sar_e.e", + "./set_e.e", + "./setjmp_c.c", + "./structcopy_e.c", + "./xor_e.e", + "./xorv_e.e", + } +} + + diff --git a/tests/plat/floats/build.lua b/tests/plat/floats/build.lua new file mode 100644 index 000000000..066bc32de --- /dev/null +++ b/tests/plat/floats/build.lua @@ -0,0 +1,12 @@ +bundle { + name = "srcs", + srcs = { + "./doublecmp_e.c", + "./from_d_to_si_e.c", + "./from_d_to_ui_e.c", + "./from_si_to_d_e.c", + "./from_ui_to_d_e.c", + } +} + + diff --git a/tests/plat/lib/build.lua b/tests/plat/lib/build.lua new file mode 100644 index 000000000..bdfa15edc --- /dev/null +++ b/tests/plat/lib/build.lua @@ -0,0 +1,7 @@ +bundle { + name = "srcs", + srcs = { + } +} + + diff --git a/tests/plat/long-long/build.lua b/tests/plat/long-long/build.lua new file mode 100644 index 000000000..e1fb5f3b1 --- /dev/null +++ b/tests/plat/long-long/build.lua @@ -0,0 +1,15 @@ +bundle { + name = "srcs", + srcs = { + "./lladdsub_e.c", + "./llbitset_e.c", + "./llcmp_e.c", + "./llconvert_e.c", + "./lldivrem_e.c", + "./llmul_e.c", + "./llshift_e.c", + "./llswitch_e.c", + } +} + + diff --git a/tests/plat/m2/build.lua b/tests/plat/m2/build.lua new file mode 100644 index 000000000..c212d5f5c --- /dev/null +++ b/tests/plat/m2/build.lua @@ -0,0 +1,13 @@ +bundle { + name = "srcs", + srcs = { + "./ConvTest_mod.mod", + "./NestProc_mod.mod", + "./OpenArray_mod.mod", + "./SemaTest_mod.mod", + "./Set100_mod.mod", + "./StringTest_mod.mod", + } +} + + diff --git a/util/ass/build.lua b/util/ass/build.lua index 17b60d03d..d976e1bf0 100644 --- a/util/ass/build.lua +++ b/util/ass/build.lua @@ -26,7 +26,17 @@ normalrule { cprogram { name = "em_ass", srcs = { - "./ass*.c", + "./ass00.c", + "./ass30.c", + "./ass40.c", + "./ass50.c", + "./ass60.c", + "./ass70.c", + "./ass80.c", + "./assci.c", + "./asscm.c", + "./assda.c", + "./assrl.c", "+asstb", }, deps = { @@ -37,7 +47,11 @@ cprogram { --"modules/src/data+lib", --"modules/src/object+lib", "modules/src/system+lib", - "./ass*.h", + "./ass00.h", + "./assci.h", + "./asscm.h", + "./assex.h", + "./assrl.h", } } diff --git a/util/cgg/build.lua b/util/cgg/build.lua index 00ae59719..3c8deb0ca 100644 --- a/util/cgg/build.lua +++ b/util/cgg/build.lua @@ -13,7 +13,7 @@ local cgglexer = flex { cprogram { name = "cgg", srcs = concat( - "./*.c", + "./main.c", matching(filenamesof(cggparser), "%.c$"), matching(filenamesof(cgglexer), "%.c$") ), diff --git a/util/ego/build.lua b/util/ego/build.lua index 97f177822..51c57d7fc 100644 --- a/util/ego/build.lua +++ b/util/ego/build.lua @@ -14,17 +14,257 @@ local function build_ego(name) } end -build_ego("bo") -build_ego("ca") -build_ego("cf") -build_ego("cj") -build_ego("cs") -build_ego("ic") -build_ego("il") -build_ego("lv") -build_ego("sp") -build_ego("sr") -build_ego("ud") +cprogram { + name = "bo", + srcs = { + "./bo/bo.c", + }, + deps = { + "util/ego/share+lib", + "modules/src/em_data+lib", + "h+emheaders", + }, + vars = { + ["+cflags"] = {"-DDEBUG", "-DVERBOSE", "-DNOTCOMPACT"} + } +} + +cprogram { + name = "ca", + srcs = { + "./ca/ca.c", + "./ca/ca_put.c", + }, + deps = { + "./ca/ca.h", + "./ca/ca_put.h", + "util/ego/share+lib", + "modules/src/em_data+lib", + "h+emheaders", + }, + vars = { + ["+cflags"] = {"-DDEBUG", "-DVERBOSE", "-DNOTCOMPACT"} + } +} + +cprogram { + name = "cf", + srcs = { + "./cf/cf.c", + "./cf/cf_idom.c", + "./cf/cf_loop.c", + "./cf/cf_succ.c", + + }, + deps = { + "./cf/cf.h", + "./cf/cf_idom.h", + "./cf/cf_loop.h", + "./cf/cf_succ.h", + "util/ego/share+lib", + "modules/src/em_data+lib", + "h+emheaders", + }, + vars = { + ["+cflags"] = {"-DDEBUG", "-DVERBOSE", "-DNOTCOMPACT"} + } +} + +cprogram { + name = "cj", + srcs = { + "./cj/cj.c", + }, + deps = { + "util/ego/share+lib", + "modules/src/em_data+lib", + "h+emheaders", + }, + vars = { + ["+cflags"] = {"-DDEBUG", "-DVERBOSE", "-DNOTCOMPACT"} + } +} + +cprogram { + name = "cs", + srcs = { + "./cs/cs_alloc.c", + "./cs/cs_aux.c", + "./cs/cs_avail.c", + "./cs/cs.c", + "./cs/cs_debug.c", + "./cs/cs_elim.c", + "./cs/cs_entity.c", + "./cs/cs_getent.c", + "./cs/cs_kill.c", + "./cs/cs_partit.c", + "./cs/cs_profit.c", + "./cs/cs_stack.c", + "./cs/cs_vnm.c", + }, + deps = { + "./cs/cs_alloc.h", + "./cs/cs_aux.h", + "./cs/cs_avail.h", + "./cs/cs_debug.h", + "./cs/cs_elim.h", + "./cs/cs_entity.h", + "./cs/cs_getent.h", + "./cs/cs.h", + "./cs/cs_kill.h", + "./cs/cs_partit.h", + "./cs/cs_profit.h", + "./cs/cs_stack.h", + "./cs/cs_vnm.h", + "util/ego/share+lib", + "modules/src/em_data+lib", + "h+emheaders", + }, + vars = { + ["+cflags"] = {"-DDEBUG", "-DVERBOSE", "-DNOTCOMPACT"} + } +} + +cprogram { + name = "ic", + srcs = { + "./ic/ic_aux.c", + "./ic/ic.c", + "./ic/ic_io.c", + "./ic/ic_lib.c", + "./ic/ic_lookup.c", + }, + deps = { + "./ic/ic_aux.h", + "./ic/ic.h", + "./ic/ic_io.h", + "./ic/ic_lib.h", + "./ic/ic_lookup.h", + "util/ego/share+lib", + "modules/src/em_data+lib", + "h+emheaders", + }, + vars = { + ["+cflags"] = {"-DDEBUG", "-DVERBOSE", "-DNOTCOMPACT"} + } +} + +cprogram { + name = "il", + srcs = { + "./il/il1_anal.c", + "./il/il1_aux.c", + "./il/il1_cal.c", + "./il/il1_formal.c", + "./il/il2_aux.c", + "./il/il3_aux.c", + "./il/il3_change.c", + "./il/il3_subst.c", + "./il/il_aux.c", + "./il/il.c", + }, + deps = { + "./il/il1_anal.h", + "./il/il1_aux.h", + "./il/il1_cal.h", + "./il/il1_formal.h", + "./il/il2_aux.h", + "./il/il3_aux.h", + "./il/il3_change.h", + "./il/il3_subst.h", + "./il/il_aux.h", + "./il/il.h", + "util/ego/share+lib", + "modules/src/em_data+lib", + "h+emheaders", + }, + vars = { + ["+cflags"] = {"-DDEBUG", "-DVERBOSE", "-DNOTCOMPACT"} + } +} + +cprogram { + name = "lv", + srcs = { + "./lv/lv.c", + }, + deps = { + "./lv/lv.h", + "util/ego/share+lib", + "modules/src/em_data+lib", + "h+emheaders", + }, + vars = { + ["+cflags"] = {"-DDEBUG", "-DVERBOSE", "-DNOTCOMPACT"} + } +} + +cprogram { + name = "sp", + srcs = { + "./sp/sp.c", + }, + deps = { + "util/ego/share+lib", + "modules/src/em_data+lib", + "h+emheaders", + }, + vars = { + ["+cflags"] = {"-DDEBUG", "-DVERBOSE", "-DNOTCOMPACT"} + } +} + +cprogram { + name = "sr", + srcs = { + "./sr/sr_aux.c", + "./sr/sr.c", + "./sr/sr_cand.c", + "./sr/sr_expr.c", + "./sr/sr_iv.c", + "./sr/sr_reduce.c", + "./sr/sr_xform.c", + }, + deps = { + "./sr/sr_aux.h", + "./sr/sr_cand.h", + "./sr/sr_expr.h", + "./sr/sr.h", + "./sr/sr_iv.h", + "./sr/sr_reduce.h", + "./sr/sr_xform.h", + "util/ego/share+lib", + "modules/src/em_data+lib", + "h+emheaders", + }, + vars = { + ["+cflags"] = {"-DDEBUG", "-DVERBOSE", "-DNOTCOMPACT"} + } +} + +cprogram { + name = "ud", + srcs = { + "./ud/ud_aux.c", + "./ud/ud.c", + "./ud/ud_const.c", + "./ud/ud_copy.c", + "./ud/ud_defs.c", + }, + deps = { + "./ud/ud_aux.h", + "./ud/ud_const.h", + "./ud/ud_copy.h", + "./ud/ud_defs.h", + "./ud/ud.h", + "util/ego/share+lib", + "modules/src/em_data+lib", + "h+emheaders", + }, + vars = { + ["+cflags"] = {"-DDEBUG", "-DVERBOSE", "-DNOTCOMPACT"} + } +} cprogram { name = "em_ego", diff --git a/util/ego/ra/build.lua b/util/ego/ra/build.lua index cae0cfdb2..21a149110 100644 --- a/util/ego/ra/build.lua +++ b/util/ego/ra/build.lua @@ -18,13 +18,31 @@ normalrule { cprogram { name = "ra", - srcs = { "./ra*.c" }, + srcs = { + "./ra_allocl.c", + "./ra_aux.c", + "./ra.c", + "./ra_interv.c", + "./ra_items.c", + "./ra_lifet.c", + "./ra_pack.c", + "./ra_profits.c", + "./ra_xform.c", + }, deps = { "util/ego/share+lib", "modules/src/em_data+lib", "h+emheaders", "+itemtab_h", - "./ra*.h", + "./ra_allocl.h", + "./ra_aux.h", + "./ra.h", + "./ra_interv.h", + "./ra_items.h", + "./ra_lifet.h", + "./ra_pack.h", + "./ra_profits.h", + "./ra_xform.h", }, vars = { ["+cflags"] = {"-DVERBOSE", "-DNOTCOMPACT"} diff --git a/util/ego/share/build.lua b/util/ego/share/build.lua index 7e152364a..bc3fda27f 100644 --- a/util/ego/share/build.lua +++ b/util/ego/share/build.lua @@ -48,7 +48,23 @@ clibrary { "./init_glob.c", }, deps = { - "./*.h", + "./alloc.h", + "./cset.h", + "./debug.h", + "./def.h", + "./files.h", + "./get.h", + "./global.h", + "./go.h", + "./init_glob.h", + "./locals.h", + "./lset.h", + "./map.h", + "./parser.h", + "./put.h", + "./stack_chg.h", + "./types.h", + "./utils.h", "+classdefs_h", "+pop_push_h", "h+emheaders", diff --git a/util/int/build.lua b/util/int/build.lua index 7e2a5100a..f1b5264f7 100644 --- a/util/int/build.lua +++ b/util/int/build.lua @@ -87,7 +87,46 @@ clibrary { cprogram { name = "int", srcs = { - "./*.c", + "./alloc.c", + "./core.c", + "./data.c", + "./disassemble.c", + "./do_array.c", + "./do_branch.c", + "./do_comp.c", + "./do_conv.c", + "./do_fpar.c", + "./do_incdec.c", + "./do_intar.c", + "./do_load.c", + "./do_logic.c", + "./do_misc.c", + "./do_proc.c", + "./do_ptrar.c", + "./do_sets.c", + "./do_store.c", + "./do_unsar.c", + "./dump.c", + "./fra.c", + "./global.c", + "./init.c", + "./io.c", + "./log.c", + "./main.c", + "./m_ioctl.c", + "./moncalls.c", + "./monstruct.c", + "./m_sigtrp.c", + "./proctab.c", + "./read.c", + "./rsb.c", + "./segment.c", + "./stack.c", + "./switch.c", + "./tally.c", + "./text.c", + "./trap.c", + "./warn.c", }, deps = { "h+emheaders", diff --git a/util/led/build.lua b/util/led/build.lua index 02db10c89..efbd4e6a1 100644 --- a/util/led/build.lua +++ b/util/led/build.lua @@ -1,6 +1,20 @@ cprogram { name = "led", - srcs = { "./*.c" }, + srcs = { + "./archive.c", + "./error.c", + "./extract.c", + "./finish.c", + "./main.c", + "./memory.c", + "./output.c", + "./read.c", + "./relocate.c", + "./save.c", + "./scan.c", + "./sym.c", + "./write.c", + }, deps = { "./archive.h", "./const.h", "./debug.h", "./defs.h", "./error.h", "./extract.h", "./finish.h", "./mach.h", diff --git a/util/mcgg/build.lua b/util/mcgg/build.lua index f8055050c..dbae7e9e3 100644 --- a/util/mcgg/build.lua +++ b/util/mcgg/build.lua @@ -2,12 +2,16 @@ include("first/yacc.lua") flex { name = "flex", - srcs = { "./*.l" }, + srcs = { + "./scan.l", + } } yacc { name = "yacc", - srcs = { "./*.y" }, + srcs = { + "./gram.y", + } } normalrule { @@ -41,7 +45,7 @@ clibrary { cprogram { name = "mcgg", srcs = { - "./*.c", + "./iburg.c", matching(filenamesof("+flex"), "%.c$"), matching(filenamesof("+yacc"), "%.c$") }, diff --git a/util/ncgg/build.lua b/util/ncgg/build.lua index 9441e9f74..5b6457592 100644 --- a/util/ncgg/build.lua +++ b/util/ncgg/build.lua @@ -27,7 +27,20 @@ normalrule { cprogram { name = "ncgg", srcs = concat( - "./*.c", + "./coerc.c", + "./emlookup.c", + "./error.c", + "./expr.c", + "./hall.c", + "./instruct.c", + "./iocc.c", + "./lookup.c", + "./main.c", + "./output.c", + "./set.c", + "./strlookup.c", + "./subr.c", + "./var.c", matching(filenamesof(cggparser), "%.c$"), matching(filenamesof(cgglexer), "%.c$"), "+keywords" diff --git a/util/opt/build.lua b/util/opt/build.lua index a503a6f35..8e721c8f6 100644 --- a/util/opt/build.lua +++ b/util/opt/build.lua @@ -61,7 +61,21 @@ local function variant(name, cflags) srcs = { "+pattern_c", "+pop_push_c", - "./*.c", + "./alloc.c", + "./backward.c", + "./cleanup.c", + "./flow.c", + "./getline.c", + "./lookup.c", + "./main.c", + "./peephole.c", + "./process.c", + "./putline.c", + "./reg.c", + "./special.c", + "./tes.c", + "./util.c", + "./var.c", }, deps = concat( headers, diff --git a/util/topgen/build.lua b/util/topgen/build.lua index 715632211..d0ff6513f 100644 --- a/util/topgen/build.lua +++ b/util/topgen/build.lua @@ -2,13 +2,19 @@ include("util/LLgen/build.lua") llgen { name = "llgen", - srcs = { "./*.g" } + srcs = { + "./topgen.g", + } } cprogram { name = "topgen", srcs = { - "./*.c", + "./hash.c", + "./LLlex.c", + "./main.c", + "./pattern.c", + "./symtab.c", matching(filenamesof("+llgen"), "%.c$"), }, deps = {