123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- -- $Id$
- --
- -- This is the build file used to compile LLgen. It should be run through
- -- Prime Mover (copy supplied). See the READ_ME file for more information.
- include "c.pm"
- -- Where is LLgen going to be installed eventually? (Needs trailing slash.)
- PREFIX = PREFIX or "/usr/local/"
- -- Where's LLgen's staging area? (Don't change. Needs trailing slash.)
- INSTALLPATH = "bin/"
- LLgen = cprogram {
- CEXTRAFLAGS = '-DLIBDIR=\\"'..PREFIX..'share/LLgen\\" -DNON_CORRECTING',
- cfile "src/main.c",
- cfile "src/gencode.c",
- cfile "src/compute.c",
- cfile "src/check.c",
- cfile "src/reach.c",
- cfile "src/global.c",
- cfile "src/name.c",
- cfile "src/sets.c",
- cfile "src/alloc.c",
- cfile "src/machdep.c",
- cfile "src/cclass.c",
- cfile "src/savegram.c",
- -- These use pre-LLgen'd version of the files. If LLgen.g gets updated,
- -- they need rebuilding. Use the bootstrap script to do this.
-
- cfile "src/LLgen.c",
- cfile "src/Lpars.c",
- cfile "src/tokens.c",
- outputs = {"%U%/LLgen"},
- install = pm.install( INSTALLPATH.."bin/LLgen")
- }
- library = group {
- install = {
- pm.install("lib/rec", INSTALLPATH.."share/LLgen/rec"),
- pm.install("lib/incl", INSTALLPATH.."share/LLgen/incl"),
- pm.install("lib/nc_incl", INSTALLPATH.."share/LLgen/nc_incl"),
- pm.install("lib/nc_rec", INSTALLPATH.."share/LLgen/nc_rec"),
- }
- }
- manpage = group {
- install = {
- pm.install("doc/LLgen.1", INSTALLPATH.."man/man1/LLgen.1"),
- }
- }
- documentation = group {
- simple {
- outputs = {"%U%-%I%.ps.gz"},
- command = "refer -sA+T -p %in[1]% %in[2]% | groff -Tps -e -t -ms "..
- "| gzip -c9 > %out[1]%",
-
- file "doc/LLgen.refs",
- file "doc/LLgen.n",
-
- install = {
- pm.install(INSTALLPATH.."share/doc/LLgen/LLgen.ps.gz")
- }
- },
-
- simple {
- outputs = {"%U%-%I%.ps.gz"},
- command = "groff -Tps -e -t -p -ms %in% | gzip -c9 > %out[1]%",
-
- file "doc/LLgen_NCER.n",
-
- install = {
- pm.install(INSTALLPATH.."share/doc/LLgen/NCER.ps.gz")
- }
- },
- }
- -- Default rule: builds everything into the staging area, but does nothing
- -- else.
- default = group {
- LLgen, -- build LLgen itself
- library, -- copy over the library
- manpage, -- copy over the man page
- documentation, -- build the two white papers
- }
- -- This rule will build everything, and then install it to its final location.
- install = group {
- default,
-
- install = {
- "mkdir -p %PREFIX%",
- "(cd bin && tar cf - .) | (cd %PREFIX% && tar xvf -)"
- }
- }
|