mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2024-12-18 12:36:23 +00:00
User manual installation
... when running from a release tarball. Signed-off-by: Alexey Neyman <stilor@att.net>
This commit is contained in:
parent
56d785bd00
commit
bb6c97551f
23
Makefile.am
23
Makefile.am
@ -7,14 +7,33 @@ SUBDIRS = kconfig
|
||||
|
||||
bin_SCRIPTS = ct-ng
|
||||
CLEANFILES = $(bin_SCRIPTS)
|
||||
EXTRA_DIST = ct-ng.in bootstrap
|
||||
EXTRA_DIST = ct-ng.in bootstrap docs/ct-ng.1.in
|
||||
|
||||
man1_MANS = docs/ct-ng.1
|
||||
|
||||
# paths.sh generated by configure
|
||||
nobase_dist_pkgdata_DATA = $(verbatim_data) paths.sh
|
||||
|
||||
USER_MANUAL_FILES = \
|
||||
docs/manual/1_Introduction.md \
|
||||
docs/manual/2_Installation.md \
|
||||
docs/manual/3_Configuration.md \
|
||||
docs/manual/4_Building.md \
|
||||
docs/manual/5_Toolchain_Usage.md \
|
||||
docs/manual/6_Toolchain_Types.md \
|
||||
docs/manual/7_Contributing.md \
|
||||
docs/manual/8_Internals.md \
|
||||
docs/manual/9_Toolchain_Construction.md \
|
||||
docs/manual/A_Credits.md \
|
||||
docs/manual/B_Known_issues.md \
|
||||
docs/manual/C_Setup_OS.md \
|
||||
docs/manual/D_Tutorials_features.md
|
||||
|
||||
if INSTALL_USER_MANUAL
|
||||
doc_DATA = $(USER_MANUAL_FILES)
|
||||
else
|
||||
doc_DATA = docs/MANUAL_ONLINE
|
||||
endif
|
||||
|
||||
do_subst = ( @SED@ \
|
||||
-e 's,[@]docdir[@],$(docdir),g' \
|
||||
@ -30,4 +49,4 @@ docs/ct-ng.1: docs/ct-ng.1.in
|
||||
$(AM_V_GEN)$(MKDIR_P) docs && $(do_subst) < $< >$@-t && mv -f $@-t $@
|
||||
|
||||
dist-hook: maintainer/download-docs.sh
|
||||
$< $(top_distdir)
|
||||
$< $(top_distdir) $(USER_MANUAL_FILES)
|
||||
|
12
configure.ac
12
configure.ac
@ -4,7 +4,7 @@
|
||||
AC_PREREQ([2.67])
|
||||
|
||||
# FIXME Temporary hack until the next release (we'll switch to plain numeric tags then)
|
||||
# TBD need to quote sed expression
|
||||
# FIXME need to quote sed expression
|
||||
AC_INIT(
|
||||
[crosstool-NG],
|
||||
[m4_esyscmd_s([git describe --always --dirty | sed s,^crosstool-ng-,,])],
|
||||
@ -14,13 +14,16 @@ AC_INIT(
|
||||
AC_CONFIG_AUX_DIR([scripts])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
|
||||
# TBD try to use gnu strictness? Just add the missing files?
|
||||
# FIXME try to use gnu strictness? Just add the missing files?
|
||||
# Set automake defaults:
|
||||
# - Tarballs are compressed with xz and bzip2
|
||||
# - Object files are generated in a subdirectory (new default in automake)
|
||||
# - Request new tar format (old, tar-v7, breaks on long paths we have)
|
||||
AM_INIT_AUTOMAKE([-Wall -Werror foreign no-dist-gzip dist-xz dist-bzip2 subdir-objects tar-pax])
|
||||
|
||||
# Safety check per autoconf best practices
|
||||
AC_CONFIG_SRCDIR([ct-ng.in])
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Allow dummy --{en,dis}able-{static,shared}
|
||||
AC_ARG_ENABLE(
|
||||
@ -274,6 +277,11 @@ AH_BOTTOM([
|
||||
AX_BUILD_DATE_EPOCH(DATE, [%c])
|
||||
AC_SUBST([DATE])
|
||||
|
||||
AM_CONDITIONAL([INSTALL_USER_MANUAL], [test ! -f "${srcdir}/docs/MANUAL_ONLINE"])
|
||||
AC_MSG_CHECKING([if the manual needs to be installed])
|
||||
AM_COND_IF([INSTALL_USER_MANUAL], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
|
||||
|
||||
# FIXME Retire? We don't want to debug a version that has been mislabeled by a user
|
||||
# Decorate the version string per user-supplied version.sh, if any
|
||||
AS_IF(
|
||||
[test -f version.sh -a -x version.sh],
|
||||
|
@ -1 +1,4 @@
|
||||
http://crosstool-ng.github.io/docs
|
||||
This is a development version of crosstool-NG. It does not ship with
|
||||
a user manual; please refer to the online documentation at:
|
||||
|
||||
http://crosstool-ng.github.io/docs
|
||||
|
@ -1,6 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
distdir=${1:-.}
|
||||
# Usage:
|
||||
# download-docs.sh TOP-LEVEL-DIR MANUAL-FILES...
|
||||
distdir=${1}
|
||||
shift
|
||||
|
||||
# Configurable portions
|
||||
docs_git=https://github.com/crosstool-ng/crosstool-ng.github.io.git
|
||||
@ -12,7 +15,16 @@ git clone --depth=1 "${docs_git}" "${distdir}/site-docs"
|
||||
|
||||
# Copy the docs instead of the MANUAL_ONLINE placeholder
|
||||
mkdir -p "${distdir}/docs/manual"
|
||||
for i in "${distdir}/site-docs/${docs_subdir}/"*.md; do
|
||||
while [ -n "${1}" ]; do
|
||||
case "${1}" in
|
||||
docs/manual/*) ;;
|
||||
*) echo "Expected file not in docs/manual/: $1" >&2; exit 1;;
|
||||
esac
|
||||
input="${distdir}/site-docs/${docs_subdir}/${1#docs/manual/}"
|
||||
if [ ! -r "${input}" ]; then
|
||||
echo "Not found: ${1}" >&2
|
||||
exit 1
|
||||
fi
|
||||
awk '
|
||||
BEGIN { skip=0; }
|
||||
{
|
||||
@ -30,6 +42,18 @@ BEGIN { skip=0; }
|
||||
print $0
|
||||
}
|
||||
}
|
||||
' < "${i}" > "${distdir}/docs/manual/${i##*/}"
|
||||
' < "${input}" > "${distdir}/${1}"
|
||||
rm -f "${input}"
|
||||
shift
|
||||
done
|
||||
extra_md_pages=false
|
||||
for i in "${distdir}/site-docs/${docs_subdir}/"*.md; do
|
||||
if [ -r "${i}" ]; then
|
||||
echo "Unpackaged page in the manual: ${i#${distdir}/site-docs/${docs_subdir}/}"
|
||||
extra_md_files=true
|
||||
fi
|
||||
done
|
||||
if [ "${extra_md_files}" = "true" ]; then
|
||||
exit 1
|
||||
fi
|
||||
rm -rf "${distdir}/site-docs"
|
||||
|
@ -19,6 +19,7 @@ CT_UPDATE_SAMPLES := no
|
||||
# This part deals with the samples help entries
|
||||
|
||||
help-config::
|
||||
@echo ' show-config - show a brief overview of current configuration'
|
||||
@echo ' saveconfig - Save current config as a preconfigured target'
|
||||
|
||||
help-samples::
|
||||
|
Loading…
Reference in New Issue
Block a user