diff --git a/NPLib/configure b/NPLib/configure deleted file mode 100755 index c5cc54e873644a7c14db159d144503ab25e05d8e..0000000000000000000000000000000000000000 --- a/NPLib/configure +++ /dev/null @@ -1,194 +0,0 @@ -#! /bin/bash - -# ***************************************************************************** -# * Copyright (C) 2009 this file is part of the NPTool Project * -# * * -# * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * -# * For the list of contributors see $NPTOOL/Licence/Contributors * -# *****************************************************************************/ - -# ***************************************************************************** -# * Original Author: N. de Sereville contact address: deserevi@ipno.in2p3.fr * -# * * -# * Creation Date : January 2013 * -# * Last update : * -# *---------------------------------------------------------------------------* -# * Decription: This script is in charge of preparing the installation of the * -# * NPLib. It does several things: * -# * + copy all header files to the include directory * -# * + compile the core libraries (all libraries which are not * -# * related to a specific detector) * -# * + generate the Makefile.detector makefile which is included * -# * in the main Makefile. The Makefile.detector has one entry * -# * per declared detector. * -# * * -# * This scripts accepts as arguments detector names. The name * -# * should be a lower case version of the directory name associated * -# * to the detector. * -# * If no argument is given, then all detectors are considered. * -# * * -# *---------------------------------------------------------------------------* -# * Comment: * -# * * -# * * -# ***************************************************************************** - - - -# arguments list -args="$@" - -############################################################ -# First of all, define .core_libs and .detector_libs files # -############################################################ -corelibs="initialconditions interactioncoordinates physics vdetector core" - -# core libraries list -core_file=".core_libs" -# if file exists delete it -if [ -e $core_file ] ; then - rm $core_file -fi ; - -# detector libraries list -detector_file=".detector_libs" -# if file exists delete it -if [ -e $detector_file ] ; then - rm $detector_file -fi ; - -# fill files -core_string="" -detector_string="" -for file in */Makefile -do - # remove "Makefile" string from file name - name=${file%\/*} - # file name in lower case - lname=$(printf "$name\n" | tr '[A-Z]' '[a-z]') - # only build core libraries - if printf "$corelibs\n" | grep -q "$lname" ; then - core_string="$core_string""$lname " - else - if [ $# = 0 ] ; then - detector_string="$detector_string""$lname " - else - if printf "$args\n" | grep -q "$lname" ; then - detector_string="$detector_string""$lname " - fi ; - fi ; - fi ; -done - -printf "$core_string\n" >> $core_file -printf "$detector_string\n" >> $detector_file - -######################################################################## -# Create cores entry in Makefile file for detectors given in arguments # -######################################################################## -# output file -outfile="Makefile.detector" -printf " + Creating $outfile file.....\n" -# if output file exists delete it -if [ -e $outfile ] ; then - rm $outfile -fi ; - -# create output file -printf "# WARNING:\n" >> $outfile -printf "# This file is automatically generated by the configure script.\n" >> $outfile -printf "# If you modify this file by hand, changes won't persist the next time you run ./configure.\n" >> $outfile -printf "#\n" >> $outfile - -# loop recursively on sub-directories containing a Makefile file -for file in */Makefile -do - # remove "Makefile" string from file name - name=${file%\/*} - # file name in lower case - lname=$(printf "$name\n" | tr '[A-Z]' '[a-z]') - # only build core libraries - if printf "$corelibs\n" | grep -q "$lname" ; then - ./scripts/makefile_detector.sh $name $outfile - fi ; -done - -########################################################################### -# Create detector entry in Makefile file for detectors given in arguments # -########################################################################### -# loop recursively on sub-directories containing a Makefile file -for file in */Makefile -do - # remove "Makefile" string from file name - name=${file%\/*} - # file name in lower case - lname=$(printf "$name\n" | tr '[A-Z]' '[a-z]') - # if no arguments are given, add all detectors in Makefile.detector - # by default - - if [ $# = 0 ] ; then - #ignore the core folder - if printf "$corelibs\n" | grep -q "$lname" ; then - printf "" - else - # build commands - ./scripts/makefile_detector.sh $name $outfile - fi - else - # only add Makefile.detector target if it is in the - # arguments list - if printf "$args\n" | grep -q "$lname" ; then - # build commands - ./scripts/makefile_detector.sh $name $outfile - fi ; - fi ; -done - - - -########################################################################## -# Create DetectorList.inc file in VDetector directory used for compiling # -# only the detectors given in arguments # -########################################################################## -# output file -outfile="DetectorList.inc" -# outfile="VDetector/DetectorList.inc" -printf " + Creating $outfile file.....\n" - -# if output file exists delete it -if [ -e $outfile ] ; then - rm $outfile -fi ; - -# create output file -printf "// WARNING:\n" >> $outfile -printf "// This file is automatically generated by the configure script.\n" >> $outfile -printf "// If you modify this file by hand, changes won't persist the next time you run ./configure.\n" >> $outfile -printf "//\n" >> $outfile - -# loop recursively on sub-directories containing a Makefile file -for file in */Makefile -do - # remove "Makefile" string from file name - name=${file%\/*} - # file name in lower/upper case - lname=$(printf "$name\n" | tr '[A-Z]' '[a-z]') - uname=$(printf "$name\n" | tr '[a-z]' '[A-Z]') - # if no arguments are given, add all detectors in Makefile.detector - # by default - if [ $# = 0 ] ; then - # build target - printf "#define INC_$uname\n" >> $outfile - else - # only add Makefile.detector target if it is in the - # arguments list - if printf "$args\n" | grep -q "$lname" ; then - # build target - printf "#define INC_$uname\n" >> $outfile - fi ; - fi ; -done - - - -