| 1 | # Copyright (C) 2016-2022 Free Software Foundation, Inc.
|
|---|
| 2 |
|
|---|
| 3 | # This program is free software: you can redistribute it and/or modify
|
|---|
| 4 | # it under the terms of the GNU General Public License as published by
|
|---|
| 5 | # the Free Software Foundation, either version 3 of the License, or
|
|---|
| 6 | # (at your option) any later version.
|
|---|
| 7 |
|
|---|
| 8 | # This program is distributed in the hope that it will be useful,
|
|---|
| 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 11 | # GNU General Public License for more details.
|
|---|
| 12 |
|
|---|
| 13 | # You should have received a copy of the GNU General Public License
|
|---|
| 14 | # along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|---|
| 15 |
|
|---|
| 16 | info_TEXINFOS = doc/sed.texi
|
|---|
| 17 | doc_sed_TEXINFOS = doc/config.texi doc/version.texi doc/fdl.texi
|
|---|
| 18 | dist_man_MANS = doc/sed.1
|
|---|
| 19 | dist_noinst_DATA = doc/sed.x doc/sed-dummy.1
|
|---|
| 20 | HELP2MAN = $(top_srcdir)/build-aux/help2man
|
|---|
| 21 | SEDBIN = sed/sed
|
|---|
| 22 | EXTRA_DIST += doc/dummy-man
|
|---|
| 23 |
|
|---|
| 24 | AM_MAKEINFOHTMLFLAGS = --no-split
|
|---|
| 25 |
|
|---|
| 26 | ## Use the distributed man pages if cross compiling or lack perl
|
|---|
| 27 | if CROSS_COMPILING
|
|---|
| 28 | run_help2man = $(SHELL) $(srcdir)/doc/dummy-man
|
|---|
| 29 | else
|
|---|
| 30 | ## Graceful degradation for systems lacking perl.
|
|---|
| 31 | if HAVE_PERL
|
|---|
| 32 | if BOLD_MAN_REFS
|
|---|
| 33 | help2man_OPTS=--bold-refs
|
|---|
| 34 | endif
|
|---|
| 35 | run_help2man = $(PERL) -- $(HELP2MAN) $(help2man_OPTS)
|
|---|
| 36 | else
|
|---|
| 37 | run_help2man = $(SHELL) $(srcdir)/doc/dummy-man
|
|---|
| 38 | endif
|
|---|
| 39 | endif
|
|---|
| 40 |
|
|---|
| 41 | doc/sed.1: sed/sed$(EXEEXT) .version $(srcdir)/doc/sed.x
|
|---|
| 42 | $(AM_V_GEN)$(MKDIR_P) doc
|
|---|
| 43 | $(AM_V_at)rm -rf $@ $@-t
|
|---|
| 44 | $(AM_V_at)$(run_help2man) \
|
|---|
| 45 | --info-page=sed \
|
|---|
| 46 | --include $(srcdir)/doc/sed.x \
|
|---|
| 47 | --output=$@-t \
|
|---|
| 48 | $(SEDBIN) \
|
|---|
| 49 | && chmod a-w $@-t \
|
|---|
| 50 | && mv $@-t $@
|
|---|