Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add a "pkg" make target for source tarballs.

  • Loading branch information...
commit a0d60e993eb8b2334718d39bde8a01a7c082aa16 1 parent 12ba876
Keith Rarick authored
Showing with 15 additions and 1 deletion.
  1. +5 −1 Makefile
  2. +7 −0 pkg.sh
  3. +3 −0  rel-ver.sh
View
6 Makefile
@@ -1,4 +1,5 @@
program := beanstalkd
+rel_ver := $(shell ./rel-ver.sh)
export CFLAGS := -O2 -Wall -Werror
export LDFLAGS := -levent
@@ -29,11 +30,14 @@ tests/cutcheck.c: $(tests)
tests/cutcheck: tests/cutcheck.o $(objects) $(tests:.c=.o)
+pkg:
+ ./pkg.sh $(program) $(rel_ver) $(program)-$(rel_ver).tar.gz
+
clean:
rm -f $(program) *.o .*.d tests/*.o tests/cutcheck* core gmon.out
# .DELETE_ON_ERROR:
-.PHONY: all debug check clean
+.PHONY: all debug check pkg clean
# This tells make how to generate dependency files
.%.d: %.c
View
7 pkg.sh
@@ -0,0 +1,7 @@
+#!/bin/sh -e
+
+prog="$1"; shift
+vers="$1"; shift
+file="$1"; shift
+
+git-archive --format=tar --prefix="$prog-$vers/" "rel-$vers" | gzip > "$file"
View
3  rel-ver.sh
@@ -0,0 +1,3 @@
+#!/bin/sh -e
+
+git-tag -l | sort | tail -1 | cut -d - -f 2
Please sign in to comment.
Something went wrong with that request. Please try again.