Add distrib rule.

This commit is contained in:
agibert 2003-07-16 22:55:51 +00:00
parent c4617d7c1f
commit adbf463812
3 changed files with 41 additions and 8 deletions

View File

@ -1,14 +1,12 @@
# $RCSfile: Makefile,v $ # $RCSfile: Makefile,v $
# $Revision: 1.1 $ # $Revision: 1.2 $
# $Name: $ # $Name: $
# $Date: 2003/07/15 23:53:15 $ # $Date: 2003/07/16 22:55:51 $
# $Author: agibert $ # $Author: agibert $
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Main Makefile # Main Makefile
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Marc Regimbeau <marc.regimbeau@flomaco.net>
#------------------------------------------------------------------------------
@ -20,3 +18,8 @@ FILE_DOC := *.txt
include Makefile.var include Makefile.var
include Makefile.rule include Makefile.rule
dir_clean:
$(RM) $(PROG_VERSION_NAME).src.*

View File

@ -1,9 +1,13 @@
# $RCSfile: Makefile.rule,v $ # $RCSfile: Makefile.rule,v $
# $Revision: 1.1 $ # $Revision: 1.2 $
# $Name: $ # $Name: $
# $Date: 2003/07/15 23:53:15 $ # $Date: 2003/07/16 22:55:51 $
# $Author: agibert $ # $Author: agibert $
#------------------------------------------------------------------------------
# Rule Makefile
#------------------------------------------------------------------------------
# ----------------- DEFAULT RULES --------------------- # ----------------- DEFAULT RULES ---------------------
@ -340,3 +344,15 @@ ifneq ($(FILE_WEBICONS),)
fi) fi)
endif endif
$(MAKE) post_uninstall $(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)

View File

@ -1,9 +1,15 @@
# $RCSfile: Makefile.var,v $ # $RCSfile: Makefile.var,v $
# $Revision: 1.1 $ # $Revision: 1.2 $
# $Name: $ # $Name: $
# $Date: 2003/07/15 23:53:15 $ # $Date: 2003/07/16 22:55:51 $
# $Author: agibert $ # $Author: agibert $
#------------------------------------------------------------------------------
# Variable Makefile
#------------------------------------------------------------------------------
PROG_NAME=libnode PROG_NAME=libnode
PROG_VERSION_NAME=libnode-2.0.5-1 PROG_VERSION_NAME=libnode-2.0.5-1
@ -13,6 +19,12 @@ AR=/usr/bin/ar
CD=cd CD=cd
MKDIR=/bin/mkdir -p MKDIR=/bin/mkdir -p
RM=/bin/rm -f RM=/bin/rm -f
MV=/bin/mv
TAR=tar
GZIP=gzip
BZIP2=bzip2
ZIP=zip
PATH_WEB=$(addprefix /var/httpd/, $(PROG_NAME)) PATH_WEB=$(addprefix /var/httpd/, $(PROG_NAME))
INSTALLBIN=/usr/bin/install -m 755 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) PATH_LOG := $(addprefix $(HOME_DIR),/var/log)
TMP_DIR=/tmp
CFLAGS= CFLAGS=
ifeq ($(DEBUG), YES) ifeq ($(DEBUG), YES)