nitc :: MakeRule :: defaultinit
core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
nitc :: MakeRule :: defaultinit
core :: Object :: defaultinit
core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
core :: Object :: native_class_name
The class name of the object in CString format.core :: Object :: output_class_name
Display class name on stdout (debug only).
# A rule that goes into a Makefile
class MakeRule
# Rule name
var name: String
# Is this rule a `.PHONY` one?
var is_phony: Bool = false is optional
# Rule dependencies
var deps = new Array[String]
# Rule lines
var lines = new Array[String]
# Render `self`
fun render: Writable do
var tpl = new Template
if is_phony then
tpl.addn ".PHONY: {name}"
end
tpl.add "{name}:"
if deps.not_empty then
tpl.add " {deps.join(" ")}"
end
tpl.add "\n"
for line in lines do
tpl.addn "\t{line}"
end
return tpl
end
end
src/nitpackage.nit:639,1--670,3