Commit b2abf8a1 authored by Erick's avatar Erick

Modified the makefile to permit a unique beta version number

parent 623ae2b7
......@@ -2,16 +2,18 @@
#
# Author: Erick Gallesio [eg@unice.fr]
# Creation date: 11-Apr-2000 10:30 (eg)
# Last file update: 4-Apr-2010 12:29 (eg)
# Last file update: 3-Jul-2018 18:11 (eg)
EXTRA_DIST =
EXTRA_DIST =
# INSTDIRS contains the dirs which need to be installed
INSTDIRS = @GC@ src utils lib examples pkgman tests doc
SUBDIRS = @PCRE@ @GMP@ @FFI@ $(INSTDIRS)
VERSION_TAG = @PACKAGE@-@VERSION@
VERSION_BETA = $(VERSION_TAG)-beta
install:
.PHONY: test push
install:
@for i in $(INSTDIRS) ;do \
echo "***** Installing directory $$i"; \
(cd $$i && $(MAKE) $(AM_MAKEFLAGS) install); \
......@@ -20,27 +22,36 @@ install:
test: all
(cd tests; $(MAKE) test)
commit-beta:
eval "expr `cat .beta-number` + 1" > .beta-number
hg commit -m "Preparing version $(VERSION_BETA)`cat .beta-number`"
commit-version:
echo 0 > .beta-number
hg commit -m "Commit version $(VERSION_TAG)"
prep-version:
rm -rf /tmp/$(VERSION_TAG) /tmp/$(VERSION_BETA)* /tmp/beta
hg clone . /tmp/$(VERSION_TAG)
rm -rf /tmp/$(VERSION_TAG)/.hg*
hgclonedates `pwd` /tmp/$(VERSION_TAG)
beta: commit-beta prep-version
(mv /tmp/$(VERSION_TAG) /tmp/$(VERSION_BETA)`cat .beta-number`; \
echo "$(VERSION_BETA)`cat .beta-number`" > /tmp/beta ; \
cd /tmp; tar cvfz `cat beta`.tar.gz `cat beta` )
ls -ls /tmp/$(VERSION_BETA)*.tar.gz
version: commit-version prep-version
hg tag $(VERSION_TAG)
( cd /tmp; tar cvfz $(VERSION_TAG).tar.gz $(VERSION_TAG) )
ls -ls /tmp/$(VERSION_TAG).tar.gz
push: _git-pre-push
git push
_git-pre-push:
./utils/make-push-id
git add src/extraconf.h.in
git commit --amend
#commit-beta:
# eval "expr `cat .beta-number` + 1" > .beta-number
# hg commit -m "Preparing version $(VERSION_BETA)`cat .beta-number`"
#
#commit-version:
# echo 0 > .beta-number
# hg commit -m "Commit version $(VERSION_TAG)"
#
#prep-version:
# rm -rf /tmp/$(VERSION_TAG) /tmp/$(VERSION_BETA)* /tmp/beta
# hg clone . /tmp/$(VERSION_TAG)
# rm -rf /tmp/$(VERSION_TAG)/.hg*
# hgclonedates `pwd` /tmp/$(VERSION_TAG)
#
#beta: commit-beta prep-version
# (mv /tmp/$(VERSION_TAG) /tmp/$(VERSION_BETA)`cat .beta-number`; \
# echo "$(VERSION_BETA)`cat .beta-number`" > /tmp/beta ; \
# cd /tmp; tar cvfz `cat beta`.tar.gz `cat beta` )
# ls -ls /tmp/$(VERSION_BETA)*.tar.gz
#
#version: commit-version prep-version
# hg tag $(VERSION_TAG)
# ( cd /tmp; tar cvfz $(VERSION_TAG).tar.gz $(VERSION_TAG) )
# ls -ls /tmp/$(VERSION_TAG).tar.gz
......@@ -18,7 +18,7 @@
#
# Author: Erick Gallesio [eg@unice.fr]
# Creation date: 11-Apr-2000 10:30 (eg)
# Last file update: 4-Apr-2010 12:29 (eg)
# Last file update: 3-Jul-2018 18:11 (eg)
VPATH = @srcdir@
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
......@@ -162,8 +162,8 @@ CSCOPE = cscope
DIST_SUBDIRS = $(SUBDIRS)
am__DIST_COMMON = $(srcdir)/Makefile.in \
$(top_srcdir)/doc/skb/stklos-version.stk.in AUTHORS COPYING \
ChangeLog INSTALL NEWS README TODO compile config.guess \
config.sub depcomp install-sh ltmain.sh missing mkinstalldirs
ChangeLog INSTALL NEWS README compile config.guess config.sub \
depcomp install-sh ltmain.sh missing mkinstalldirs
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
......@@ -800,7 +800,9 @@ uninstall-am:
.PRECIOUS: Makefile
install:
.PHONY: test push
install:
@for i in $(INSTDIRS) ;do \
echo "***** Installing directory $$i"; \
(cd $$i && $(MAKE) $(AM_MAKEFLAGS) install); \
......@@ -809,30 +811,38 @@ install:
test: all
(cd tests; $(MAKE) test)
commit-beta:
eval "expr `cat .beta-number` + 1" > .beta-number
hg commit -m "Preparing version $(VERSION_BETA)`cat .beta-number`"
commit-version:
echo 0 > .beta-number
hg commit -m "Commit version $(VERSION_TAG)"
prep-version:
rm -rf /tmp/$(VERSION_TAG) /tmp/$(VERSION_BETA)* /tmp/beta
hg clone . /tmp/$(VERSION_TAG)
rm -rf /tmp/$(VERSION_TAG)/.hg*
hgclonedates `pwd` /tmp/$(VERSION_TAG)
beta: commit-beta prep-version
(mv /tmp/$(VERSION_TAG) /tmp/$(VERSION_BETA)`cat .beta-number`; \
echo "$(VERSION_BETA)`cat .beta-number`" > /tmp/beta ; \
cd /tmp; tar cvfz `cat beta`.tar.gz `cat beta` )
ls -ls /tmp/$(VERSION_BETA)*.tar.gz
version: commit-version prep-version
hg tag $(VERSION_TAG)
( cd /tmp; tar cvfz $(VERSION_TAG).tar.gz $(VERSION_TAG) )
ls -ls /tmp/$(VERSION_TAG).tar.gz
push: _git-pre-push
git push
_git-pre-push:
./utils/make-push-id
git add src/extraconf.h.in
git commit --amend
#commit-beta:
# eval "expr `cat .beta-number` + 1" > .beta-number
# hg commit -m "Preparing version $(VERSION_BETA)`cat .beta-number`"
#
#commit-version:
# echo 0 > .beta-number
# hg commit -m "Commit version $(VERSION_TAG)"
#
#prep-version:
# rm -rf /tmp/$(VERSION_TAG) /tmp/$(VERSION_BETA)* /tmp/beta
# hg clone . /tmp/$(VERSION_TAG)
# rm -rf /tmp/$(VERSION_TAG)/.hg*
# hgclonedates `pwd` /tmp/$(VERSION_TAG)
#
#beta: commit-beta prep-version
# (mv /tmp/$(VERSION_TAG) /tmp/$(VERSION_BETA)`cat .beta-number`; \
# echo "$(VERSION_BETA)`cat .beta-number`" > /tmp/beta ; \
# cd /tmp; tar cvfz `cat beta`.tar.gz `cat beta` )
# ls -ls /tmp/$(VERSION_BETA)*.tar.gz
#
#version: commit-version prep-version
# hg tag $(VERSION_TAG)
# ( cd /tmp; tar cvfz $(VERSION_TAG).tar.gz $(VERSION_TAG) )
# ls -ls /tmp/$(VERSION_TAG).tar.gz
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
......
/* -*- C -*-
* extra.h -- Extra pre-processor definitions
*
* Copyright 2000-2010 Erick Gallesio - I3S-CNRS/ESSI <eg@unice.fr>
*
*
/* -*- C -*-
* extra.h -- Extra pre-processor definitions
*
* Copyright 2000-2018 Erick Gallesio - I3S-CNRS/ESSI <eg@unice.fr>
*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*
*
* Author: Erick Gallesio [eg@unice.fr]
* Creation date: 19-May-2000 18:44 (eg)
* Last file update: 6-Aug-2010 00:00 (eg)
* Last file update: 3-Jul-2018 16:53 (eg)
*/
#define PREFIXDIR "@PREFIX@"
#define SCMDIR "@SCMDIR@"
#define DEFAULT_BOOT_FILE "@SCMDIR@/boot.img"
#define EXECDIR "@EXECDIR@"
#define BUILD_OS "@BUILD_OS@"
#define BUILD_ARCH "@BUILD_ARCH@"
#define BUILD_MACHINE "@BUILD_OS@-@BUILD_ARCH@"
#define @OS_NAME@ 1
#define PREFIXDIR "@PREFIX@"
#define SCMDIR "@SCMDIR@"
#define DEFAULT_BOOT_FILE "@SCMDIR@/boot.img"
#define EXECDIR "@EXECDIR@"
#define BUILD_OS "@BUILD_OS@"
#define BUILD_ARCH "@BUILD_ARCH@"
#define BUILD_MACHINE "@BUILD_OS@-@BUILD_ARCH@"
#define @OS_NAME@ 1
#define @OS_NAME_VERSION@ 1
#define STACK_GROWS_@STACK_DIRECTION@
#define LIB_SUMMARY "@LIB_SUMMARY@"
#define PCRE_PKG_CONFIG "@PCREPKG@"
#define LIB_SUMMARY "@LIB_SUMMARY@"
#define PCRE_PKG_CONFIG "@PCREPKG@"
/* Various stuff */
#define @OS_FLAVOUR@ 1
#define SHARED_SUFFIX "@SH_SUFFIX@"
#define SHARED_LIB_SUFFIX "@SH_LIB_SUFFIX@"
#define SHARED_SUFFIX "@SH_SUFFIX@"
#define SHARED_LIB_SUFFIX "@SH_LIB_SUFFIX@"
#define GIT_PUSH_ID "1d3727d"
#!/usr/bin/env bash
#
# make-push-id -- Build an id for a given push
#
# Copyright © 2018 Erick Gallesio - I3S-CNRS/Polytech Nice-Sophia <eg@unice.fr>
#
# Author: Erick Gallesio [eg@unice.fr]
# Creation date: 3-Jul-2018 18:03
# Last file update: 3-Jul-2018 18:09 (eg)
current=$(expr $(date "+%s") - 1500000000)
signature=$(printf "%x" $current)
sed -i -e '/GIT_PUSH_ID/s=".*"="'$signature'"=' src/extraconf.h.in
printf " "; grep GIT_PUSH_ID src/extraconf.h.in
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment