[Pm-utils] Makefile and create-archive

Peter Jones pjones at redhat.com
Mon May 1 08:20:42 PDT 2006


On Mon, 2006-05-01 at 10:57 -0400, Peter Jones wrote:
> On Mon, 2006-05-01 at 10:47 -0400, Peter Jones wrote:
> ...
> 
> Actually this is the patch in CVS instead:

Ok, I'm going to quit being dumb in just a moment, honest ;)

Instead of this, I've done it so that you can do:

make test-archive

and it'll make pm-utils-HEAD.tar.gz , or you can do:

make VERSION=0.17 test-archive

and it'll make pm-utils-0.17.tar.gz .  Here's the patch:

Index: Makefile
===================================================================
RCS file: /cvs/pm-utils/pm-utils/Makefile,v
retrieving revision 1.29
diff -u -p -r1.29 Makefile
--- Makefile    1 May 2006 14:36:01 -0000       1.29
+++ Makefile    1 May 2006 15:18:56 -0000
@@ -14,7 +14,11 @@ libdir=$(prefix)/lib

 CVSROOT:=$(shell cat CVS/Root 2>/dev/null || :)

-CVSTAG = pm-utils-$(subst .,-,$(VERSION))
+ifeq ($(VERSION), HEAD)
+       CVSTAG ?= HEAD
+else
+       CVSTAG ?= pm-utils-$(subst .,-,$(VERSION))
+endif

 all:

@@ -65,6 +69,13 @@ create-archive:

 archive: clean tag-archive create-archive

+test-archive: clean
+       @if [ "$(origin VERSION)" == "command line" ]; then     \
+               $(MAKE) VERSION=$(VERSION) create-archive ;     \
+       else                                                    \
+               $(MAKE) VERSION=HEAD create-archive ;           \
+       fi
+
 clean:

 dummy:

-- 
  Peter, no longer trying to be clever.



More information about the Pm-utils mailing list