Skip to content

Commit

Permalink
Fix up release targets to work with svn rather than git.
Browse files Browse the repository at this point in the history
  • Loading branch information
dcantrell committed May 4, 2008
1 parent f69f991 commit 42597c0
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions Makefile
Expand Up @@ -4,33 +4,42 @@
#

DIST_FILES = AUTHORS COPYING README Makefile vpncwatch.c vpncwatch.h \
vpnc-watch.py ChangeLog proc.c net.c
vpnc-watch.py proc.c net.c

SRCS = vpncwatch.c proc.c net.c
OBJS = vpncwatch.o proc.o net.o

CC ?= gcc
CFLAGS = -D_GNU_SOURCE -O2 -Wall -Werror

REPO = https://vpncwatch.googlecode.com/svn

vpncwatch: $(OBJS)
$(CC) $(CFLAGS) -o $@ $(OBJS)

.c.o:
$(CC) $(CFLAGS) -c -o $@ $<

ChangeLog:
( GIT_DIR=.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog ; rm -f .changelog.tmp ) || ( touch ChangeLog ; echo 'git directory not found: installing possibly empty ChangeLog.' >&2)
svn log -v > ChangeLog

install:
@echo "No."

dist-gzip: ChangeLog vpncwatch
PKG=`./vpncwatch -V 2>/dev/null` ; \
rm -rf $$PKG ; \
mkdir -p $$PKG ; \
cp -p $(DIST_FILES) $$PKG ; \
tar -cf - $$PKG | gzip -9c > $$PKG.tar.gz ; \
rm -rf $$PKG
tag: vpncwatch
TAG=`./vpncwatch -V 2>/dev/null` ; \
svn copy $(REPO)/trunk $(REPO)/tags/$$TAG

dist-gzip: tag
TAG=`./vpncwatch -V 2>/dev/null` ; \
rm -rf $$TAG ; \
svn co $(REPO)/tags/$$TAG $$TAG ; \
cd $$TAG ; \
svn log -v > ChangeLog ; \
rm -rf .svn ; \
cd .. ; \
tar -cf - $$TAG | gzip -9c > $$TAG.tar.gz ; \
rm -rf $$TAG

clean:
-rm -rf $(OBJS) vpncwatch ChangeLog vpncwatch-$(VER)*

0 comments on commit 42597c0

Please sign in to comment.