source: trunk/packages/xen-common/xen-common/tools/libaio/Makefile @ 34

Last change on this file since 34 was 34, checked in by hartmans, 17 years ago

Add xen and xen-common

File size: 1.1 KB
Line 
1NAME=libaio
2SPECFILE=$(NAME).spec
3VERSION=$(shell awk '/Version:/ { print $$2 }' $(SPECFILE))
4RELEASE=$(shell awk '/Release:/ { print $$2 }' $(SPECFILE))
5CVSTAG = $(NAME)_$(subst .,-,$(VERSION))_$(subst .,-,$(RELEASE))
6RPMBUILD=$(shell `which rpmbuild >&/dev/null` && echo "rpmbuild" || echo "rpm")
7
8prefix=/usr
9includedir=$(prefix)/include
10libdir=$(prefix)/lib
11
12default: all
13
14all:
15        @$(MAKE) -C src
16
17install: all
18
19clean:
20        @$(MAKE) -C src clean
21        @$(MAKE) -C harness clean
22
23tag-archive:
24        @cvs -Q tag -F $(CVSTAG)
25
26create-archive: tag-archive
27        @rm -rf /tmp/$(NAME)
28        @cd /tmp; cvs -Q -d $(CVSROOT) export -r$(CVSTAG) $(NAME) || echo GRRRrrrrr -- ignore [export aborted]
29        @mv /tmp/$(NAME) /tmp/$(NAME)-$(VERSION)
30        @cd /tmp; tar czSpf $(NAME)-$(VERSION).tar.gz $(NAME)-$(VERSION)
31        @rm -rf /tmp/$(NAME)-$(VERSION)
32        @cp /tmp/$(NAME)-$(VERSION).tar.gz .
33        @rm -f /tmp/$(NAME)-$(VERSION).tar.gz
34        @echo " "
35        @echo "The final archive is ./$(NAME)-$(VERSION).tar.gz."
36
37archive: clean tag-archive create-archive
38
39srpm: create-archive
40        $(RPMBUILD) --define "_sourcedir `pwd`" --define "_srcrpmdir `pwd`" --nodeps -bs $(SPECFILE)
Note: See TracBrowser for help on using the repository browser.