/[PAMELA software]/DarthVader/TrackerLevel2/Makefile
ViewVC logotype

Diff of /DarthVader/TrackerLevel2/Makefile

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.9 by pam-fi, Tue Nov 7 15:55:10 2006 UTC revision 1.24 by pam-fi, Mon Feb 19 16:28:39 2007 UTC
# Line 1  Line 1 
1  # Tracker flight analysis software  # Tracker flight analysis software
2  # SOFTWARE VERSION  # SOFTWARE VERSION
3  VER= v2r00  VER= v2r05
4  DEBUG=0  DEBUG=0
5  # An almost general purpouse Makefile for PAMELA repository  # An almost general purpouse Makefile for PAMELA repository
6  # Let's start with some usefull definition for colorize the echo  # Let's start with some usefull definition for colorize the echo
7  RED='\E[1;31;40m'  RED='\E[1;31;40m'
8  GREEN='\E[1;32;40m'  GREEN='\E[1;32;40m'
9  YELLOW='\E[1;33;40m'  YELLOW='\E[1;33;40m'
10  BLUE='\E[1;34;40m'  BLUE='\E[1;34;40m'
11  WHITE='\E[1;37;40m'  WHITE='\E[1;37;40m'
12  VIOLET='\E[1;35;40m'  VIOLET='\E[1;35;40m'
13  CYAN='\E[1;36;40m'  CYAN='\E[1;36;40m'
14  # Here the echo definition to use them  # Here the echo definition to use them
15  EVIOLET=echo -e ${VIOLET}  EVIOLET=echo -e ${VIOLET}
16  ECYAN=echo -e ${CYAN}  ECYAN=echo -e ${CYAN}
17  ERED=echo -e ${RED}  ERED=echo -e ${RED}
18  EGREEN=echo -e ${GREEN}  EGREEN=echo -e ${GREEN}
19  EYELLOW=echo -e ${YELLOW}  EYELLOW=echo -e ${YELLOW}
20  EBLUE=echo -e ${BLUE}  EBLUE=echo -e ${BLUE}
21  EWHITE=echo -e ${WHITE}  EWHITE=echo -e ${WHITE}
22  # Reset the terminal  # Reset the terminal
23  RESET=tput sgr0  RESET=tput sgr0
24  # Here the variables used to override the standard make flags  # Here the variables used to override the standard make flags
25  # C  # C
26  CC=gcc  CC=gcc
27  #CFLAGS=-Wall -O -fPIC -pthread -g  #CFLAGS=-Wall -O -fPIC -pthread -g
28  CFLAGS=-Wall -O -fPIC -pthread  CFLAGS=-Wall -O -fPIC -pthread
29  # Enviroment:  # Enviroment:
30  GCCVER=`gcc --version | head -1`  GCCVER=`gcc --version | head -1`
31  UNAMEA=`uname -a`  UNAMEA=`uname -a`
32  TODAY=`date`  TODAY=`date`
33  # F77  # F77
34  F77=g77  F77=g77
35  #F77FLAGS=  -Wall -Wno-globals -fvxt -fno-automatic -fbounds-check -g -extend_source -static -fno-backslash  #F77FLAGS=  -Wall -Wno-globals -fvxt -fno-automatic -fbounds-check -g -extend_source -static -fno-backslash
36  F77FLAGS=  -Wall -Wno-globals -fvxt -fno-automatic -fbounds-check -extend_source -static -fno-backslash  F77FLAGS=  -Wall -Wno-globals -fvxt -fno-automatic -fbounds-check -extend_source -static -fno-backslash -fPIC
37  # C++  # C++
38  CXX=g++  CXX=g++
39  #CXXFLAGS=-Wall -O -fPIC -pthread -g -D'DEBUG=${DEBUG}'  #CXXFLAGS=-Wall -O -fPIC -pthread -g -D'DEBUG=${DEBUG}'
40  #CXXFLAGS=-Wall -O -fPIC -pthread -g -D'DEBUG=0'  #CXXFLAGS=-Wall -O -fPIC -pthread -g -D'DEBUG=0'
41  #CXXFLAGS=-Wall -O -fPIC -pthread -fpermissive  #CXXFLAGS=-Wall -O -fPIC -pthread -fpermissive
42  CXXFLAGS=-Wall -O -fPIC -pthread  CXXFLAGS=-Wall -O4 -fPIC -pthread
43  # ROOTCINT  # ROOTCINT
44  ROOTCINT=rootcint  ROOTCINT=rootcint
45  # Here the variables definig the local directories  # Here the variables definig the local directories
46  DIRTOP=${shell pwd}  DIRTOP=${shell pwd}
47  #DIRLIB=lib/${ARCH}/  #DIRLIB=lib/${ARCH}/
48  #DIRBIN=bin/${ARCH}/  #DIRBIN=bin/${ARCH}/
49  DIRLIB=../lib/${ARCH}/  DIRLIB=../lib/${ARCH}/
50  DIRBIN=../bin/${ARCH}/  DIRBIN=../bin/${ARCH}/
51  DIRSRC=src  DIRSRC=src
52  DIRINC=inc  DIRINC=inc
53  DIRDOC=doc  DIRDOC=doc
54  DIRMACROS=macros  DIRMACROS=macros
55  DIRCALIB=calib  DIRCALIB=calib
56  # Here the  PAMELA environmental variables to be checked  # Here the  PAMELA environmental variables to be checked
57  PAM_ENV= PAM_BIN_env PAM_LIB_env PAM_INC_env PAM_DOC_env PAM_YODA_env  PAM_ENV= PAM_BIN_env PAM_LIB_env PAM_INC_env PAM_DOC_env PAM_YODA_env
58  # Here the local variables used to build the targets  # Here the local variables used to build the targets
59  #-------------------------------------------------  #-------------------------------------------------
60  FSRCS=${DIRSRC}/F77/fillpedsig.f   \  FSRCS=${DIRSRC}/F77/fillpedsig.f   \
61          ${DIRSRC}/F77/readallparam.f \          ${DIRSRC}/F77/readallparam.f \
62          ${DIRSRC}/F77/functions.f    \          ${DIRSRC}/F77/functions.f    \
63          ${DIRSRC}/F77/cncomp.f    \          ${DIRSRC}/F77/cncomp.f    \
64          ${DIRSRC}/F77/filladc.f    \          ${DIRSRC}/F77/filladc.f    \
65          ${DIRSRC}/F77/reductionflight.f \          ${DIRSRC}/F77/reductionflight.f \
66          ${DIRSRC}/F77/functionspfa.f    \          ${DIRSRC}/F77/functionspfa.f    \
67          ${DIRSRC}/F77/mini.f \          ${DIRSRC}/F77/mini.f \
68          ${DIRSRC}/F77/tricircle.f \          ${DIRSRC}/F77/tricircle.f \
69          ${DIRSRC}/F77/analysissubroutines.f \          ${DIRSRC}/F77/analysissubroutines.f \
70          ${DIRSRC}/F77/analysisflight.f \          ${DIRSRC}/F77/analysisflight.f \
71          ${DIRSRC}/F77/readB.f \          ${DIRSRC}/F77/readB.f \
72          ${DIRSRC}/F77/interB.f \          ${DIRSRC}/F77/interB.f \
73          ${DIRSRC}/F77/track.f \          ${DIRSRC}/F77/track.f \
74          ${DIRSRC}/F77/grkuta.f          ${DIRSRC}/F77/grkuta.f \
75            ${DIRSRC}/F77/bdll.f      # ***PP***
76  FOBJS=$(FSRCS:${DIRSRC}/F77/%.f=${DIRLIB}/%.o)  
77  #-------------------------------------------------  FOBJS=$(FSRCS:${DIRSRC}/F77/%.f=${DIRLIB}/%.o)
78  CSRCS=  #-------------------------------------------------
79  COBJS=$(CSRCS:${DIRSRC}%.cpp=${DIRLIB}/%.o)  CSRCS=
80  #-------------------------------------------------  COBJS=$(CSRCS:${DIRSRC}%.cpp=${DIRLIB}/%.o)
81  # librerie utilizzabili da root (ci deve essere anche il ***LinkDef.h )  #-------------------------------------------------
82  LIBROOTSRCS=    ${DIRSRC}/TrkLevel2.cpp  \  # librerie utilizzabili da root (ci deve essere anche il ***LinkDef.h )
83                                  ${DIRSRC}/TrkLevel1.cpp  LIBROOTSRCS=${DIRSRC}/TrkParams.cpp \
84  #LIBROOTSRCS=            ${DIRSRC}/TrkLevel2.cpp  \
85  LIBROOTLIBS=$(LIBROOTSRCS:${DIRSRC}/%.cpp=${DIRLIB}/lib%_${VER}.so)          ${DIRSRC}/TrkLevel1.cpp \
86  LIBROOTOBJS=${DIRLIB}/readB.o ${DIRLIB}/interB.o ${DIRLIB}/track.o ${DIRLIB}/grkuta.o ${DIRLIB}/functionspfa.o ${DIRLIB}/readallparam.o ${DIRLIB}/functions.o ${DIRLIB}/mini.o          ${DIRSRC}/TrkLevel0.cpp \
87  LIBROOTCLIBS=libTrkLevel2 libTrkLevel1          ${DIRSRC}/TrkHough.cpp \
88  #LIBROOTCLIBS=          ${DIRSRC}/TrkCalib.cpp
89  FULLROOTCLIBS=$(LIBROOTCLIBS:%=${DIRLIB}/%_${VER}.so)  
90  #-------------------------------------------------  #LIBROOTSRCS=  
91  # librerie C++ NON utilizzabili da root  LIBROOTLIBS=$(LIBROOTSRCS:${DIRSRC}/%.cpp=${DIRLIB}/lib%_${VER}.so)
92  #LIBCPPSRCS=  ${DIRSRC}/TrkLevel2.cpp \  LIBROOTOBJS=${DIRLIB}/readB.o \
93  #               ${DIRSRC}/TrkLevel0.cpp          ${DIRLIB}/interB.o \
94  LIBCPPSRCS=${DIRSRC}/TrkLevel0.cpp \          ${DIRLIB}/track.o \
95             ${DIRSRC}/TrkStruct.cpp \          ${DIRLIB}/grkuta.o \
96             ${DIRSRC}/TrkProcess.cpp \          ${DIRLIB}/bdll.o \
97             ${DIRSRC}/TrkVerl2.cpp \          ${DIRLIB}/functionspfa.o \
98             ${DIRSRC}/TrkCore.cpp            ${DIRLIB}/readallparam.o \
99  LIBCPPLIBS=$(LIBCPPSRCS:${DIRSRC}/%.cpp=${DIRLIB}/lib%_${VER}.so)          ${DIRLIB}/functions.o  \
100  #LIBCPPCLIBS=libTrkLevel2 libTrkLevel0          ${DIRLIB}/mini.o  \
101  LIBCPPCLIBS=libTrkLevel0 libTrkStruct libTrkProcess libTrkCore libTrkVerl2          ${DIRLIB}/tricircle.o  \
102  FULLCPPCLIBS=$(LIBCPPCLIBS:%=${DIRLIB}/%_${VER}.so)          ${DIRLIB}/analysisflight.o  \
103  #-------------------------------------------------          ${DIRLIB}/analysissubroutines.o  \
104  # librerie F77 NON utilizzabili da root          ${DIRLIB}/fillpedsig.o  \
105  LIBF77SRCS=          ${DIRLIB}/cncomp.o  \
106  LIBF77OBJS= $(LIBF77SRCS:${DIRSRC}/F77/%.f=${DIRLIB}/%.o)          ${DIRLIB}/filladc.o  \
107  LIBF77LIBS= $(LIBF77SRCS:${DIRSRC}/F77/%.f=${DIRLIB}/lib%_${VER}.so)          ${DIRLIB}/reductionflight.o
108  LIBF77CLIBS=  LIBROOTCLIBS= libTrkParams libTrkLevel2 libTrkLevel1 libTrkLevel0 libTrkHough libTrkCalib
109  FULLF77CLIBS=$(LIBF77CLIBS:%=${DIRLIB}/%_${VER}.so)  
110  #-------------------------------------------------  #LIBROOTCLIBS=
111  FULLLIBS=${FULLROOTCLIBS} ${FULLCPPCLIBS} ${FULLF77CLIBS}  FULLROOTCLIBS=$(LIBROOTCLIBS:%=${DIRLIB}/%_${VER}.so)
112    #-------------------------------------------------
113  #-------------------------------------------------  # librerie C++ NON utilizzabili da root
114  # eseguibile  #LIBCPPSRCS=  ${DIRSRC}/TrkLevel2.cpp \
115  CXXEXESRCS=${DIRSRC}/TrackerLevel2.cpp  #               ${DIRSRC}/TrkLevel0.cpp
116  CXXEXEOBJS=$(CXXEXESRCS:${DIRSRC}%.cpp=${DIRLIB}%.o)  LIBCPPSRCS=${DIRSRC}/TrkStruct.cpp \
117  CXXEXELIBS:=TrackerLevel2             ${DIRSRC}/TrkProcess.cpp \
118               ${DIRSRC}/TrkVerl2.cpp \
119  OTHERLIBS=${PAM_LIB}/libGLTables.so ${DIRLIB}/libRunInfo.so             ${DIRSRC}/TrkCore.cpp \
120  SUBDIR=../RunInfo  #          ${DIRSRC}/TrkLevel0.cpp
121  SUBINC=$(shell for dir in `echo ${SUBDIR}`; do echo -I$${dir}/inc; done)  
122    LIBCPPLIBS=$(LIBCPPSRCS:${DIRSRC}/%.cpp=${DIRLIB}/lib%_${VER}.so)
123  #-------------------------------------------------  #LIBCPPCLIBS=libTrkLevel2 libTrkLevel0
124  # variabili per l'installazione  LIBCPPCLIBS= libTrkStruct libTrkProcess libTrkCore libTrkVerl2 #libTrkLevel0
125  EXESRCS=${DIRBIN}/TrackerLevel2  FULLCPPCLIBS=$(LIBCPPCLIBS:%=${DIRLIB}/%_${VER}.so)
126  INCSRCS= \  #-------------------------------------------------
127          ${DIRINC}/TrkLevel2.h \  # librerie F77 NON utilizzabili da root
128          ${DIRINC}/TrkLevel1.h \  LIBF77SRCS=
129          ${DIRINC}/TrkLevel0.h \  LIBF77OBJS= $(LIBF77SRCS:${DIRSRC}/F77/%.f=${DIRLIB}/%.o)
130          ${DIRINC}/TrkStruct.h \  LIBF77LIBS= $(LIBF77SRCS:${DIRSRC}/F77/%.f=${DIRLIB}/lib%_${VER}.so)
131          ${DIRINC}/TrkProcess.h \  LIBF77CLIBS=
132          ${DIRINC}/TrkCore.h \  FULLF77CLIBS=$(LIBF77CLIBS:%=${DIRLIB}/%_${VER}.so)
133          ${DIRINC}/TrkVerl2.h  #-------------------------------------------------
134  MACROSSRCS=  FULLLIBS=${FULLROOTCLIBS} ${FULLCPPCLIBS} ${FULLF77CLIBS}
135  CALIBFILES=  
136  DOCFILES=  #-------------------------------------------------
137  # Here the Variables used for info target  # eseguibile
138  PACKAGE=Tracker flight software  CXXEXESRCS=${DIRSRC}/TrackerLevel2.cpp
139  EXECUTABLES=${EXESRCS}  CXXEXEOBJS=$(CXXEXESRCS:${DIRSRC}%.cpp=${DIRLIB}%.o)
140  LIBS= ${FULLLIBS} ${OTHERLIBS}  CXXEXELIBS:=TrackerLevel2
141  DOCS=  
142  SRCS=  OTHERLIBS=${PAM_LIB}/libGLTables.so ${DIRLIB}/libRunInfo.so
143  MACROS= ${MACROSSRCS}  SUBDIR=../RunInfo
144  INCLUDE= ${INCSRCS}  SUBINC=$(shell for dir in `echo ${SUBDIR}`; do echo -I$${dir}/inc; done)
145  #  
146  TOBEDEL = junk  #-------------------------------------------------
147  ROOTINC=$$${shell root-config --incdir}  # variabili per l'installazione
148  NROOTINC=${shell root-config --incdir}  EXESRCS=${DIRBIN}/TrackerLevel2
149  # Let's start  INCSRCS= \
150  #all : test mkbindir mklibdir mkverpath ${LIBF77LIBS} ${LIBROOTLIBS} ${LIBCPPLIBS} ${FOBJS} ${COBJS} ${CXXEXELIBS}          ${DIRINC}/TrkLevel2.h \
151  all : test mkbindir mklibdir mkverpath ${LIBF77LIBS} ${LIBROOTLIBS} ${LIBCPPLIBS}          ${DIRINC}/TrkLevel1.h \
152  all:          ${DIRINC}/TrkLevel0.h \
153          @echo -e ${GREEN} ""          ${DIRINC}/TrkHough.h \
154          @(${EGREEN} " Finished, now you can install the package \n  (use: make install or make upgrade or make forceinstall) "; ${RESET})          ${DIRINC}/TrkCalib.h \
155          @echo -e ${GREEN} ""          ${DIRINC}/TrkParams.h \
156          @${RESET}          ${DIRINC}/TrkStruct.h \
157            ${DIRINC}/TrkProcess.h \
158  standalone: all ${CXXEXELIBS}          ${DIRINC}/TrkCore.h \
159            ${DIRINC}/TrkVerl2.h
160  # Here some general rules to produce objects in our local dir  MACROSSRCS=
161  ${DIRLIB}/%.o: ${DIRSRC}/%.cpp  CALIBFILES=
162  #       @(${EYELLOW} " C++ object ------------------------")  DOCFILES=
163          @(${EGREEN} "Creating C++ object file: "${WHITE} "$@"; ${RESET})  # Here the Variables used for info target
164          @${CXX} ${CXXFLAGS} -c -o $@ ${DIRSRC}/`basename ${@} .o`.cpp -I${DIRTOP}/${DIRINC} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_INC}/ `root-config --cflags`  PACKAGE=Tracker flight software
165    EXECUTABLES=${EXESRCS}
166  ${DIRLIB}/%.o : ${DIRSRC}/F77/%.f  LIBS= ${FULLLIBS} ${OTHERLIBS}
167  #       @(${EYELLOW} " F77 object ------------------------")  DOCS=
168          @(${EGREEN} "Creating F77 object file: "${WHITE} "$@"; ${RESET})  SRCS=
169          @${F77} ${F77FLAGS} -c -o $@ ${DIRSRC}/F77/`basename ${@} .o`.f -I${DIRTOP}/${DIRINC}/F77 -I${NROOTINC} ${SUBINC} -I${PAM_YODA}/include/yoda -I${PAM_INC}/  MACROS= ${MACROSSRCS}
170    INCLUDE= ${INCSRCS}
171  # .so from .o fortran  #
172  ${LIBF77LIBS}: ${LIBF77OBJS}  TOBEDEL = junk
173          @(${EYELLOW} " F77 shared library --------------------------")  ROOTINC=$$${shell root-config --incdir}
174          @(${EGREEN} "Creating library: "${WHITE} "$@"; ${RESET})  NROOTINC=${shell root-config --incdir}
175  #       @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ $^ `cernlib mathlib` /usr/lib/libg2c.so.0  # Let's start
176  ##      @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c $^ `cernlib mathlib`  #all : test mkbindir mklibdir mkverpath ${LIBF77LIBS} ${LIBROOTLIBS} ${LIBCPPLIBS} ${FOBJS} ${COBJS} ${CXXEXELIBS}
177          @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c $^  all : test mkbindir mklibdir mkverpath ${LIBF77LIBS} ${LIBROOTLIBS} ${LIBCPPLIBS}
178    all:
179  ${LIBROOTLIBS}: ${LIBROOTSRCS} ${FOBJS}          @echo -e ${GREEN} ""
180          @(${EYELLOW} " ROOT library ------------------------")          @(${EGREEN} " Finished, now you can install the package \n  (use: make install or make upgrade or make forceinstall) "; ${RESET})
181          @(${EGREEN} "Creating file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`Dict.cpp"; ${RESET})          @echo -e ${GREEN} ""
182  #          @${RESET}
183  #       Create *Dict.cpp and *Dict.h  
184  #  standalone: all ${CXXEXELIBS}
185          @${ROOTCINT} -f ${DIRSRC}/`basename $(@F) _${VER}.so | sed s/lib//`Dict.cpp -c -I${ROOTINC} -I${PAM_YODA}/include/yoda/ -I${PAM_INC}/ ${DIRINC}/`basename $(@F) _${VER}.so | sed s/lib//`.h ${DIRINC}/`basename $(@F) _${VER}.so | sed s/lib//`LinkDef.h  
186  #  # Here some general rules to produce objects in our local dir
187  #       create .o  ${DIRLIB}/%.o: ${DIRSRC}/%.cpp
188  #  #       @(${EYELLOW} " C++ object ------------------------")
189          @(${EGREEN} "Compiling file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`.cpp"; ${RESET})          @(${EGREEN} "Creating C++ object file: "${WHITE} "$@"; ${RESET})
190          @${CXX} ${CXXFLAGS} -c ${DIRTOP}/${DIRSRC}/`basename $(@F) _${VER}.so | sed s/lib//`.cpp  -o ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`.o -I${DIRTOP}/${DIRINC} -I${DIRTOP} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_INC}/ -I${NROOTINC};          @${CXX} ${CXXFLAGS} -c -o $@ ${DIRSRC}/`basename ${@} .o`.cpp -I${DIRTOP}/${DIRINC} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_INC}/ `root-config --cflags`
191          @(${EGREEN} "Compiling file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`Dict.cpp"; ${RESET})  
192          @${CXX} ${CXXFLAGS} -c ${DIRTOP}/${DIRSRC}/`basename $(@F) _${VER}.so | sed s/lib//`Dict.cpp -o ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`Dict.o -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_INC} -I${PAM_YODA}/include/yoda/ -I${NROOTINC};  ${DIRLIB}/%.o : ${DIRSRC}/F77/%.f
193          @ln -sf  ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F))  #       @(${EYELLOW} " F77 object ------------------------")
194  #          @(${EGREEN} "Creating F77 object file: "${WHITE} "$@"; ${RESET})
195  #       create .so          @${F77} ${F77FLAGS} -c -o $@ ${DIRSRC}/F77/`basename ${@} .o`.f -I${DIRTOP}/${DIRINC}/F77 -I${NROOTINC} ${SUBINC} -I${PAM_YODA}/include/yoda -I${PAM_INC}/
196  #  
197          @(${EGREEN} "Compiling shared library: "${WHITE} "$@"; ${RESET})  # .so from .o fortran
198  ##      @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_YODA}/include/yoda -I${PAM_INC} ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`.o ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`Dict.o ${LIBROOTOBJS} `cernlib mathlib` 1>/dev/null          ${LIBF77LIBS}: ${LIBF77OBJS}
199          @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_YODA}/include/yoda -I${PAM_INC} ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`.o ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`Dict.o ${LIBROOTOBJS} 1>/dev/null            @(${EYELLOW} " F77 shared library --------------------------")
200  #       ${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_YODA}/include/yoda/ ${SUBINC} ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`.o ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`Dict.o 1>/dev/null          @(${EGREEN} "Creating library: "${WHITE} "$@"; ${RESET})
201          @ln -sf  ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F))  #       @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ $^ `cernlib mathlib` /usr/lib/libg2c.so.0
202          @(${EYELLOW} " -------------------------------------")  ##      @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c $^ `cernlib mathlib`
203            @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c $^
204  ${LIBCPPLIBS}: ${LIBCPPSRCS}  
205  #  ${LIBROOTLIBS}: ${LIBROOTSRCS} ${FOBJS}
206  #       create .o          @(${EYELLOW} " ROOT library ------------------------")
207  #          @(${EGREEN} "Creating file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`Dict.cpp"; ${RESET})
208          @(${EGREEN} "Compiling file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`.cpp"; ${RESET})  #
209          @${CXX} ${CXXFLAGS} -c ${DIRTOP}/${DIRSRC}/`basename $(@F) _${VER}.so | sed s/lib//`.cpp -o ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`.o -I${DIRTOP}/${DIRINC} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_INC}/ -I${NROOTINC};  #       Create *Dict.cpp and *Dict.h
210  #  #
211  #       create .so          @${ROOTCINT} -f ${DIRSRC}/`basename $(@F) _${VER}.so | sed s/lib//`Dict.cpp -c -I${DIRINC} -I${ROOTINC} -I${PAM_YODA}/include/yoda/ -I${PAM_INC}/ ${DIRINC}/`basename $(@F) _${VER}.so | sed s/lib//`.h ${DIRINC}/`basename $(@F) _${VER}.so | sed s/lib//`LinkDef.h
212  #  #
213          @(${EGREEN} "Compiling shared library: "${WHITE} "$@"; ${RESET})  #       create .o
214          @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c -I${DIRTOP}/${DIRINC} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_INC}/ ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`.o ${OTHERLIBS} ${FOBJS} 1>/dev/null  #
215          @ln -sf  ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F))          @(${EGREEN} "Compiling file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`.cpp"; ${RESET})
216            @${CXX} ${CXXFLAGS} -c ${DIRTOP}/${DIRSRC}/`basename $(@F) _${VER}.so | sed s/lib//`.cpp  -o ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`.o -I${DIRTOP}/${DIRINC} -I${DIRTOP} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_INC}/ -I${NROOTINC};
217            @(${EGREEN} "Compiling file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`Dict.cpp"; ${RESET})
218  ${CXXEXELIBS}: ${COBJS} ${FOBJS} ${CXXEXEOBJS}          @${CXX} ${CXXFLAGS} -c ${DIRTOP}/${DIRSRC}/`basename $(@F) _${VER}.so | sed s/lib//`Dict.cpp -o ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`Dict.o -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_INC} -I${PAM_YODA}/include/yoda/ -I${NROOTINC};
219          @(${EVIOLET} "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * *")          @ln -sf  ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F))
220          @(${EGREEN} "Creating exec file: "${WHITE} "$@"; ${RESET})  #
221  #       @${CXX} ${CXXFLAGS} -o ${DIRBIN}/$@ ${DIRLIB}/$@.o -I${DIRTOP}/${DIRINC} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_YODA}/include/utils/ ${PAM_YODA}/lib/libyoda.so ${PAM_YODA}/lib/libutils.so ${FOBJS} ${COBJS} ${FULLLIBS} ${OTHERLIBS} -lThread `root-config --cflags --glibs` `cernlib mathlib` /usr/lib/libg2c.so.0;  #       create .so
222          @${CXX} ${CXXFLAGS} -o ${DIRBIN}/$@ ${DIRLIB}/$@.o -I${DIRTOP}/${DIRINC} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_INC}/ ${PAM_YODA}/lib/libyoda.so ${FOBJS} ${COBJS} ${FULLLIBS} ${OTHERLIBS} -lThread -lg2c `root-config --cflags --glibs` `cernlib mathlib`;  #
223            @(${EGREEN} "Compiling shared library: "${WHITE} "$@"; ${RESET})
224    ##      @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_YODA}/include/yoda -I${PAM_INC} ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`.o ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`Dict.o ${LIBROOTOBJS} `cernlib mathlib` 1>/dev/null        
225  # A small target to check environmental variables          @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_YODA}/include/yoda -I${PAM_INC} ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`.o ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`Dict.o ${LIBROOTOBJS} 1>/dev/null  
226  %_env:  #       ${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_YODA}/include/yoda/ ${SUBINC} ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`.o ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`Dict.o 1>/dev/null
227          @${test_env}          @ln -sf  ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F))
228            @(${EYELLOW} " -------------------------------------")
229  .PHONY: install installdoc installlib installmacros installinc installexe installcmacro  
230  .PHONY: clean depclean info mkbindir mklibdir testcern testpamenv test  ${LIBCPPLIBS}: ${LIBCPPSRCS}
231    #
232  mkbindir: ${DIRBIN}  #       create .o
233  ${DIRBIN}:  #
234          @${test_and_mk}          @(${EGREEN} "Compiling file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`.cpp"; ${RESET})
235            @${CXX} ${CXXFLAGS} -c ${DIRTOP}/${DIRSRC}/`basename $(@F) _${VER}.so | sed s/lib//`.cpp -o ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`.o -I${DIRTOP}/${DIRINC} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_INC}/ -I${NROOTINC};
236  mklibdir: ${DIRLIB}  #
237  ${DIRLIB}:  #       create .so
238          @${test_and_mk}  #
239            @(${EGREEN} "Compiling shared library: "${WHITE} "$@"; ${RESET})
240  # Here what has to be deleted in clean target          @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c -I${DIRTOP}/${DIRINC} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_INC}/ ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`.o ${OTHERLIBS} ${FOBJS} 1>/dev/null
241  clean: TOBEDEL= ${DIRSRC}/*.o ${DIRSRC}/*Dict.cpp ${DIRSRC}/*Dict.h ${FOBJS} ${FULLLIBS} ${DIRBIN}/${CXXEXELIBS} ${COBJS} ${CXXEXEOBJS} ${DIRSRC}/TrkVerl2.cpp          @ln -sf  ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F))
242  clean:  
243          @${test_and_rm}  
244    ${CXXEXELIBS}: ${COBJS} ${FOBJS} ${CXXEXEOBJS}
245  distclean: clean          @(${EVIOLET} "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * *")
246  distclean: TOBEDEL= ${DIRBIN} ${DIRLIB}          @(${EGREEN} "Creating exec file: "${WHITE} "$@"; ${RESET})
247  distclean:  #       @${CXX} ${CXXFLAGS} -o ${DIRBIN}/$@ ${DIRLIB}/$@.o -I${DIRTOP}/${DIRINC} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_YODA}/include/utils/ ${PAM_YODA}/lib/libyoda.so ${PAM_YODA}/lib/libutils.so ${FOBJS} ${COBJS} ${FULLLIBS} ${OTHERLIBS} -lThread `root-config --cflags --glibs` `cernlib mathlib` /usr/lib/libg2c.so.0;
248          @${test_and_rm}          @${CXX} ${CXXFLAGS} -o ${DIRBIN}/$@ ${DIRLIB}/$@.o -I${DIRTOP}/${DIRINC} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_INC}/ ${PAM_YODA}/lib/libyoda.so ${FOBJS} ${COBJS} ${FULLLIBS} ${OTHERLIBS} -lThread -lg2c `root-config --cflags --glibs` `cernlib_noshift mathlib`;
249    
250  forceinstall: FORCE=-f  
251  forceinstall: install  # A small target to check environmental variables
252    %_env:
253  upgrade: FORCE=-u          @${test_env}
254  upgrade: install  
255  upgradestandalone: FORCE=-u  .PHONY: install installdoc installlib installmacros installinc installexe installcmacro
256  upgradestandalone: installstandalone  .PHONY: clean depclean info mkbindir mklibdir testcern testpamenv test
257    
258  install: installlib installinc installmacros installcalib installdoc installcmacro  mkbindir: ${DIRBIN}
259  installstandalone: install installexe  ${DIRBIN}:
260            @${test_and_mk}
261  installlib: LINK=y  
262  installlib: TOBEMOVED= $(FULLLIBS:${DIRLIB}%=${PAM_LIB}%)  mklibdir: ${DIRLIB}
263  installlib: ORIGIN=${DIRLIB}  ${DIRLIB}:
264  installlib:          @${test_and_mk}
265          @${test_and_cp}  
266    # Here what has to be deleted in clean target
267  installcmacro: LINK=y  clean: TOBEDEL= ${DIRSRC}/*.o ${DIRSRC}/*Dict.cpp ${DIRSRC}/*Dict.h ${FOBJS} ${FULLLIBS} ${DIRBIN}/${CXXEXELIBS} ${COBJS} ${CXXEXEOBJS} ${DIRSRC}/TrkVerl2.cpp
268  installcmacro: TOBEMOVED= $(FULLMACROCLIBS:${DIRLIB}%=${PAM_LIB}%)  clean:
269  installcmacro: ORIGIN=${DIRLIB}          @${test_and_rm}
270  installcmacro:  
271          @${test_and_cp}  distclean: clean
272    distclean: TOBEDEL= ${DIRBIN} ${DIRLIB}
273  installinc: TOBEMOVED= $(INCSRCS:${DIRINC}/%=${PAM_INC}/%)  distclean:
274  installinc: ORIGIN=${DIRINC}          @${test_and_rm}
275  installinc:  
276          @${test_and_cp}  forceinstall: FORCE=-f
277    forceinstall: install
278  installexe: TOBEMOVED= $(EXESRCS:${DIRBIN}/%=${PAM_BIN}/%)  
279  installexe: ORIGIN=${DIRBIN}  upgrade: FORCE=-u
280  installexe:  upgrade: install
281          @${test_and_cp}  upgradestandalone: FORCE=-u
282    upgradestandalone: installstandalone
283  installmacros: TOBEMOVED= $(MACROSSRCS:${DIRMACROS}/%=${PAM_MACROS}/%)  
284  installmacros: ORIGIN=${DIRMACROS}  install: installlib installinc installmacros installcalib installdoc installcmacro
285  installmacros:  installstandalone: install installexe
286          @${test_and_cp}  
287    installlib: LINK=y
288  installcalib: TOBEMOVED= $(CALIBFILES:${DIRCALIB}/%=${PAM_CALIB}/%)  installlib: TOBEMOVED= $(FULLLIBS:${DIRLIB}%=${PAM_LIB}%)
289  installcalib: ORIGIN=${DIRCALIB}  installlib: ORIGIN=${DIRLIB}
290  installcalib:  installlib:
291          @${test_and_cp}          @${test_and_cp}
292    
293  installdoc: TOBEMOVED= $(DOCFILES:${DIRDOC}/%=${PAM_DOC}/%)  installcmacro: LINK=y
294  installdoc: ORIGIN=${DIRDOC}  installcmacro: TOBEMOVED= $(FULLMACROCLIBS:${DIRLIB}%=${PAM_LIB}%)
295  installdoc:  installcmacro: ORIGIN=${DIRLIB}
296          @${test_and_cp}  installcmacro:
297            @${test_and_cp}
298  mkverpath:  
299  #       @echo '#include <TSystem.h>' >  ${DIRTOP}/${DIRSRC}/TrkVerl2.cpp; echo ' void info(){ printf("\nTracker Level2 flight package version: ${VER}\n\nCompiled on '${TODAY}' with: '${GCCVER}'\n\nOn: '${UNAMEA}'\n\n"); }' >>  ${DIRTOP}/${DIRSRC}/TrkVerl2.cpp  installinc: TOBEMOVED= $(INCSRCS:${DIRINC}/%=${PAM_INC}/%)
300          @echo '#include <TSystem.h>' >  ${DIRTOP}/${DIRSRC}/TrkVerl2.cpp; echo ' char *TrkInfo(bool print){ if ( print ) printf("\nTracker Level2 flight package version: ${VER}\n\nCompiled on '${TODAY}' with: '${GCCVER}'\n\nOn: '${UNAMEA}'\n\n"); return("${VER}"); }' >>  ${DIRTOP}/${DIRSRC}/TrkVerl2.cpp  installinc: ORIGIN=${DIRINC}
301          @sleep 0.8  installinc:
302            @${test_and_cp}
303    
304    installexe: TOBEMOVED= $(EXESRCS:${DIRBIN}/%=${PAM_BIN}/%)
305  info:  installexe: ORIGIN=${DIRBIN}
306          @echo " "  installexe:
307          @${EGREEN} "Infos for package :" ${WHITE} ${PACKAGE}          @${test_and_cp}
308          @${EGREEN} "          VERSION :" ${WHITE} ${VER}  
309          @${EGREEN} "      EXECUTABLES :" ${WHITE} ${EXECUTABLES}  installmacros: TOBEMOVED= $(MACROSSRCS:${DIRMACROS}/%=${PAM_MACROS}/%)
310          @${EGREEN} "         INCLUDES :" ${WHITE} ${INCLUDE}  installmacros: ORIGIN=${DIRMACROS}
311          @${EGREEN} "             LIBS :" ${WHITE} ${LIBS}  installmacros:
312          @${EGREEN} "             DOCS :" ${WHITE} ${DOCS}          @${test_and_cp}
313          @${EGREEN} "             SRCS :" ${WHITE} ${SRCS}  
314          @${EGREEN} "           MACROS :" ${WHITE} ${MACROS}  installcalib: TOBEMOVED= $(CALIBFILES:${DIRCALIB}/%=${PAM_CALIB}/%)
315          @echo " "  installcalib: ORIGIN=${DIRCALIB}
316          @${RESET}  installcalib:
317            @${test_and_cp}
318  test: testpamenv  
319    installdoc: TOBEMOVED= $(DOCFILES:${DIRDOC}/%=${PAM_DOC}/%)
320  testpamenv: ${PAM_ENV}  installdoc: ORIGIN=${DIRDOC}
321    installdoc:
322  root-config: OPT=--cflags          @${test_and_cp}
323  root-config:  
324          @${test_cmd}  mkverpath:
325    #       @echo '#include <TSystem.h>' >  ${DIRTOP}/${DIRSRC}/TrkVerl2.cpp; echo ' void info(){ printf("\nTracker Level2 flight package version: ${VER}\n\nCompiled on '${TODAY}' with: '${GCCVER}'\n\nOn: '${UNAMEA}'\n\n"); }' >>  ${DIRTOP}/${DIRSRC}/TrkVerl2.cpp
326  # Here follows some usefull macros          @echo '#include <TSystem.h>' >  ${DIRTOP}/${DIRSRC}/TrkVerl2.cpp; echo ' char *TrkInfo(bool print){ if ( print ) printf("\nTracker Level2 flight package version: ${VER}\n\nCompiled on '${TODAY}' with: '${GCCVER}'\n\nOn: '${UNAMEA}'\n\n"); return("${VER}"); }' >>  ${DIRTOP}/${DIRSRC}/TrkVerl2.cpp
327  define  test_and_cp          @sleep 0.8
328  wd=`pwd`;\  
329  for i in ${TOBEMOVED} ; do \  
330  wv=$${i##/*/}; \  
331  dest=$${i/$${wv}/}; \  info:
332  ${EGREEN} "Testing for :" ${WHITE} "$${i}" ; ${RESET}; \          @echo " "
333  if [ ! "${FORCE}" ] ; then \          @${EGREEN} "Infos for package :" ${WHITE} ${PACKAGE}
334   if [ ! -f $${i} ]; then  \          @${EGREEN} "          VERSION :" ${WHITE} ${VER}
335    ${EGREEN} "Copying : "${WHITE} ${ORIGIN}/$${i##/*/} ;\          @${EGREEN} "      EXECUTABLES :" ${WHITE} ${EXECUTABLES}
336    ${EGREEN} "      to: "${WHITE} $${i} ; ${RESET}; \          @${EGREEN} "         INCLUDES :" ${WHITE} ${INCLUDE}
337    cp ${ORIGIN}/$${i##/*/} $${i}; \          @${EGREEN} "             LIBS :" ${WHITE} ${LIBS}
338   else \          @${EGREEN} "             DOCS :" ${WHITE} ${DOCS}
339     ${ERED} "File already exist !!!! Please delete it " ${WHITE}; ${RESET}; \          @${EGREEN} "             SRCS :" ${WHITE} ${SRCS}
340   fi;\          @${EGREEN} "           MACROS :" ${WHITE} ${MACROS}
341  else \          @echo " "
342     if [ "${FORCE}" == "-u" ] ; then \          @${RESET}
343       if [ "`basename $${i}`" != "`basename $${i} _${VER}.so`" ]; then \  
344         ${EYELLOW} "Removing: "${WHITE} ${PAM_LIB}/`basename $${i} _${VER}.so`_v*r*.so; ${RESET}; \  test: testpamenv
345         rm -f ${PAM_LIB}/`basename $${i} _${VER}.so`_v*r*.so ; \  
346         ${EGREEN} "Copying : "${WHITE} ${ORIGIN}/$${i##/*/} ;\  testpamenv: ${PAM_ENV}
347         ${EGREEN} "      to: "${WHITE} $${i} ; ${RESET}; \  
348         cp ${ORIGIN}/$${i##/*/} $${i}; \  root-config: OPT=--cflags
349       else \  root-config:
350         ${EYELLOW} " Forcing copy: "${WHITE} ${ORIGIN}/$${i##/*/} ;\          @${test_cmd}
351         ${EYELLOW} "          to: "${WHITE} $${i} ; ${RESET}; \  
352         cp -f ${ORIGIN}/$${i##/*/} $${i}; \  # Here follows some usefull macros
353       fi; \  define  test_and_cp
354     else \  wd=`pwd`;\
355       ${EYELLOW} " Forcing copy: "${WHITE} ${ORIGIN}/$${i##/*/} ;\  for i in ${TOBEMOVED} ; do \
356       ${EYELLOW} "          to: "${WHITE} $${i} ; ${RESET}; \  wv=$${i##/*/}; \
357       cp ${FORCE} ${ORIGIN}/$${i##/*/} $${i}; \  dest=$${i/$${wv}/}; \
358     fi;\  ${EGREEN} "Testing for :" ${WHITE} "$${i}" ; ${RESET}; \
359  fi ;\  if [ ! "${FORCE}" ] ; then \
360  if [ ! -z ${LINK} ] ; then \   if [ ! -f $${i} ]; then  \
361    ${EGREEN} "Creating symlink from : "${WHITE} $${wv/_${VER}/} ;\    ${EGREEN} "Copying : "${WHITE} ${ORIGIN}/$${i##/*/} ;\
362    ${EGREEN} "                   to : "${WHITE} $${i##/*/} ; ${RESET}; \    ${EGREEN} "      to: "${WHITE} $${i} ; ${RESET}; \
363    cd $${dest}; \    cp ${ORIGIN}/$${i##/*/} $${i}; \
364    ln -sf $${wv} $${wv/_${VER}/}; \   else \
365    cd $${wd}; \     ${ERED} "File already exist !!!! Please delete it " ${WHITE}; ${RESET}; \
366  fi \   fi;\
367  done  else \
368  endef     if [ "${FORCE}" == "-u" ] ; then \
369         if [ "`basename $${i}`" != "`basename $${i} _${VER}.so`" ]; then \
370  define  test_and_mk         ${EYELLOW} "Removing: "${WHITE} ${PAM_LIB}/`basename $${i} _${VER}.so`_v*r*.so; ${RESET}; \
371  ${EGREEN} "Testing for :" ${WHITE} "$@"; ${RESET}         rm -f ${PAM_LIB}/`basename $${i} _${VER}.so`_v*r*.so ; \
372  test -d "$@" || \         ${EGREEN} "Copying : "${WHITE} ${ORIGIN}/$${i##/*/} ;\
373  (${EGREEN} "Creating : "${WHITE} "$@"; ${RESET}; mkdir -p $@)         ${EGREEN} "      to: "${WHITE} $${i} ; ${RESET}; \
374  endef         cp ${ORIGIN}/$${i##/*/} $${i}; \
375         else \
376  define  test_env         ${EYELLOW} " Forcing copy: "${WHITE} ${ORIGIN}/$${i##/*/} ;\
377  ${EGREEN} "Testing for env:" ${WHITE} $(patsubst %_env,%,$@); ${RESET}         ${EYELLOW} "          to: "${WHITE} $${i} ; ${RESET}; \
378  printenv $(patsubst %_env,%,$@) 1>/dev/null || \         cp -f ${ORIGIN}/$${i##/*/} $${i}; \
379  (${ERED} "ERROR, variable : "${WHITE} $(patsubst %_env,%,$@) \       fi; \
380  ${RED} "not defined !!! Check your env. settings"; \     else \
381  ${RESET}; exit 1)       ${EYELLOW} " Forcing copy: "${WHITE} ${ORIGIN}/$${i##/*/} ;\
382  ${EGREEN} " Defined:" ${WHITE} $${$(patsubst %_env,%,$@)}; ${RESET}       ${EYELLOW} "          to: "${WHITE} $${i} ; ${RESET}; \
383  endef       cp ${FORCE} ${ORIGIN}/$${i##/*/} $${i}; \
384       fi;\
385  define  test_cmd  fi ;\
386  ${EGREEN} "Testing for cmd:" ${WHITE} $@ ${OPT}; ${RESET}  if [ ! -z ${LINK} ] ; then \
387  $@ ${OPT} 1>/dev/null 2>&1 || \    ${EGREEN} "Creating symlink from : "${WHITE} $${wv/_${VER}/} ;\
388  (${ERED} "ERROR, command : "${WHITE} $@ ${OPT}\    ${EGREEN} "                   to : "${WHITE} $${i##/*/} ; ${RESET}; \
389  ${RED} "not found !!! Check your installation"; \    cd $${dest}; \
390  ${RESET}; exit 1)    ln -sf $${wv} $${wv/_${VER}/}; \
391  ${EGREEN} " Present:" ${WHITE} $@ ${OPT}; ${RESET}    cd $${wd}; \
392  endef  fi \
393    done
394  define  test_and_rm  endef
395  for i in ${TOBEDEL}; do \  
396  test -d $${i} || (${ERED} "Removing file :"${WHITE} $${i}; ${RESET}; \  define  test_and_mk
397  rm -f $${i} ); \  ${EGREEN} "Testing for :" ${WHITE} "$@"; ${RESET}
398  test ! -d $${i} || (${ERED} "Removing dir :"${WHITE} $${i}; ${RESET}; \  test -d "$@" || \
399  rm -rf $${i} ); \  (${EGREEN} "Creating : "${WHITE} "$@"; ${RESET}; mkdir -p $@)
400  done  endef
401  endef  
402    define  test_env
403    ${EGREEN} "Testing for env:" ${WHITE} $(patsubst %_env,%,$@); ${RESET}
404    printenv $(patsubst %_env,%,$@) 1>/dev/null || \
405    (${ERED} "ERROR, variable : "${WHITE} $(patsubst %_env,%,$@) \
406    ${RED} "not defined !!! Check your env. settings"; \
407    ${RESET}; exit 1)
408    ${EGREEN} " Defined:" ${WHITE} $${$(patsubst %_env,%,$@)}; ${RESET}
409    endef
410    
411    define  test_cmd
412    ${EGREEN} "Testing for cmd:" ${WHITE} $@ ${OPT}; ${RESET}
413    $@ ${OPT} 1>/dev/null 2>&1 || \
414    (${ERED} "ERROR, command : "${WHITE} $@ ${OPT}\
415    ${RED} "not found !!! Check your installation"; \
416    ${RESET}; exit 1)
417    ${EGREEN} " Present:" ${WHITE} $@ ${OPT}; ${RESET}
418    endef
419    
420    define  test_and_rm
421    for i in ${TOBEDEL}; do \
422    test -d $${i} || (${ERED} "Removing file :"${WHITE} $${i}; ${RESET}; \
423    rm -f $${i} ); \
424    test ! -d $${i} || (${ERED} "Removing dir :"${WHITE} $${i}; ${RESET}; \
425    rm -rf $${i} ); \
426    done
427    endef

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.24

  ViewVC Help
Powered by ViewVC 1.1.23