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
|
#!/bin/bash
# Compilation de la librairie MLV
#
# This file is part of the MLV Library.
#
# Copyright (C) 2010-2014 Adrien Boussicault, Marc Zipstein
#
#
# This library 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 3 of the License, or
# (at your option) any later version.
#
# This library 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 Library. If not, see <http://www.gnu.org/licenses/>.
#
MAIN_DEV_CPP=@PACKAGE_TARNAME@-@PACKAGE_VERSION@-dev-cpp
rm -rf $MAIN_DEV_CPP
rm -rf $MAIN_DEV_CPP.zip
MAIN_DEV=@PACKAGE_TARNAME@-@PACKAGE_VERSION@-canonical-developpement-kit
(
if ! test -a $MAIN_DEV/my_project/gpl.txt;
then
./create_canonical_developpement_kit
fi
)
cp -r $MAIN_DEV $MAIN_DEV_CPP
MLV_EXAMPLES=$MAIN_DEV_CPP/MLV_examples
MLV_MY_PROJECT=$MAIN_DEV_CPP/my_project
#Creation d'un projet vide :
cp my_project.dev $MLV_MY_PROJECT/
# Creation des exampes pour la librairie MLV
MLV_EXAMPLES=$MAIN_DEV_CPP/MLV_examples
(
cd $MLV_EXAMPLES/sources
for i in **/*.c; do j=`echo $i | sed -e "s#/#_#" | sed -e "s#\.c##"`; path=`echo $i | sed -e "s#/.*##"`; name=`echo $j | sed -e "s#^[^_]*_##"`; cat ../../../my_project.dev | sed -e "s#my_project#$j#" | sed -e "s#\\\\main#\\\\$path\\\\$name#" > ../$j.dev; done;
)
zip -q -r $MAIN_DEV_CPP.zip $MAIN_DEV_CPP
|