Skip to content

Commit

Permalink
build: Add dist script
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Persch committed Feb 26, 2021
1 parent a547212 commit 0f79e90
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Makefile.meson
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ NTHREADS = 1
NJOBS = -j$(NTHREADS)
NINJA = ninja $(NJOBS)

MESON = meson

#

all:
Expand All @@ -41,3 +43,9 @@ install:

uninstall:
$(NINJA) uninstall

dist:
$(MESON) dist --no-tests

distcheck:
$(MESON) dist
6 changes: 6 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,12 @@ if get_option('docs')
subdir('man')
endif

# Dist

meson.add_dist_script(
find_program('meson_changelog.sh'),
)

# Simple compat Makefile

makefile_conf = configuration_data()
Expand Down
33 changes: 33 additions & 0 deletions meson_changelog.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/env bash
# Copyright © 2021 Christian Persch
#
# This programme is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or (at your
# option) any later version.
#
# This programme is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this programme. If not, see <https://www.gnu.org/licenses/>.

set -e

top_srcdir="$MESON_SOURCE_ROOT"
top_builddir="MESON_BUILD_ROOT"
top_distdir="$MESON_DIST_ROOT"

if ! test -e "${top_srcdir}"/.git; then
echo "Must be run from gnome-terminal git checkout"
exit 1
fi

if ! test -e "${top_distdir}"; then
echo "Must be run from 'meson dist'"
exit 1
fi

GIT_DIR="${top_srcdir}"/.git git log --stat > "${top_distdir}"/ChangeLog

0 comments on commit 0f79e90

Please sign in to comment.