aboutsummaryrefslogtreecommitdiffstats
path: root/genrule/genrule.go
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2015-06-17 14:20:06 -0700
committerColin Cross <ccross@android.com>2015-07-09 17:57:18 -0700
commit463a90e5872d6c8cf26a2302e7ad1586957304a0 (patch)
tree3d8001008839eff93d224dc2411be26842a7f9ad /genrule/genrule.go
parent3fde0c220aa0c43ef125f0156d27499622b59b61 (diff)
downloadbuild_soong-463a90e5872d6c8cf26a2302e7ad1586957304a0.tar.gz
build_soong-463a90e5872d6c8cf26a2302e7ad1586957304a0.tar.bz2
build_soong-463a90e5872d6c8cf26a2302e7ad1586957304a0.zip
use init functions to register module types, etc.
Instead of putting all the blueprint registrations in soong_build, put them all in init() functions. This puts the registration next to the implementation. Change-Id: Ide1a749518f5e9d1367a18ab3bb1d91da3310c76
Diffstat (limited to 'genrule/genrule.go')
-rw-r--r--genrule/genrule.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/genrule/genrule.go b/genrule/genrule.go
index 2052dfdd..a5a4c71f 100644
--- a/genrule/genrule.go
+++ b/genrule/genrule.go
@@ -20,9 +20,15 @@ import (
"github.com/google/blueprint"
"github.com/google/blueprint/pathtools"
+ "android/soong"
"android/soong/common"
)
+func init() {
+ soong.RegisterModuleType("gensrcs", GenSrcsFactory)
+ soong.RegisterModuleType("genrule", GenRuleFactory)
+}
+
var (
pctx = blueprint.NewPackageContext("android/soong/genrule")
)