123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- -- $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 {
- CINCLUDES = {PARENT, d},
- tabgen (d.."char.tab")
- },
-
- lib_assert,
- lib_print,
- lib_alloc,
- lib_system,
- lib_string,
-
- outputs = {"%U%/cpp"},
- install = {
- pm.install("%BINDIR%%PLATDEP%/cpp"),
- pm.install(d.."cpp.6", "%BINDIR%man/man6/cpp.6")
- }
- }
- -- Revision history
- -- $Log$
- -- Revision 1.4 2006-10-15 00:28:11 dtrg
- -- Updated to the version 0.1 of Prime Mover (which involves some syntax changes).
- --
- -- Revision 1.3 2006/07/22 20:58:27 dtrg
- -- cpp now gets installed in the right place.
- --
- -- Revision 1.2 2006/07/22 12:27:31 dtrg
- -- Removed a huge, ancient comment dating from the genmake days.
- --
- -- Revision 1.1 2006/07/20 23:24:28 dtrg
- -- First version in CVS.
|