Repair broken JCL construction for a few switches

jira-search.sh
--------------
  o Declare more array vars for gathering input.
  o Replace declare with local within functions.
  o Refactored arg detection to set parsting state variables.
  o Replace inline AND/OR construction with list join on and/or.
    Too many edge cases can leave a AND/OR token prefix or suffix
    breaking the JCL query line.
  o do_labels logic updated to handle --label-is-empty and construct
    --excl and --incl arguments as standalone paren wrapped terms.

jira-search/getopt/detect-modifiers.sh
--------------------------------------
  o when -and, -or, -in, -excl, -incl, -is-empty switch modifiers are
    detected set global switch parsing state variables.

Signed-off-by: Joey Armstrong <jarmstrong@linuxfoundation.org>
Change-Id: Ib67bbf1a6389c8d9e9a3ac70911429118228c683
diff --git a/jira/makefile b/jira/makefile
index 02f5ad5..ab4c3eb 100644
--- a/jira/makefile
+++ b/jira/makefile
@@ -1,8 +1,37 @@
 # -*- makefile -*-
+## -----------------------------------------------------------------------
+## -----------------------------------------------------------------------
 
+jira-search	= bin/jira-search.sh
+
+## -----------------------------------------------------------------------
+## -----------------------------------------------------------------------
 all:
 
+## -----------------------------------------------------------------------
+## -----------------------------------------------------------------------
 view :
 	pandoc README.md | lynx --stdin
 
+## -----------------------------------------------------------------------
+## -----------------------------------------------------------------------
+query-args	:= $(null)
+# query-args	+= --dry-run
+query-args	+= --opencord
+query-args	+= --or
+query-args	+= --label-is-empty
+query-args	+= --label   'python'
+query-args	+= --label-excl 'foobar'
+query-args	+= --text-or 'python'
+
+query :
+	$(jira-search) $(query-args) 2>&1 | tee log
+
+## -----------------------------------------------------------------------
+## -----------------------------------------------------------------------
+help :
+	@printf 'Usage: make [options] [target] ...'
+	@printf '  %-33.33s %s\n' 'query'  'Convenience target for jira queries'
+	@printf '  %-33.33s %s\n' 'view'   'Render README.md for local viewing'
+
 # [EOF]