First version in CVS.
authordtrg <none@none>
Thu, 20 Jul 2006 23:04:28 +0000 (23:04 +0000)
committerdtrg <none@none>
Thu, 20 Jul 2006 23:04:28 +0000 (23:04 +0000)
util/opt/pmfile [new file with mode: 0644]

diff --git a/util/opt/pmfile b/util/opt/pmfile
new file mode 100644 (file)
index 0000000..cb9c0cb
--- /dev/null
@@ -0,0 +1,97 @@
+-- $Source$
+-- $State$
+
+local d = ROOTDIR.."util/opt/"
+
+local cfile_with_headers = cfile {
+       class = "cfile_with_headers",
+       dynamicheaders = {
+               file (d),
+       }
+}
+
+local local_tool_opt = cprogram {
+       class = "opt_rule",
+       
+       cfile_with_headers (d.."main.c"),
+       cfile_with_headers (d.."getline.c"),
+       cfile_with_headers (d.."lookup.c"),
+       cfile_with_headers (d.."var.c"),
+       cfile_with_headers (d.."process.c"),
+       cfile_with_headers (d.."backward.c"),
+       cfile_with_headers (d.."util.c"),
+       cfile_with_headers (d.."alloc.c"),
+       cfile_with_headers (d.."putline.c"),
+       cfile_with_headers (d.."cleanup.c"),
+       cfile_with_headers (d.."peephole.c"),
+       cfile_with_headers (d.."flow.c"),
+       cfile_with_headers (d.."tes.c"),
+       cfile_with_headers (d.."reg.c"),        
+       
+       cfile_with_headers {
+               simple {
+                       outputs = {"%U%-pop_push.c"},
+                       command = {
+                               "awk -f %in[1]% < %in[2]% > %out%"
+                       },
+                       
+                       file (d.."pop_push.awk"),
+                       file (ROOTDIR.."etc/em_table")
+               }
+       },
+
+       cfile_with_headers {
+               simple {
+                       outputs = {"%U%-pattern.c"},
+                       command = {
+                               "%in[1]% %in[2]% > %out%"
+                       },
+
+                       cprogram {
+                               CLIBRARIES = {"-lfl"},
+                               
+                               cfile {
+                                       yacc {
+                                               file (d.."mktab.y")
+                                       },
+                                       
+                                       dynamicheaders = {
+                                               file (d),
+                                               flex {
+                                                       file (d.."scan.l")
+                                               }
+                                       },
+                               },
+                               
+                               lib_em_data,
+                       },
+
+                       file (d.."patterns")
+               }
+       },
+
+       lib_em_data,
+       lib_assert,
+       lib_print,
+       lib_alloc,
+       lib_system,
+       lib_string,
+       
+       outputs = {"%U%/em_opt"},
+}
+
+tool_opt = group {
+       group {
+               local_tool_opt,
+               install = pm.install(BINDIR.."lib.bin/em_opt")
+       },
+       
+       group {
+               CEXTRAFLAGS = "-DGLOBAL_OPT",
+               local_tool_opt,
+               install = pm.install(BINDIR.."lib.bin/em_opt2")
+       },
+}
+
+-- Revision history
+-- $Log: genmakefile,v