mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
41 lines
1.1 KiB
Makefile
41 lines
1.1 KiB
Makefile
NAME=libaio
|
|
SPECFILE=$(NAME).spec
|
|
VERSION=$(shell awk '/Version:/ { print $$2 }' $(SPECFILE))
|
|
RELEASE=$(shell awk '/Release:/ { print $$2 }' $(SPECFILE))
|
|
CVSTAG = $(NAME)_$(subst .,-,$(VERSION))_$(subst .,-,$(RELEASE))
|
|
RPMBUILD=$(shell `which rpmbuild >&/dev/null` && echo "rpmbuild" || echo "rpm")
|
|
|
|
prefix=/usr
|
|
includedir=$(prefix)/include
|
|
libdir=$(prefix)/lib
|
|
|
|
default: all
|
|
|
|
all:
|
|
@$(MAKE) -C src
|
|
|
|
install: all
|
|
|
|
clean:
|
|
@$(MAKE) -C src clean
|
|
@$(MAKE) -C harness clean
|
|
|
|
tag-archive:
|
|
@cvs -Q tag -F $(CVSTAG)
|
|
|
|
create-archive: tag-archive
|
|
@rm -rf /tmp/$(NAME)
|
|
@cd /tmp && cvs -Q -d $(CVSROOT) export -r$(CVSTAG) $(NAME) || echo GRRRrrrrr -- ignore [export aborted]
|
|
@mv /tmp/$(NAME) /tmp/$(NAME)-$(VERSION)
|
|
@cd /tmp && tar czSpf $(NAME)-$(VERSION).tar.gz $(NAME)-$(VERSION)
|
|
@rm -rf /tmp/$(NAME)-$(VERSION)
|
|
@cp /tmp/$(NAME)-$(VERSION).tar.gz .
|
|
@rm -f /tmp/$(NAME)-$(VERSION).tar.gz
|
|
@echo " "
|
|
@echo "The final archive is ./$(NAME)-$(VERSION).tar.gz."
|
|
|
|
archive: clean tag-archive create-archive
|
|
|
|
srpm: create-archive
|
|
$(RPMBUILD) --define "_sourcedir `pwd`" --define "_srcrpmdir `pwd`" --nodeps -bs $(SPECFILE)
|