Browse Source

Add data-sampler target

Alois Mahdal 7 years ago
parent
commit
35762cc0ef
3 changed files with 38 additions and 1 deletions
  1. 33
    0
      src/include/build.sh
  2. 1
    0
      src/include/mkit.sh
  3. 4
    1
      src/mkit.mk

+ 33
- 0
src/include/build.sh View File

87
     '
87
     '
88
 }
88
 }
89
 
89
 
90
+_mkit_data() {
91
+    #
92
+    # Build sampler showing all token values
93
+    #
94
+    local token
95
+    local section
96
+    local sections
97
+    sections=()
98
+    ini lskeys tokens | grep -q . && sections=(tokens)
99
+    sections+=( $(ini lssect | grep ':tokens$') )
100
+    {
101
+        echo "(builtin):"
102
+        echo "  x_MKIT_PROJ_NAME__ => '__MKIT_PROJ_NAME__'"
103
+        echo "  x_MKIT_PROJ_CODENAME__ => '__MKIT_PROJ_CODENAME__'"
104
+        echo "  x_MKIT_PROJ_LICENSE__ => '__MKIT_PROJ_LICENSE__'"
105
+        echo "  x_MKIT_PROJ_PKGNAME__ => '__MKIT_PROJ_PKGNAME__'"
106
+        echo "  x_MKIT_PROJ_TAGLINE__ => '__MKIT_PROJ_TAGLINE__'"
107
+        echo "  x_MKIT_PROJ_MAINTAINER__ => '__MKIT_PROJ_MAINTAINER__'"
108
+        echo "  x_MKIT_PROJ_VCS_BROWSER__ => '__MKIT_PROJ_VCS_BROWSER__'"
109
+        echo "  x_MKIT_PROJ_GIT_LASTHASH__ => '__MKIT_PROJ_GIT_LASTHASH__'"
110
+        echo "  x_MKIT_PROJ_VERSION__ => '__MKIT_PROJ_VERSION__'"
111
+        echo "  x_MKIT_SELF_VERSION__ => '__MKIT_SELF_VERSION__'"
112
+        for section in "${sections[@]}"; do
113
+            echo "$section:"
114
+            for token in $(ini lskeys "$section"); do
115
+                echo "  x${token:1} => '$token'"
116
+            done
117
+        done
118
+    } \
119
+      | __expand_tokens "MKIT_BUILTIN" "${sections[@]}" \
120
+      | sed '/^  x/ s|x|_|'
121
+}
122
+
90
 build() {
123
 build() {
91
     #
124
     #
92
     # Add meat to all skeletons
125
     # Add meat to all skeletons

+ 1
- 0
src/include/mkit.sh View File

34
     #
34
     #
35
     # List valid routes
35
     # List valid routes
36
     #
36
     #
37
+    echo _mkit_data
37
     echo build
38
     echo build
38
     echo clean
39
     echo clean
39
     echo debstuff
40
     echo debstuff

+ 4
- 1
src/mkit.mk View File

5
 
5
 
6
 all: build
6
 all: build
7
 
7
 
8
+_mkit_data:
9
+	@"$(MKIT_DIR)"/make _mkit_data
10
+
8
 build:
11
 build:
9
 	@"$(MKIT_DIR)"/make build
12
 	@"$(MKIT_DIR)"/make build
10
 
13
 
50
 vbump_z:
53
 vbump_z:
51
 	@"$(MKIT_DIR)"/make vbump_z
54
 	@"$(MKIT_DIR)"/make vbump_z
52
 
55
 
53
-.PHONY: all clean dist rpmstuff install uninstall release release_x release_y release_z vbump vbump_x vbump_y vbump_z
56
+.PHONY: all _mkit_data clean dist rpmstuff install uninstall release release_x release_y release_z vbump vbump_x vbump_y vbump_z