aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas "Cakeisalie5" Touhey <thomas@touhey.fr>2018-04-07 15:10:41 +0200
committerThomas "Cakeisalie5" Touhey <thomas@touhey.fr>2018-04-07 15:10:41 +0200
commit3b9f3abff960176dcd57460c2b42e9d8784faca1 (patch)
treef34f81b3adac091f09c4116a492388d7802cbcac
parent852e11e052d6507a2be6012d8c1eac93d1bc5d77 (diff)
Added tarballs.
-rw-r--r--.gitignore1
-rwxr-xr-x[-rw-r--r--]Makefile17
-rwxr-xr-xMakefile.vars1
3 files changed, 18 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index f45ba04..0611830 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,3 +11,4 @@ common/weshd.h
Makefile.cfg
testclient
root
+weshd-*.tar*
diff --git a/Makefile b/Makefile
index 9db60aa..d83bd07 100644..100755
--- a/Makefile
+++ b/Makefile
@@ -18,8 +18,9 @@ clean:
# Une target pour remettre à zéro.
mrproper: clean
- $(call rmsg,Removing configuration.)
+ $(call rmsg,Removing configuration and tarballs.)
$(call qcmd,$(RM) Makefile.cfg)
+ $(call qcmd,$(RM) $(NAME)-*.tar*)
# Une target pour tout refaire.
@@ -212,6 +213,20 @@ $(eval $(call make-daemon-obj-rule,$(src))))
.PHONY: all-client install-client
# ---
+# Création de l'archive de distribution (tarball).
+# ---
+
+dist: mrproper
+ $(call bcmd,mkdir,$(NAME)-$(VERSION),$(MD) .dist)
+ $(call bcmd,cp,* $(NAME)-$(VERSION),$(CP) -R * .dist)
+ $(call qcmd,$(MV) .dist $(NAME)-$(VERSION))
+ $(call bcmd,tarball,$(NAME)-$(VERSION),\
+ tar czf $(NAME)-$(VERSION).tar.gz --exclude .git $(NAME)-$(VERSION))
+ $(call qcmd,$(RM) -r $(NAME)-$(VERSION))
+
+.PHONY: dist
+
+# ---
# Test du couple client/démon.
# ---
diff --git a/Makefile.vars b/Makefile.vars
index 139f454..90e3a51 100755
--- a/Makefile.vars
+++ b/Makefile.vars
@@ -49,6 +49,7 @@
RM := rm -f
CP := cp
+ MV := mv
LN := ln -sf
MD := mkdir -p
INST := install