First version in CVS.

This commit is contained in:
dtrg
2006-07-20 23:24:28 +00:00
parent ea8f3fe1ff
commit 097c640a6c
55 changed files with 2558 additions and 0 deletions

54
util/ack/pmfile Normal file
View File

@@ -0,0 +1,54 @@
-- $Source$
-- $State$
local d = ROOTDIR.."util/ack/"
local mktable = cprogram {
cfile (d.."mktables.c")
}
local makeheaders = simple {
outputs= {"%U%/dmach.c", "%U%/intable.c"},
command = {
"cd %{return posix.dirname(self.out[1])}% && %{return self['in'][1]}% %BINDIR%lib"
},
mktable
}
tool_ack = cprogram {
cfile (d.."list.c"),
cfile (d.."data.c"),
cfile (d.."main.c"),
cfile (d.."scan.c"),
cfile (d.."svars.c"),
cfile (d.."trans.c"),
cfile (d.."util.c"),
cfile (d.."rmach.c"),
cfile (d.."run.c"),
cfile (d.."grows.c"),
cfile (d.."files.c"),
cfile {
CEXTRAFLAGS = "-I"..d,
ith { makeheaders, i = 1 }
},
cfile {
CEXTRAFLAGS = "-I"..d,
ith { makeheaders, i = 2 }
},
lib_string,
outputs = {"%U%/ack"},
install = {
pm.install("%BINDIR%bin/ack"),
pm.install("%ROOTDIR%/lib/descr/fe", "%BINDIR%%PLATIND%/descr/fe"),
}
}
-- Revision history
-- $Log$
-- Revision 1.1 2006-07-20 23:18:18 dtrg
-- First version in CVS.
--

17
util/amisc/pmfile Normal file
View File

@@ -0,0 +1,17 @@
-- $Source$
-- $State$
local d = "util/amisc/"
tool_tabgen = cprogram {
cfile (d.."tabgen.c"),
outputs = {"%U%/tabgen"},
install = pm.install(TOOLDIR.."tabgen")
}
-- Revision history
-- $Log$
-- Revision 1.1 2006-07-20 23:18:18 dtrg
-- First version in CVS.
--

22
util/arch/pmfile Normal file
View File

@@ -0,0 +1,22 @@
-- $Source$
-- $State$
local d = "util/arch/"
tool_aal = cprogram {
CEXTRAFLAGS = "-DAAL",
cfile (d.."archiver.c"),
lib_print,
lib_string,
lib_system,
lib_object,
install = pm.install(BINDIR.."bin/aal")
}
-- Revision history
-- $Log$
-- Revision 1.1 2006-07-20 23:18:18 dtrg
-- First version in CVS.
--

56
util/ceg/as_parser/pmfile Normal file
View File

@@ -0,0 +1,56 @@
-- $Source$
-- $State$
local d = ROOTDIR.."util/ceg/as_parser/"
local lpars = LLgen {
file (d.."pars.g")
}
local cfile_with_headers = cfile {
class = "cfile_with_headers",
dynamicheaders = {
file (d),
lpars
}
}
tool_ceg_as_parser = cprogram {
CEXTRAFLAGS = "-DFLEX",
CLIBRARIES = "-lfl",
cfile_with_headers (d.."conversion.c"),
cfile_with_headers (d.."help.c"),
cfile_with_headers {
flex {
file (d.."table.l")
}
},
foreach {
rule = cfile_with_headers,
ith { lpars, from=2 }
},
lib_alloc,
lib_print,
lib_string,
lib_system,
outputs = {"%U%/as_parser"},
install = pm.install(BINDIR.."%PLATDEP%/ceg/as_parser/as_parser"),
}
tool_ceg_as_parser_eval = cprogram {
cfile (d.."eval/eval.c"),
outputs = {"%U%/eval"},
install = pm.install(BINDIR.."%PLATDEP%/ceg/as_parser/eval"),
}
-- Revision history
-- $Log$
-- Revision 1.1 2006-07-20 23:18:18 dtrg
-- First version in CVS.
--

20
util/ceg/assemble/pmfile Normal file
View File

@@ -0,0 +1,20 @@
-- $Source$
-- $State$
local d = ROOTDIR.."util/ceg/assemble/"
tool_ceg_assemble = group {
install = {
pm.install(d.."as_assemble/assemble.c", BINDIR..PLATDEP.."/ceg/assemble/as_assemble/assemble.c"),
pm.install(d.."as_assemble/block_as.c", BINDIR..PLATDEP.."/ceg/assemble/as_assemble/block_as.c"),
pm.install(d.."obj_assemble/assemble.c", BINDIR..PLATDEP.."/ceg/assemble/obj_assemble/assemble.c"),
pm.install(d.."obj_assemble/block_as.c", BINDIR..PLATDEP.."/ceg/assemble/obj_assemble/block_as.c"),
pm.install(d.."obj_assemble/const.h", BINDIR..PLATDEP.."/ceg/assemble/obj_assemble/const.h"),
}
}
-- Revision history
-- $Log$
-- Revision 1.1 2006-07-20 23:18:19 dtrg
-- First version in CVS.
--

89
util/ceg/ce_back/pmfile Normal file
View File

@@ -0,0 +1,89 @@
-- $Source$
-- $State$
local d = ROOTDIR.."util/ceg/ce_back/"
local function installmany(srcroot, destroot, list)
local o = {}
for _, i in ipairs(list) do
table.insert(o, pm.install(srcroot..i, destroot..i))
end
return o
end
tool_ceg_assemble = group {
install = installmany(d, BINDIR.."%PLATDEP%/ceg/ce_back/",
{
"as_back/back.h",
"as_back/bottom.c",
"as_back/bss.c",
"as_back/con1.c",
"as_back/con2.c",
"as_back/con4.c",
"as_back/do_close.c",
"as_back/do_open.c",
"as_back/end_back.c",
"as_back/gen1.c",
"as_back/gen2.c",
"as_back/gen4.c",
"as_back/header.h",
"as_back/init_back.c",
"as_back/reloc1.c",
"as_back/reloc2.c",
"as_back/reloc4.c",
"as_back/rom1.c",
"as_back/rom2.c",
"as_back/rom4.c",
"as_back/set_global.c",
"as_back/set_local.c",
"as_back/switchseg.c",
"as_back/symboldef.c",
"as_back/text1.c",
"as_back/text2.c",
"as_back/text4.c",
"as_back/dbsym.c",
"obj_back/back.h",
"obj_back/con2.c",
"obj_back/con4.c",
"obj_back/data.c",
"obj_back/data.h",
"obj_back/do_close.c",
"obj_back/do_open.c",
"obj_back/end_back.c",
"obj_back/extnd.c",
"obj_back/gen1.c",
"obj_back/gen2.c",
"obj_back/gen4.c",
"obj_back/hash.h",
"obj_back/header.h",
"obj_back/init_back.c",
"obj_back/label.c",
"obj_back/memory.c",
"obj_back/misc.c",
"obj_back/output.c",
"obj_back/reloc1.c",
"obj_back/reloc2.c",
"obj_back/reloc4.c",
"obj_back/relocation.c",
"obj_back/rom2.c",
"obj_back/rom4.c",
"obj_back/set_global.c",
"obj_back/set_local.c",
"obj_back/switchseg.c",
"obj_back/symboldef.c",
"obj_back/symtable.c",
"obj_back/text2.c",
"obj_back/text4.c",
"obj_back/common.c",
"obj_back/dbsym.c",
})
}
-- Revision history
-- $Log$
-- Revision 1.1 2006-07-20 23:18:19 dtrg
-- First version in CVS.
--

21
util/ceg/pmfile Normal file
View File

@@ -0,0 +1,21 @@
-- $Source$
-- $State$
local d = ROOTDIR.."util/ceg/"
include (d.."as_parser/pmfile")
include (d.."assemble/pmfile")
include (d.."ce_back/pmfile")
tool_ceg = group {
tool_ceg_as_parser,
tool_ceg_as_parser_eval,
tool_ceg_assemble,
tool_ceg_ce_back,
}
-- Revision history
-- $Log$
-- Revision 1.1 2006-07-20 23:18:18 dtrg
-- First version in CVS.
--

48
util/cgg/pmfile Normal file
View File

@@ -0,0 +1,48 @@
-- $Source$
-- $State$
local d = ROOTDIR.."util/cgg/"
local yacc_bootgram = yacc {
file (d.."bootgram.y")
}
tool_cgg = cprogram {
cfile (d.."main.c"),
cfile {
CEXTRAFLAGS = "-I"..d,
yacc_bootgram,
},
cfile {
CEXTRAFLAGS = "-I"..d,
flex {
file (d.."bootlex.l")
},
dynamicheaders = yacc_bootgram
},
CLIBRARIES = {"-lfl"},
lib_em_data,
lib_assert,
lib_system,
install = pm.install(TOOLDIR.."cgg")
}
cgg = simple {
class = "cgg",
outputs = {"%U%/tables.c", "%U%/tables.h"},
command = {
"cd %out[1]:dirname% && (%BINDIR%bin/cpp -P -I%CGGINCLUDEDIR% %in% | %TOOLDIR%cgg)",
},
}
-- Revision history
-- $Log$
-- Revision 1.1 2006-07-20 23:21:17 dtrg
-- First version in CVS.
--

25
util/cmisc/pmfile Normal file
View File

@@ -0,0 +1,25 @@
-- $Source$
-- $State$
local d = "util/cmisc/"
tool_tabgen = cprogram {
cfile (d.."tabgen.c"),
outputs = {"%U%/tabgen"},
install = pm.install(TOOLDIR.."tabgen")
}
tabgen = simple {
class = "tabgen",
outputs = {"%U%-char.c"},
command = {
"%TOOLDIR%tabgen -f%in[1]% > %out[1]%"
},
}
-- Revision history
-- $Log$
-- Revision 1.1 2006-07-20 23:21:17 dtrg
-- First version in CVS.
--

184
util/cpp/pmfile Normal file
View File

@@ -0,0 +1,184 @@
-- $Source$
-- $State$
local d = ROOTDIR.."util/cpp/"
local extract_parameters = simple {
outputs = {
"%U%/pathlength.h",
"%U%/errout.h",
"%U%/idfsize.h",
"%U%/numsize.h",
"%U%/nparams.h",
"%U%/ifdepth.h",
"%U%/lapbuf.h",
"%U%/strsize.h",
"%U%/botch_free.h",
"%U%/debug.h",
"%U%/parbufsize.h",
"%U%/textsize.h",
"%U%/inputtype.h",
"%U%/obufsize.h",
"%U%/dobits.h",
"%U%/line_prefix.h",
},
command = {
"cd %out[1]:dirname% && %in[1]% %in[2]%"
},
file (d.."make.hfiles"),
file (d.."Parameters")
}
local lpars = LLgen {
simple {
outputs = {"%U%/tokenfile.g"},
command = {
"%in[1]% < %in[2]% > %out[1]%"
},
file (d.."make.tokfile"),
file (d.."tokenname.c")
},
file (d.."expression.g")
}
local cfile_with_headers = cfile {
class = "cfile_with_headers",
dynamicheaders = {
file (d),
extract_parameters,
lpars
}
}
tool_cpp = cprogram {
cfile_with_headers (d.."LLlex.c"),
cfile_with_headers (d.."LLmessage.c"),
cfile_with_headers (d.."ch7bin.c"),
cfile_with_headers (d.."ch7mon.c"),
cfile_with_headers (d.."domacro.c"),
cfile_with_headers (d.."error.c"),
cfile_with_headers (d.."idf.c"),
cfile_with_headers (d.."init.c"),
cfile_with_headers (d.."input.c"),
cfile_with_headers (d.."main.c"),
cfile_with_headers (d.."options.c"),
cfile_with_headers (d.."preprocess.c"),
cfile_with_headers (d.."replace.c"),
cfile_with_headers (d.."scan.c"),
cfile_with_headers (d.."skip.c"),
cfile_with_headers (d.."tokenname.c"),
cfile_with_headers (d.."next.c"),
cfile_with_headers (d.."expr.c"),
foreach {
rule = cfile_with_headers,
ith { lpars, from=2 }
},
cfile_with_headers {
simple {
outputs = {"%U%-symbol2str.c"},
command = {
"%in[1]% < %in[2]% > %out[1]%"
},
file (d.."make.tokcase"),
file (d.."tokenname.c")
}
},
cfile_with_headers {
CEXTRAFLAGS = "-I"..d,
tabgen (d.."char.tab")
},
lib_assert,
lib_print,
lib_alloc,
lib_system,
lib_string,
outputs = {"%U%/cpp"},
install = pm.install(BINDIR.."bin/cpp")
}
--[[
# genmakefile
# This genmakefile doesn't have a real comment yet.
#
# $Source$
# $State$
# --- cpp -------------------------------------------------------------------
push
dir=src/tools/cpp
addinclude $SRCDIR/$dir
addinclude $OBJDIR/$dir
x="$SRCS"
hostcdyn $dir/char.c
SRCS="$x"
tabgen $SRCDIR/$dir/char.tab $OBJDIR/$dir/char.c
llgen "" $OBJDIR/$dir \
$OBJDIR/$dir/tokenfile.g \
$SRCDIR/$dir/expression.g
tokenfile $dir
tokcase $dir
hostprogram $DESTDIR/bin/cpp $OBJS \
$DESTDIR/lib/libassert.a \
$DESTDIR/lib/libprint.a \
$DESTDIR/lib/liballoc.a \
$DESTDIR/lib/libsystem.a \
$DESTDIR/lib/libastring.a
addcleanable $OBJDIR/$dir/errout.h
addcleanable $OBJDIR/$dir/idfsize.h
addcleanable $OBJDIR/$dir/ifdepth.h
addcleanable $OBJDIR/$dir/lapbuf.h
addcleanable $OBJDIR/$dir/nparams.h
addcleanable $OBJDIR/$dir/numsize.h
addcleanable $OBJDIR/$dir/obufsize.h
addcleanable $OBJDIR/$dir/parbufsize.h
addcleanable $OBJDIR/$dir/pathlength.h
addcleanable $OBJDIR/$dir/strsize.h
addcleanable $OBJDIR/$dir/textsize.h
addcleanable $OBJDIR/$dir/botch_free.h
addcleanable $OBJDIR/$dir/debug.h
addcleanable $OBJDIR/$dir/inputtype.h
addcleanable $OBJDIR/$dir/dobits.h
addcleanable $OBJDIR/$dir/line_prefix.h
cat <<EOF
$SRCS: $OBJDIR/$dir/.hfiles
$SRCDIR/$dir/LLlex.c: $OBJDIR/$dir/Lpars.c
$OBJDIR/$dir/.hfiles: \
$SRCDIR/$dir/Parameters \
$OBJDIR/$dir/char.c
@echo MAKE.HFILES \$<
@mkdir -p \$(dir \$@)
@(cd \$(dir \$@) && $SRCDIR/$dir/make.hfiles \$<) > /dev/null
@touch \$@
EOF
pop
# Revision history
# $Log$
# Revision 1.1 2006-07-20 23:24:28 dtrg
# First version in CVS.
#
--]]
-- Revision history
-- $Log$
-- Revision 1.1 2006-07-20 23:24:28 dtrg
-- First version in CVS.
--

53
util/data/pmfile Normal file
View File

@@ -0,0 +1,53 @@
-- $Source$
-- $State$
local d = "util/data/"
local datafiles = simple {
outputs = {
"%U%/em_spec.h",
"%U%/em_pseu.h",
"%U%/em_mnem.h",
"%U%/em_flag.c",
"%U%/em_pseu.c",
"%U%/em_mnem.c"
},
command = {
"cd %ROOTDIR%etc && ./new_table %out[1]:dirname% %out[1]:dirname%"
},
install = {
pm.install("%U%/em_spec.h", "%HEADERDIR%em_spec.h"),
pm.install("%U%/em_pseu.h", "%HEADERDIR%em_pseu.h"),
pm.install("%U%/em_mnem.h", "%HEADERDIR%em_mnem.h")
},
file "%ROOTDIR%etc/new_table",
}
local cfile_with_headers = cfile {
class = "cfile_with_headers",
dynamicheaders = {
datafiles,
}
}
module_em_data = clibrary {
cfile_with_headers (d.."em_ptyp.c"),
foreach {
rule = cfile_with_headers,
ith { datafiles, from=4 }
},
outputs = {"%U%/libem_data.a"},
install = pm.install("%LIBDIR%libem_data.a")
}
lib_em_data = file "%LIBDIR%libem_data.a"
-- Revision history
-- $Log$
-- Revision 1.1 2006-07-20 23:24:28 dtrg
-- First version in CVS.
--

47
util/misc/pmfile Normal file
View File

@@ -0,0 +1,47 @@
-- $Source$
-- $State$
local d = ROOTDIR.."util/misc/"
tool_em_decode = cprogram {
cfile (d.."convert.c"),
lib_read_emkV,
lib_eme,
lib_em_data,
lib_alloc,
lib_print,
lib_string,
lib_system,
outputs = {"%U%/em_decode"},
install = {
-- FIXME lib.bin in next line needs removing --- pm bug?
pm.install("%BINDIR%lib.bin/em_decode"),
pm.install(d.."em_decode.6", "%BINDIR%man/man6/em_decode.6"),
}
}
tool_em_encode = cprogram {
cfile (d.."convert.c"),
lib_read_emeV,
lib_emk,
lib_em_data,
lib_alloc,
lib_print,
lib_string,
lib_system,
outputs = {"%U%/em_encode"},
install = {
-- FIXME lib.bin in next line needs removing --- pm bug?
pm.install("%BINDIR%lib.bin/em_encode"),
}
}
-- Revision history
-- $Log$
-- Revision 1.1 2006-07-20 23:24:28 dtrg
-- First version in CVS.
--

81
util/ncgg/pmfile Normal file
View File

@@ -0,0 +1,81 @@
-- $Source$
-- $State$
local d = "util/ncgg/"
local ncgg_yacc = yacc {
file (d.."cgg.y")
}
tool_ncgg = cprogram {
cfile (d.."subr.c"),
cfile (d.."main.c"),
cfile (d.."coerc.c"),
cfile (d.."error.c"),
cfile (d.."emlookup.c"),
cfile (d.."expr.c"),
cfile (d.."instruct.c"),
cfile (d.."iocc.c"),
cfile (d.."lookup.c"),
cfile (d.."output.c"),
cfile (d.."set.c"),
cfile (d.."strlookup.c"),
cfile (d.."var.c"),
cfile (d.."hall.c"),
cfile {
CEXTRAFLAGS = "-I"..d,
ncgg_yacc,
dynamicheaders = flex {
file (d.."scan.l")
}
},
cfile {
CEXTRAFLAGS = "-I"..d,
simple {
outputs = {"%U%/enterkeyw.c"},
command = {
"cp %{return posix.dirname(self['in'][3])}%/y.tab.h %{return posix.dirname(self.out[1])}%",
"cd %{return posix.dirname(self.out[1])}% && "..ROOTDIR..d.."cvtkeywords "..ROOTDIR..d.."keywords",
},
file (d.."cvtkeywords"),
file (d.."keywords"),
ncgg_yacc
},
dynamicheaders = ncgg_yacc
},
lib_em_data,
outputs = {"%U%-ncgg"},
install = pm.install(TOOLDIR.."ncgg")
}
ncgg = simple {
class = "ncgg",
outputs = {"%U%/tables.c", "%U%/tables.h"},
command = {
"cd %out[1]:dirname% && (%BINDIR%bin/cpp -P -I%NCGGINCLUDEDIR% %in% | %TOOLDIR%ncgg)",
"mv %out[1]:dirname%/tables.H %out[2]%"
},
}
--[[
@echo HOSTNCG $SRCDIR/src/arch/$table/ncg/table
@mkdir -p \$(dir \$@)
@(cd $OBJDIR/src/arch/$1/ncg && $DESTDIR/bin/cpp -P -I$SRCDIR/src/arch/$1/ncg $SRCDIR/src/arch/$table/ncg/table | \
$DESTDIR/bin/ncgg) > /dev/null
@(cd $OBJDIR/src/arch/$1/ncg && mv tables.H tables.h)
--]]
-- Revision history
-- $Log$
-- Revision 1.1 2006-07-20 23:24:28 dtrg
-- First version in CVS.
--