Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ htmldir = @htmldir@

default_loadpath = @default_loadpath@
enable_nls = @enable_nls@
enable_doc = @enable_doc@

all: $(TARGET) share/config tester mofiles docs

Expand Down Expand Up @@ -119,12 +120,12 @@ mofiles: _PHONY
@+(cd po && $(MAKE))

docs:
-@+(cd doc && $(MAKE))
-@+if $(enable_doc); then (cd doc && $(MAKE)); fi
man html:
-@+(cd doc && $(MAKE) $@-rec)
-@+if $(enable_doc); then (cd doc && $(MAKE) $@-rec); fi

INSTALLBINDIRS = $(DESTDIR)$(bindir)
INSTALLDATADIRS = $(DESTDIR)$(yashdatadir) $(DESTDIR)$(yashdatadir)/completion $(DESTDIR)$(yashdatadir)/initialization $(DESTDIR)$(mandir)
INSTALLDATADIRS = $(DESTDIR)$(yashdatadir) $(DESTDIR)$(yashdatadir)/completion $(DESTDIR)$(yashdatadir)/initialization@doc_mandir@
INSTALLDIRS = $(INSTALLBINDIRS) $(INSTALLDATADIRS) $(DESTDIR)$(htmldir)
install: install-binary install-data
install-strip: install-binary-strip install-data
Expand All @@ -138,14 +139,14 @@ install-data: share/config installdirs-data-main
$(INSTALL_DATA) share/$$file $(DESTDIR)$(yashdatadir)/$$file; \
done
@+if $(enable_nls); then (cd po && $(MAKE) $@); fi
@+(cd doc && $(MAKE) install-rec)
@+if $(enable_doc); then (cd doc && $(MAKE) install-rec); fi
install-html:
@+(cd doc && $(MAKE) $@-rec)
@+if $(enable_doc); then (cd doc && $(MAKE) $@-rec); fi
installdirs: installdirs-binary installdirs-data
installdirs-binary: $(INSTALLBINDIRS)
installdirs-data: installdirs-data-main
@+if $(enable_nls); then (cd po && $(MAKE) $@); fi
@+(cd doc && $(MAKE) installdirs-rec)
@+if $(enable_doc); then (cd doc && $(MAKE) installdirs-rec); fi
installdirs-data-main: $(INSTALLDATADIRS)
installdirs-html: $(DESTDIR)$(htmldir)
$(INSTALLDIRS):
Expand All @@ -163,7 +164,7 @@ uninstall-data:
-rmdir $(DESTDIR)$(yashdatadir)/initialization
-rmdir $(DESTDIR)$(yashdatadir)
@+if $(enable_nls); then (cd po && $(MAKE) $@); fi
@+(cd doc && $(MAKE) $@-rec)
@+if $(enable_doc); then (cd doc && $(MAKE) $@-rec); fi

DISTDIR = $(TARGET)-$(VERSION)
DISTS = $(DISTDIR).tar $(DISTDIR).tar.Z $(DISTDIR).tar.gz $(DISTDIR).tar.bz2 $(DISTDIR).tar.xz $(DISTDIR).shar $(DISTDIR).shar.gz $(DISTDIR).zip
Expand Down
12 changes: 12 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ enable_array="true"
enable_dirstack="true"
enable_double_bracket="true"
enable_nls="true"
enable_doc="true"
enable_help="true"
enable_history="true"
enable_lineedit="true"
Expand Down Expand Up @@ -103,6 +104,7 @@ parseenable() {
history) enable_history=$val ;;
lineedit) enable_lineedit=$val ;;
nls) enable_nls=$val ;;
doc) enable_doc=$val ;;
printf) enable_printf=$val ;;
socket) enable_socket=$val ;;
test) enable_test=$val ;;
Expand Down Expand Up @@ -195,6 +197,7 @@ Optional features:
--enable-history enable history
--enable-lineedit enable command line editing
--enable-nls enable native language support
--enable-doc enable building the documentation
--enable-printf enable the echo/printf builtins
--enable-socket enable socket redirection by /dev/tcp, /dev/udp
--enable-test enable the test builtin
Expand Down Expand Up @@ -1848,6 +1851,13 @@ case "${htmldir}" in
//) htmldir=/ ;;
esac

if ${enable_doc}
then
doc_mandir=' $(DESTDIR)$(mandir)'
else
doc_mandir=
fi

sed_subst_cmd="
s!@MAKE_INCLUDE@!${MAKE_INCLUDE}!g
s!@MAKE_SHELL@!${MAKE_SHELL}!g
Expand Down Expand Up @@ -1901,6 +1911,8 @@ s!@docdir@!${docdir}!g
s!@htmldir@!${htmldir}!g
s!@default_loadpath@!${default_loadpath}!g
s!@enable_nls@!${enable_nls}!g
s!@enable_doc@!${enable_doc}!g
s!@doc_mandir@!${doc_mandir}!g
"
printf '\n\n===== Output variables =====\n%s\n' "${sed_subst_cmd}" >&5

Expand Down
Loading