SCons build:

auto-generate ChangeLog from now on using SVN log messages (see r396).


git-svn-id: https://svn.ibp.de/svn/capisuite/trunk/capisuite@409 4ebea2bb-67d4-0310-8558-a5799e421b66
This commit is contained in:
htgoebel 2005-01-09 21:17:33 +00:00
parent 54ca44f6f7
commit 176451492c
2 changed files with 55 additions and 2 deletions

View File

@ -3,7 +3,7 @@
# build top level files
# this is a SConscript, too, to support really build-dirs
Import('env')
Import('env', 'is_dist')
cronfile = env.FileSubst('capisuite.cron', 'capisuite.cronin')
rcfile = env.FileSubst('rc.capisuite', 'rc.capisuite.in')
@ -17,3 +17,51 @@ env.Alias('install', [
# them for distribuition
env.DistSourcesOf([cronfile, rcfile])
env.ExtraDist('cronjob.conf')
#--- a simple 'Echo' action with nice output ---
import SCons, os
def echo_func(file, text):
open(file, 'a').writelines([text, os.linesep])
def echo_str(file, text):
return 'Echo("%s", %s)' % (file, repr(text))
Echo = SCons.Action.ActionFactory(echo_func, echo_str)
#--- build Changelog ---
changelog_header = """
# This file is automatically generated from the Subversion log for
# the current branch (i.e. the branch which was used for this
# release). Only changes starting from 2005-01-01 are listed here.
#
# ChangeLog.complete lists all changes in all branches if needed
# for reference.
"""
cl = env.Command(
'#/Changelog', None,
[Echo('$TARGET', changelog_header),
Echo('$TARGET', ''),
# need to set locale to set correct character encoding
'LANG=de_DE svn log -v -r HEAD:385 >> $TARGET'
])
env.ExtraDist(cl)
if is_dist or 'Changelog' in COMMAND_LINE_TARGETS:
env.AlwaysBuild(cl)
changelog_complete_header = """
# This file is automatically generated from the Subversion
# repository. It contains all changes in all development branches
# and is only meant for reference purposes. If you want to see the
# changes which lead to this release, please refer to the ChangeLog
"""
cl = env.Command(
'#/Changelog.complete', None,
[Echo('$TARGET', changelog_complete_header),
Echo('$TARGET', ''),
# need to set locale to set correct character encoding
'LANG=de_DE svn log -v $SVNREPOSITORY >> $TARGET'
])
env.ExtraDist(cl)
if is_dist or 'Changelog.complete' in COMMAND_LINE_TARGETS:
env.AlwaysBuild(cl)

View File

@ -254,6 +254,8 @@ env = InstallableEnv(tools=Split('default sourcetar filesubst'),
VERSION = '0.5.cvs',
RELEASE = '1',
SVNREPOSITORY = 'https://h3281.serverkompetenz.net/repos/capisuite/',
# required for some building the docs (doxygen)
srcdir = build_dir,
@ -359,7 +361,8 @@ env.SConscript(dirs=[Dir('.', build_dir),
#--- additional files to be distributed ---
env.ExtraDist(Split("""
ChangeLog TODO
ChangeLog.2003 ChangeLog.2004
TODO
SConstruct
SConscript-Config
SConscript-Options
@ -374,6 +377,7 @@ env.ExtraDist(Split("""
packages/rpm/SConscript
docs/SConscript
"""))
# ChangeLog and ChangeLog.complete are build in SConscript
#--- additional files to be distributed (automake/autoconf stuff) ---
@ -452,6 +456,7 @@ env.Alias('install', env.Alias('install-man'))
#
if is_dist or 'rpms' in COMMAND_LINE_TARGETS:
dist = env.DistTar('$DIST_ARCHIVE', env['DIST_FILES'])[0]
env.Alias('dist', dist)
###---####---###---####---###---####---###---####---###---####---###---###
#