-- $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 %out[1]:dirname% && %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 {
		CINCLUDES = {PARENT, d},
		ith { makeheaders, i = 1 }
	},
	cfile {
		CINCLUDES = {PARENT, 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"),
		pm.install(d.."ack.1.X", "%BINDIR%man/man1/ack.1")
	}
}

-- Revision history
-- $Log$
-- Revision 1.3  2007-02-25 12:48:06  dtrg
-- Now installs the man page.
--
-- Revision 1.2  2006/10/15 00:28:12  dtrg
-- Updated to the version 0.1 of Prime Mover (which involves some syntax changes).
--
-- Revision 1.1  2006/07/20 23:18:18  dtrg
-- First version in CVS.
--
