#! /bin/csh
#
#	make landscape installer
#
# 
#	Copyright (C) 2003 Hirohisa MORI joshua@nichibun.ac.jp
# 
#	This program is free software; you can redistribute it and/or
#	modify it under the terms of the GLOBALBASE General Public 
#	License as published by http://www.globalbase.org/
# 
#	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.
#
#	Usage::
#
#	make.sourcecode.installer
#	sourcecodefile = ../../../../VER.tar.gz
#

setenv VER `egrep ver. ../current.ver`

echo make.landscape.installer for $VER

pushd ../../src/install/replace
gcc -g main.c
mv a.out ../../../../../replace

cd ../../../../..

echo Clean up .....
rm -rf $VER
gbs/utils/unix/cvstool/clean

echo Copy .....
cp -r gbs $VER
find $VER -name 'CVS' -exec rm -rf {} \;
find $VER/env/proj/win -name '*.dsw' -exec ./replace -topc {} \;
find $VER/env/proj/win -name '*.bat' -exec ./replace -topc {} \;
find $VER/env/proj/win -name '*.dsp' -exec ./replace -topc {} \;

echo Tar ......

tar cvf $VER.tar $VER

echo Compress .....
gzip $VER.tar

rm -rf $VER
rm -f replace

popd

