1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
|
#!/bin/tcsh -f
if(! -f configure) then
echo "run this script from the root directory of CVS working directory"
echo "which is where the 'conigure' script resides"
exit 1
endif
if( "$1" == "") then
echo "usage : $0 <version> <win-flavor> <name extension> <options to configure ...>"
exit
endif
set version=$1
set winflavor=$2
set darflavor=$3
if (! $?LDFLAGS) then
setenv LDFLAGS "-L/usr/local/lib"
else
setenv LDFLAGS "${LDFLAGS} -L/usr/local/lib"
endif
if (! $?LD_LIBRARY_PATH) then
setenv LD_LIBRARY_PATH "/usr/local/lib"
else
setenv LD_LIBRARY_PATH "${LD_LIBRARY_PATH}:/usr/local/lib"
endif
if(! $?CXXFLAGS) then
setenv CXXFLAGS "-I/usr/local/include"
else
setenv CXXFLAGS "${CXXFLAGS} -I/usr/local/include"
endif
set dir_name="dar$darflavor-$version-$winflavor"
set build_dir=`pwd`/$dir_name
echo "install directory is $build_dir"
if( -e $build_dir) then
echo "cannot create $build_dir file exists"
exit 1
endif
mkdir "$build_dir"
make clean distclean || echo "ignoring error, tree already clean"
# setenv CXXFLAGS -O
./configure --prefix=/ --bindir=/bin --libdir=/bin --datarootdir=/share --sysconfdir=/etc --disable-gpgme-linking --disable-dar-static $4 $5 $6 $7 $8 $9 ${10} ${11}
make $MAKE_OPT
make DESTDIR="$build_dir" install-strip
foreach exec ( `ls "$build_dir/bin/"*.exe` )
echo "importing dlls used by $exec"
set dlls=`cygcheck "$exec" | sed -rn -e 's#\s##g' -e 's#\\#\\#g' -e 's#(.*\.dll)$#\1#p'`
cp $dlls "$build_dir/bin"
end
mv "$build_dir/share/dar" "$build_dir/doc" || exit 1
rm -rf "$build_dir/share" "$build_dir/include" "$build_dir/pkgconfig" "$build_dir/python3" "$build_dir/$dir_name"
# RSmain finding for -E/-F/-~ options to work under Cygwin
cp `which sh.exe` "$build_dir/bin" || exit 1
cp /bin/cygreadline* /bin/cygncurs* "$build_dir/bin" || exit 1
mkdir "$build_dir/tmp"
foreach fichier (README TODO INSTALL ChangeLog THANKS COPYING)
cp $fichier "$build_dir/`basename $fichier`.txt"
misc/todos "$build_dir/`basename $fichier`.txt"
end
zip -9 -r "$dir_name".zip $dir_name
rm -rf $build_dir
|