From 7ecd9dfb37b3b4a9770265c7a846d3224be98d84 Mon Sep 17 00:00:00 2001 From: Daniel-Constantin Mierla Date: Tue, 28 Feb 2017 11:46:09 +0100 Subject: [PATCH] Makefile: make tar updated to skip obsolete folder - paths updated to run with src folder --- src/Makefile | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/src/Makefile b/src/Makefile index 21892e080a8..bbf5f8db8a0 100644 --- a/src/Makefile +++ b/src/Makefile @@ -558,17 +558,19 @@ makefile_vars makefile-vars: dist: tar tar: makefile_vars $(auto_gen_keep) - $(TAR) -C .. \ - --exclude=$(notdir $(CURDIR))/test* \ - --exclude=$(notdir $(CURDIR))/tmp* \ - --exclude=$(notdir $(CURDIR))/debian \ - --exclude=$(notdir $(CURDIR))/debian/$(MAIN_NAME) \ - --exclude=$(notdir $(CURDIR))/debian/$(MAIN_NAME)-* \ - --exclude=$(notdir $(CURDIR))/$(MAIN_NAME)_tls* \ + $(TAR) -C ../.. \ + --exclude=$(notdir $(realpath $(shell pwd)/..))/test* \ + --exclude=$(notdir $(realpath $(shell pwd)/..))/tmp* \ + --exclude=$(notdir $(realpath $(shell pwd)/..))/debian \ + --exclude=$(notdir $(realpath $(shell pwd)/..))/debian/$(MAIN_NAME) \ + --exclude=$(notdir $(realpath $(shell pwd)/..))/debian/$(MAIN_NAME)-* \ + --exclude=$(notdir $(realpath $(shell pwd)/..))/$(MAIN_NAME)_tls* \ + --exclude=$(notdir $(realpath $(shell pwd)/..))/misc/obsolete \ --exclude=.git* \ --exclude=CVS* \ --exclude=.svn* \ --exclude=.cvsignore \ + --exclude=tags \ --exclude=librpath.lst \ --exclude=libiname.lst \ --exclude=makecfg.lst \ @@ -577,7 +579,8 @@ tar: makefile_vars $(auto_gen_keep) --exclude=*.[do] \ --exclude=*.so \ --exclude=*.il \ - --exclude=$(notdir $(CURDIR))/$(MAIN_NAME) \ + --exclude=$(notdir $(realpath $(shell pwd)/..))/$(MAIN_NAME) \ + --exclude=$(notdir $(realpath $(shell pwd)/..))/src/$(MAIN_NAME) \ --exclude=*.gz \ --exclude=*.bz2 \ --exclude=*.tar \ @@ -586,15 +589,15 @@ tar: makefile_vars $(auto_gen_keep) --exclude=*.swp \ --exclude=*.swo \ ${tar_extra_args} \ - -cf - $(notdir $(CURDIR)) | \ - (mkdir -p tmp/_tar1; mkdir -p tmp/_tar2 ; \ - cd tmp/_tar1; $(TAR) -xf - ) && \ - mv tmp/_tar1/$(notdir $(CURDIR)) \ - tmp/_tar2/"$(NAME)-$(RELEASE)" && \ - (cd tmp/_tar2 && $(TAR) \ + -cf - $(notdir $(realpath $(shell pwd)/..)) | \ + (mkdir -p ../tmp/_tar1; mkdir -p ../tmp/_tar2 ; \ + cd ../tmp/_tar1; $(TAR) -xf - ) && \ + mv ../tmp/_tar1/$(notdir $(realpath $(shell pwd)/..)) \ + ../tmp/_tar2/"$(NAME)-$(RELEASE)" && \ + (cd ../tmp/_tar2 && $(TAR) \ -zcf ../../"$(tar_name)".tar.gz \ "$(NAME)-$(RELEASE)" ) ; \ - rm -rf tmp/_tar1; rm -rf tmp/_tar2 + rm -rf ../tmp/_tar1; rm -rf ../tmp/_tar2; rm -rf ../tmp # binary dist. tar.gz .PHONY: bin