From adbf4638128409eda7e2dee08496737e0b5f9c71 Mon Sep 17 00:00:00 2001 From: agibert Date: Wed, 16 Jul 2003 22:55:51 +0000 Subject: [PATCH] Add distrib rule. --- Makefile | 11 +++++++---- Makefile.rule | 20 ++++++++++++++++++-- Makefile.var | 18 ++++++++++++++++-- 3 files changed, 41 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index f3e0ab1..67f6685 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,12 @@ # $RCSfile: Makefile,v $ -# $Revision: 1.1 $ +# $Revision: 1.2 $ # $Name: $ -# $Date: 2003/07/15 23:53:15 $ +# $Date: 2003/07/16 22:55:51 $ # $Author: agibert $ #------------------------------------------------------------------------------ # Main Makefile #------------------------------------------------------------------------------ -# Marc Regimbeau -#------------------------------------------------------------------------------ @@ -20,3 +18,8 @@ FILE_DOC := *.txt include Makefile.var include Makefile.rule + + + +dir_clean: + $(RM) $(PROG_VERSION_NAME).src.* diff --git a/Makefile.rule b/Makefile.rule index 06e2b09..5170fb6 100644 --- a/Makefile.rule +++ b/Makefile.rule @@ -1,9 +1,13 @@ # $RCSfile: Makefile.rule,v $ -# $Revision: 1.1 $ +# $Revision: 1.2 $ # $Name: $ -# $Date: 2003/07/15 23:53:15 $ +# $Date: 2003/07/16 22:55:51 $ # $Author: agibert $ +#------------------------------------------------------------------------------ +# Rule Makefile +#------------------------------------------------------------------------------ + # ----------------- DEFAULT RULES --------------------- @@ -340,3 +344,15 @@ ifneq ($(FILE_WEBICONS),) fi) endif $(MAKE) post_uninstall + + + +# "distrib" Rule +distrib: + $(MAKE) clean + $(MKDIR) $(TMP_DIR)/$(PROG_VERSION_NAME) + $(TAR) cf - . | $(TAR) xvpf - -C $(TMP_DIR)/$(PROG_VERSION_NAME) + $(TAR) cvf - -C $(TMP_DIR) $(PROG_VERSION_NAME) | $(GZIP) -9 >$(PROG_VERSION_NAME).src.tgz + $(TAR) cvf - -C $(TMP_DIR) $(PROG_VERSION_NAME) | $(BZIP2) -9 >$(PROG_VERSION_NAME).src.tbz2 + $(MV) $(TMP_DIR)/$(PROG_VERSION_NAME) . + $(ZIP) -r -m -9 -l $(PROG_VERSION_NAME).src.zip $(PROG_VERSION_NAME) diff --git a/Makefile.var b/Makefile.var index 69a804b..739a63d 100644 --- a/Makefile.var +++ b/Makefile.var @@ -1,9 +1,15 @@ # $RCSfile: Makefile.var,v $ -# $Revision: 1.1 $ +# $Revision: 1.2 $ # $Name: $ -# $Date: 2003/07/15 23:53:15 $ +# $Date: 2003/07/16 22:55:51 $ # $Author: agibert $ +#------------------------------------------------------------------------------ +# Variable Makefile +#------------------------------------------------------------------------------ + + + PROG_NAME=libnode PROG_VERSION_NAME=libnode-2.0.5-1 @@ -13,6 +19,12 @@ AR=/usr/bin/ar CD=cd MKDIR=/bin/mkdir -p RM=/bin/rm -f +MV=/bin/mv +TAR=tar +GZIP=gzip +BZIP2=bzip2 +ZIP=zip + PATH_WEB=$(addprefix /var/httpd/, $(PROG_NAME)) INSTALLBIN=/usr/bin/install -m 755 @@ -55,6 +67,8 @@ PATH_WEBICONS := $(addprefix $(HOME_DIR),$(addprefix $(PATH_WEB),/icons)) PATH_LOG := $(addprefix $(HOME_DIR),/var/log) +TMP_DIR=/tmp + CFLAGS= ifeq ($(DEBUG), YES)