Browse Source

Remove obsolete build_manpages target and markdown type

They're based on obsolete mkit.ini structure and is not used in any known
project.  That said, at least build_manpages will be added in future,
most probably in form of plugin, once plugin structure is figured out.
(Stay tuned, but don't hold your breath!)
Alois Mahdal 7 years ago
parent
commit
c10e5a8440
3 changed files with 0 additions and 50 deletions
  1. 0
    46
      src/include/build.sh
  2. 0
    1
      src/include/mkit.sh
  3. 0
    3
      src/mkit.mk

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

27
     local ftype=$1      # file/builder type
27
     local ftype=$1      # file/builder type
28
     case $ftype in
28
     case $ftype in
29
         MKIT_COMMON)    _expand_tokens "tokens" ;;
29
         MKIT_COMMON)    _expand_tokens "tokens" ;;
30
-        markdown)       _expand_includes | _expand_tokens "tokens" ;;
31
         rpmstuff)       _expand_tokens "tokens" "rpmstuff:tokens" ;;
30
         rpmstuff)       _expand_tokens "tokens" "rpmstuff:tokens" ;;
32
         debstuff)       _expand_tokens "tokens" "debstuff:tokens" ;;
31
         debstuff)       _expand_tokens "tokens" "debstuff:tokens" ;;
33
         *)              die "unknown file type: $ftype" ;;
32
         *)              die "unknown file type: $ftype" ;;
34
     esac
33
     esac
35
 }
34
 }
36
 
35
 
37
-_expand_includes() {
38
-    #
39
-    # Expand include directives
40
-    #
41
-    # Expand e.g. `<!-- include4: foo.sh -->` to include code of foo.sh
42
-    #
43
-    perl -we '
44
-        use strict;
45
-        my $text;
46
-        while (<>) {
47
-            chomp;
48
-            if (m/<!-- include4: (\S+) -->/) {
49
-                open my $fh, $1 or warn "cannot find: $1";
50
-                my $text = do { local($/); <$fh> };
51
-                close $fh;
52
-                $text =~ s/^(.)/    $1/gm;
53
-                chomp $text;
54
-                print "$text\n";
55
-            } else {
56
-                print "$_\n";
57
-            }
58
-        }
59
-    '
60
-}
61
-
62
 _expand_tokens() {
36
 _expand_tokens() {
63
     #
37
     #
64
     # Read stdin, expanding tokens from sections $@
38
     # Read stdin, expanding tokens from sections $@
99
     #
73
     #
100
     local dstpath=$1    # destination path
74
     local dstpath=$1    # destination path
101
     case $dstpath in
75
     case $dstpath in
102
-        *.md) echo markdown    ;;
103
         *)    echo MKIT_COMMON ;;
76
         *)    echo MKIT_COMMON ;;
104
     esac
77
     esac
105
 }
78
 }
126
        done
99
        done
127
 }
100
 }
128
 
101
 
129
-build_manpages() {
130
-    #
131
-    # Build manpages using ronn
132
-    #
133
-    local manfile   # each manual file listed in '[files:man]'
134
-    local mdfile    # each source markdown file
135
-    if command -v ronn >/dev/null; then
136
-        ini lskeys "files:man" \
137
-          | while read -r manfile; do
138
-                mdfile="$manfile.md"
139
-                ronn -r "$mdfile"
140
-                rec_built "$manfile"
141
-            done
142
-    else
143
-        echo "ronn is not installed"
144
-        return 1
145
-    fi
146
-}
147
-
148
 clean() {
102
 clean() {
149
     #
103
     #
150
     # Clean up tree after building
104
     # Clean up tree after building

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

35
     # List valid routes
35
     # List valid routes
36
     #
36
     #
37
     echo build
37
     echo build
38
-    echo build_manpages
39
     echo clean
38
     echo clean
40
     echo debstuff
39
     echo debstuff
41
     echo dist
40
     echo dist

+ 0
- 3
src/mkit.mk View File

8
 build:
8
 build:
9
 	@"$(MKIT_DIR)"/make build
9
 	@"$(MKIT_DIR)"/make build
10
 
10
 
11
-manpages: build
12
-	@"$(MKIT_DIR)"/make build_manpages
13
-
14
 clean:
11
 clean:
15
 	@"$(MKIT_DIR)"/make clean
12
 	@"$(MKIT_DIR)"/make clean
16
 
13