]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: add git-contrib target
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 15 Apr 2017 04:16:23 +0000 (00:16 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 24 Apr 2017 01:47:28 +0000 (21:47 -0400)
meson.build
tools/meson-git-contrib.sh [new file with mode: 0644]

index 86a04a70ed226d993c4a1359b124d5ec8d4c1e88..035e2f0424f39914c1c82dd312049495f3d41763 100644 (file)
@@ -2269,3 +2269,11 @@ if git.found() and etags.found()
     input : all_files,
     command : [etags, '-o', '@OUTPUT@'] + all_files)
 endif
+
+if git.found()
+  meson_git_contrib_sh = find_program('tools/meson-git-contrib.sh')
+  custom_target(
+    'git-contrib',
+    output : 'git-contrib',
+    command : [meson_git_contrib_sh])
+endif
diff --git a/tools/meson-git-contrib.sh b/tools/meson-git-contrib.sh
new file mode 100644 (file)
index 0000000..c9d3775
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/sh -e
+
+git shortlog -s `git describe --abbrev=0`.. | \
+    cut -c8- | \
+    sed 's/ / /g' | \
+    awk '{ print $$0 "," }' | \
+    sort -u