summaryrefslogtreecommitdiff
path: root/util/meson_aux/extra-dist-cmd.sh
blob: 1c61ed13156ecb1ba0edfabc0d2ea3673bd2abde (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh -e

# External command, intended to be called with meson.add_dist_script() in meson.build

# extra-dist-cmd.sh <root_source_dir> <root_build_dir>

# Meson does not preserve timestamps on distributed files.
# But this script preserves the timestamps on libstdc++.tag.

# Make a ChangeLog file for distribution.
git --git-dir="$1/.git" --work-tree="$1" log --no-merges --date=short --max-count=200 \
    --pretty='tformat:%cd  %an  <%ae>%n%n  %s%n%w(0,0,2)%+b' > "$MESON_DIST_ROOT/ChangeLog"

# Distribute the libstdc++.tag file in addition to the files in the local git clone.
# -p == --preserve=mode,ownership,timestamps (Posix does not support long options.)
# Only the preservation of timestamps is essential here.
cp -p "$2/libstdc++.tag" "$MESON_DIST_ROOT/doctags/"