Skip to content

Commit

Permalink
Moved rule for /tmp/help
Browse files Browse the repository at this point in the history
  • Loading branch information
fadado committed Nov 5, 2018
1 parent 5a5aa16 commit 66a4720
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
18 changes: 17 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ all: check

.PHONY: clean clobber install uninstall

clean:
clean::
rm -f tests/*/generated/* jqt.1.gz

clobber: clean
Expand Down Expand Up @@ -139,6 +139,22 @@ help:
echo ' datadir = /usr/local/share'; \
echo ' mandir = /usr/local/share/man'

########################################################################
# Generate help text
########################################################################

# Independent target: helps generating text for `jqt -h`
# Needs explicit call: `make /tmp/help`
/tmp/help: docs/content/help.text
$(info ==> $@)
jqt -P MarkDown -Idocs < $< \
| pandoc --from markdown --to plain - \
| sed '1,7b;/^$$/d;s/_\([A-Z]\+\)_/\1/g;/^[^A-Z]/s/^/ /' \
> $@

clean::
@rm -f /tmp/help

########################################################################
# Tests
########################################################################
Expand Down
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ include make.d/tools.make
# ======================================================================

########################################################################
include project.make
include config.make
#
# Project specific makefile. All the previous modules are expected to be
# independent, valid for any project without any change.
Expand Down
16 changes: 0 additions & 16 deletions docs/project.make → docs/config.make
Original file line number Diff line number Diff line change
Expand Up @@ -67,20 +67,4 @@ clean::
clobber::
@rm -f $(ManPage)

########################################################################
# Generate help text
########################################################################

# Independent target: helps generating text for `jqt -h`
# Needs explicit call: `make /tmp/help`
/tmp/help: $(Content)/help.text
$(info ==> $@)
@jqt -P MarkDown -I$(Content) < $< \
| pandoc --from markdown --to plain - \
| sed '1,7b;/^$$/d;s/_\([A-Z]\+\)_/\1/g;/^[^A-Z]/s/^/ /' \
> $@

clean::
@rm -f /tmp/help

# vim:ai:sw=8:ts=8:noet:fileencoding=utf8:syntax=make

0 comments on commit 66a4720

Please sign in to comment.