Skip to content

Commit

Permalink
Refactored pre-requisites of build_man (#13853)
Browse files Browse the repository at this point in the history
  • Loading branch information
ariel-anieli authored Sep 26, 2024
1 parent 0fb34f9 commit ae49e4e
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -304,17 +304,15 @@ dialyze: compile $(PLT)

build_man: man/iex.1 man/elixir.1

man/iex.1:
$(Q) cp man/iex.1.in man/iex.1
$(Q) sed -i.bak "/{COMMON}/r man/common" man/iex.1
$(Q) sed -i.bak "/{COMMON}/d" man/iex.1
$(Q) rm -f man/iex.1.bak

man/elixir.1:
$(Q) cp man/elixir.1.in man/elixir.1
$(Q) sed -i.bak "/{COMMON}/r man/common" man/elixir.1
$(Q) sed -i.bak "/{COMMON}/d" man/elixir.1
$(Q) rm -f man/elixir.1.bak
define BUILD_MANPAGES
man/$(APP).1:
$(Q) cp man/$(APP).1.in man/$(APP).1
$(Q) sed -i.bak "/{COMMON}/r man/common" man/$(APP).1
$(Q) sed -i.bak "/{COMMON}/d" man/$(APP).1
$(Q) rm -f man/$(APP).1.bak
endef

$(foreach APP, elixir iex, $(eval $(BUILD_MANPAGES)))

clean_man:
rm -f man/elixir.1
Expand Down

0 comments on commit ae49e4e

Please sign in to comment.