Browse Source

Add command-line help to the bootstrap plugin

Loïc Hoguin 10 years ago
parent
commit
614b26aed3
1 changed files with 19 additions and 0 deletions
  1. 19 0
      plugins/bootstrap.mk

+ 19 - 0
plugins/bootstrap.mk

@@ -1,4 +1,21 @@
+# Copyright (c) 2014, Loïc Hoguin <essen@ninenines.eu>
+# This file is part of erlang.mk and subject to the terms of the ISC License.
+
+.PHONY: bootstrap bootstrap-lib bootstrap-rel new list-templates
+
+# Core targets.
+
+help::
+	@printf "%s\n" "" \
+		"Bootstrap targets:" \
+		"  bootstrap          Generate a skeleton of an OTP application" \
+		"  bootstrap-lib      Generate a skeleton of an OTP library" \
+		"  bootstrap-rel      Generate the files needed to build a release" \
+		"  new t=TPL n=NAME   Generate a module NAME based on the template TPL" \
+		"  bootstrap-lib      List available templates"
+
 # Bootstrap templates.
+
 bs_appsrc = "{application, $(PROJECT), [" \
 	"	{description, \"\"}," \
 	"	{vsn, \"0.1.0\"}," \
@@ -206,6 +223,8 @@ tpl_ranch_protocol = "-module($(n))." \
 	"loop(State) ->" \
 	"	loop(State)."
 
+# Plugin-specific targets.
+
 bootstrap:
 ifneq ($(wildcard src/),)
 	$(error Error: src/ directory already exists)