Skip to content
Snippets Groups Projects
Commit 2690defc authored by Albert Gräf's avatar Albert Gräf
Browse files

Add pre-generated docs to the source tarball.

This adds all generated markdown and html docs for all target systems in
packages/gendoc to the self-contained distribution tarball (`make
dist`), so that no special tools like python-markdown are required to
build the package.
parent c5ac63f3
No related branches found
No related tags found
1 merge request!835Add document generation for ReadMe.html and Welcome.html
...@@ -243,6 +243,8 @@ submodules = $(sort $(shell test -d .git && (git config --file .gitmodules --get ...@@ -243,6 +243,8 @@ submodules = $(sort $(shell test -d .git && (git config --file .gitmodules --get
dist: $(debsrc) dist: $(debsrc)
# Determine the version number of this build. We get this from m_pd.h.
PD_L2ORK_VERSION := $(shell grep PD_L2ORK_VERSION pd/src/m_pd.h | sed 's|^.define *PD_L2ORK_VERSION *"\(.*\)".*|\1|')
# Determine the build version which needs git to be computed, so we can't do # Determine the build version which needs git to be computed, so we can't do
# it in a stand-alone build from a tarball. # it in a stand-alone build from a tarball.
PD_BUILD_VERSION := $(shell test -d .git && (git log -1 --format=%cd --date=short | sed -e 's/-//g'))-rev.$(shell test -d .git && git rev-parse --short HEAD) PD_BUILD_VERSION := $(shell test -d .git && (git log -1 --format=%cd --date=short | sed -e 's/-//g'))-rev.$(shell test -d .git && git rev-parse --short HEAD)
...@@ -259,6 +261,12 @@ $(debsrc): ...@@ -259,6 +261,12 @@ $(debsrc):
# Pre-generate and put s_version.h into the tarball (see above; the build # Pre-generate and put s_version.h into the tarball (see above; the build
# version is generated using git which can't be done outside the git repo). # version is generated using git which can't be done outside the git repo).
sed 's|^\(#define PD_BUILD_VERSION "\).*"|\1$(PD_BUILD_VERSION)"|' pd/src/s_version.h.in > $(debdist)/pd/src/s_version.h sed 's|^\(#define PD_BUILD_VERSION "\).*"|\1$(PD_BUILD_VERSION)"|' pd/src/s_version.h.in > $(debdist)/pd/src/s_version.h
# Pre-generate the markdown and html docs so that they will be included in the
# source. This means that we don't need any special tools as a build
# dependency, which makes live a lot easier.
make -C packages/gendoc version="$(PD_L2ORK_VERSION)" build_version="$(PD_BUILD_VERSION)"
mv packages/gendoc/{ReadMe,Welcome}-*.{md,html} $(debdist)/packages/gendoc
make -C packages/gendoc clean
# Create the source tarball. # Create the source tarball.
tar cfz $(debsrc) $(debdist) tar cfz $(debsrc) $(debdist)
rm -rf $(debdist) rm -rf $(debdist)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment