Module: kamailio
Branch: master
Commit: 7ecd9dfb37b3b4a9770265c7a846d3224be98d84
URL: 
https://github.com/kamailio/kamailio/commit/7ecd9dfb37b3b4a9770265c7a846d3224be98d84

Author: Daniel-Constantin Mierla <mico...@gmail.com>
Committer: Daniel-Constantin Mierla <mico...@gmail.com>
Date: 2017-02-28T11:46:09+01:00

Makefile: make tar updated to skip obsolete folder

- paths updated to run with src folder

---

Modified: src/Makefile

---

Diff:  
https://github.com/kamailio/kamailio/commit/7ecd9dfb37b3b4a9770265c7a846d3224be98d84.diff
Patch: 
https://github.com/kamailio/kamailio/commit/7ecd9dfb37b3b4a9770265c7a846d3224be98d84.patch

---

diff --git a/src/Makefile b/src/Makefile
index 21892e0..bbf5f8d 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


_______________________________________________
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to