]> granicus.if.org Git - ipset/commitdiff
New 'release' target to make life simpler
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Wed, 19 Aug 2009 10:14:12 +0000 (12:14 +0200)
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Wed, 19 Aug 2009 10:14:12 +0000 (12:14 +0200)
Makefile

index eae8b20ca6cadf8e53854e23f1c0dbc87e153002..d663f92a2417881703c901b565bd6d9cc8a902cf 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,7 @@
 ######################################################################
 
 ifndef KERNEL_DIR
-KERNEL_DIR=/usr/src/linux
+KERNEL_DIR=/lib/modules/`uname -r`/build
 endif
 ifndef KBUILD_OUTPUT
 KBUILD_OUTPUT=$(KERNEL_DIR)
@@ -105,6 +105,11 @@ clean: $(EXTRA_CLEANS)
        rm -rf $(PROGRAMS) $(SHARED_LIBS) *.o *~ tests/*~
        [ -f $(KERNEL_DIR)/net/ipv4/netfilter/Config.in ] || (cd kernel; make -C $(KERNEL_DIR) M=`pwd` clean)
 
+release: clean
+       cp -a . /tmp/ipset-$(IPSET_VERSION)
+       tar cjf ../ipset-$(IPSET_VERSION).tar.bz2 -C /tmp --exclude=.git ipset-$(IPSET_VERSION)
+       rm -rf /tmp/ipset-$(IPSET_VERSION)
+
 #The ipset(8) self
 ipset.o: ipset.c ipset.h
        $(CC) $(CFLAGS) -DIPSET_VERSION=\"$(IPSET_VERSION)\" -DIPSET_LIB_DIR=\"$(IPSET_LIB_DIR)\" -c -o $@ $<