diff options
author | Frederic Crozat <fcrozat@mandriva.com> | 2010-01-08 17:00:24 +0000 |
---|---|---|
committer | Frederic Crozat <fcrozat@mandriva.com> | 2010-01-08 17:00:24 +0000 |
commit | d12addf29dcbfef631cc64c70bbdc8e49dc40903 (patch) | |
tree | 4fc5abef9c2f1d5924837ebb5d1b986df478531c /Makefile | |
parent | 6f141ee7fceae7eca17ba591f505f5ad519ae181 (diff) | |
download | ldetect-lst-d12addf29dcbfef631cc64c70bbdc8e49dc40903.tar ldetect-lst-d12addf29dcbfef631cc64c70bbdc8e49dc40903.tar.gz ldetect-lst-d12addf29dcbfef631cc64c70bbdc8e49dc40903.tar.bz2 ldetect-lst-d12addf29dcbfef631cc64c70bbdc8e49dc40903.tar.xz ldetect-lst-d12addf29dcbfef631cc64c70bbdc8e49dc40903.zip |
add git support, bump release0.1.282
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 75 |
1 files changed, 45 insertions, 30 deletions
@@ -1,55 +1,70 @@ include Makefile.config -PACKAGE = ldetect-lst -VERSION := 0.1.281 - -SVN_URL := $(shell svn info | grep ^URL: | cut -f2 -d\ ) -SVN_BASE := $(shell svn info | sed -n '/^URL: \(.*\/$(PACKAGE)\).*/s//\1/p') +NAME = ldetect-lst +VERSION := 0.1.282 FILES = AUTHORS ChangeLog Makefile Makefile.config convert lst update-ldetect-lst -.PHONY: changelog log +.PHONY: changelog log ChangeLog build: - make -C lst build - make -C dkms-modules-info build + $(MAKE) -C lst build + $(MAKE) -C dkms-modules-info build check: - make -C lst check + $(MAKE) -C lst check clean: rm -f *~ - make -C lst clean + $(MAKE) -C lst clean install: build install -d $(bindir) $(sbindir) $(dir) - make -C lst install - make -C dkms-modules-info install + $(MAKE) -C lst install + $(MAKE) -C dkms-modules-info install install update-ldetect-lst $(sbindir) install convert/merge2pcitable.pl $(bindir) -# rules to build a test rpm - -cleandist: - rm -rf $(PACKAGE)-$(VERSION) $(PACKAGE)-$(VERSION).tar.lzma - -localcopy: - svn export -q -rBASE . $(PACKAGE)-$(VERSION) - -tar: - tar cfa $(PACKAGE)-$(VERSION).tar.lzma $(PACKAGE)-$(VERSION) - rm -rf $(PACKAGE)-$(VERSION) - - # rules to build a distributable rpm -dist: cleandist localcopy tar +dist-svn: + svn export -q -rBASE . $(NAME)-$(VERSION) + tar cfY ../$(NAME)-$(VERSION).tar.lzma $(NAME)-$(VERSION) + rm -rf $(NAME)-$(VERSION) + +dist-git: + @git archive --prefix=$(NAME)-$(VERSION)/ HEAD | lzma >../$(NAME)-$(VERSION).tar.lzma; + + +dist: dis +dis: clean + rm -rf ../$(NAME)-$(VERSION)*.tar* $(NAME)-$(VERSION) + @if [ -e ".svn" ]; then \ + $(MAKE) dist-svn; \ + elif [ -e ".git" ]; then \ + $(MAKE) dist-git; \ + else \ + echo "Unknown SCM (not SVN nor GIT)";\ + exit 1; \ + fi; + + $(info $(shell dirname $$PWD)/$(NAME)-$(VERSION).tar.lzma is ready) log: changelog -changelog: ../common/username.xml - svn2cl --authors ../common/username.xml --accum - rm -f ChangeLog.bak - svn commit -m "Generated by svn2cl the `LC_TIME=C date '+%d_%b'`" ChangeLog +changelog: ChangeLog + +ChangeLog: ../common/username.xml + @if test -d "$$PWD/.git"; then \ + ../common/gitlog-to-changelog > $@.tmp \ + && mv -f $@.tmp $@ \ + || (rm -f $@.tmp; \ + echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \ + (test -f $@ || echo git-log is required to generate this file >> $@)); \ + else \ + svn2cl --accum --authors ../common/username.xml; \ + rm -f *.bak; \ + svn commit -m "Generated by svn2cl the `LC_TIME=C date '+%d_%b'`" ChangeLog; \ + fi; # Makefile ends here |