Permalink
Browse files

Add a "pkg" make target for source tarballs.

  • Loading branch information...
1 parent 12ba876 commit a0d60e993eb8b2334718d39bde8a01a7c082aa16 Keith Rarick committed Oct 27, 2007
Showing with 15 additions and 1 deletion.
  1. +5 −1 Makefile
  2. +7 −0 pkg.sh
  3. +3 −0 rel-ver.sh
View
@@ -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
@@ -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
@@ -0,0 +1,3 @@
+#!/bin/sh -e
+
+git-tag -l | sort | tail -1 | cut -d - -f 2

0 comments on commit a0d60e9

Please sign in to comment.