123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132 |
- -- $Source$
- -- $State$
- local d = ROOTDIR.."lang/cem/cpp.ansi/"
- local extract_parameters = simple {
- outputs = {
- "%U%/pathlength.h",
- "%U%/errout.h",
- "%U%/idfsize.h",
- "%U%/numsize.h",
- "%U%/nparams.h",
- "%U%/ifdepth.h",
- "%U%/macbuf.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%/ln_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 allocd_header = simple {
- class = "allocd_header",
- command = {
- "%in[1]% < %in[2]% > %out[1]%"
- },
-
- file (d.."make.allocd")
- }
-
- local cfile_with_headers = cfile {
- class = "cfile_with_headers",
- dynamicheaders = {
- file (d),
- extract_parameters,
- allocd_header { outputs = {"%U%/replace.h"}, (d.."replace.str") },
- allocd_header { outputs = {"%U%/macro.h"}, (d.."macro.str") },
- lpars
- }
- }
-
- tool_cpp_ansi = cprogram {
- cfile_with_headers (d.."LLlex.c"),
- cfile_with_headers (d.."LLmessage.c"),
- cfile_with_headers (d.."ch3bin.c"),
- cfile_with_headers (d.."ch3mon.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.."skip.c"),
- cfile_with_headers (d.."tokenname.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 {
- CINCLUDES = {PARENT, d},
- tabgen (d.."char.tab")
- },
- cfile_with_headers {
- simple {
- outputs = {"%U%-next.c"},
- command = {
- "%in% > %out%"
- },
-
- file (d.."make.next"),
-
- file (d.."macro.str"),
- file (d.."replace.str"),
- }
- },
- lib_input,
- lib_assert,
- lib_alloc,
- lib_print,
- lib_system,
- lib_string,
-
- outputs = {"%U%/cpp.ansi"},
- install = {
- pm.install( BINDIR..PLATDEP.."/cpp.ansi"),
- pm.install(d.."ncpp.6", BINDIR.."/man/man6/cpp.ansi.6"),
- }
- }
|