Skip to content

Commit

Permalink
Makefile: set -e and be portable with sed usage
Browse files Browse the repository at this point in the history
  • Loading branch information
zship committed Aug 28, 2013
1 parent 04414c1 commit cb7c28d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Makefile
Expand Up @@ -8,10 +8,11 @@ DOC_DEST = $(DOC_SRC:doc/%.1.md=dist/man/man1/%.1)
# perl: write a more precise iso8601 date (2013-08-17 instead of "August 2013")
dist/man/man1/%.1: doc/%.1.md
@mkdir -p $(@D)
@cat $< \
@set -e; \
cat $< \
| ./_make/doc-preprocess - \
| ronn --roff --manual="AMD Manual" --organization="$(NAME) $(VERSION)" --pipe \
| sed -r "s/\\\\'/\\\\(aq/g" \
| sed -E "s/\\\\'/\\\\(aq/g" \
| perl -pe 's/^(.TH ".*?" ".*?" ").*?(".*)/$${1}$(DATE)$$2/' \
> $@
@echo "$< -> $@"
Expand Down

0 comments on commit cb7c28d

Please sign in to comment.