aboutsummaryrefslogblamecommitdiffstats
path: root/src/Makefile
blob: a480fd12eda9bd0cd6825c72b3fcbc14e7829d29 (plain) (tree)
1
2
3
4
5
6
7
8




                                       
                                                         
                                         
                                  



    


                                                                


                                                             
                              
 

                                 
                           
                            
                                                             
                                                     













                                                                                 
                                                 
 
      
                                                                         
#
# Makefile for sos system support tools
#

NAME    = sos
VERSION = $(shell awk '/Version/ { print $$2 }' sos.spec)
REPO = https://sos.108.redhat.com/svn/sos
SVNTAG  = r$(subst .,-,$(VERSION))


all:

.PHONY: tag-archive create-archive archive install version clean

../../tags/$(SVNTAG):
	@svn copy $(REPO)/trunk/src $(REPO)/tags/$(SVNTAG) \
	-m "Tagging the $(SVNTAG) release of the sos project"
	@echo "$(SVNTAG)"
	@svn update ../../tags

tag-archive: ../../tags/$(SVNTAG)

create-archive: tag-archive
	@rm -rf /tmp/$(NAME)
	@svn export $(REPO)/tags/$(SVNTAG)     /tmp/$(NAME) \
	 || echo GRRRrrrrr -- ignore [export aborted]
	@mv /tmp/$(NAME) /tmp/$(NAME)-$(VERSION)
	@cd /tmp; tar --bzip2 -cSpf $(NAME)-$(VERSION).tar.bz2 $(NAME)-$(VERSION)
	@rm -rf /tmp/$(NAME)-$(VERSION)
	@cp /tmp/$(NAME)-$(VERSION).tar.bz2 .
	@rm -f /tmp/$(NAME)-$(VERSION).tar.bz2
	@echo " "
	@echo "The final archive is ./$(NAME)-$(VERSION).tar.bz2."

archive: clean tag-archive create-archive

install:
	python setup.py install

version:
	@echo "The version is $(NAME)-$(VERSION)"

clean:
	@rm -fv *~ .*~ changenew ChangeLog.old $(NAME)-$(VERSION).tar.bz2