]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - share/alibtool
Moving lib*.pkg
[u/mrichter/AliRoot.git] / share / alibtool
index 688c0f4525fc537585ed423219e4f25a154822f1..6a912f2a187ec6e82d4e51af30f4dd15fe77ccaa 100755 (executable)
@@ -1,10 +1,34 @@
 #!/bin/sh
+
+# $Id$
+
 #############################################################################
 # alibtool - a shell script to help makeing modules for AliRoot Makefile
 #############################################################################
 #
 # modification history
 # $Log$
+# Revision 1.6  2003/07/13 09:26:14  hristov
+# Transition to NewIO
+#
+# Revision 1.5  2003/05/02 15:11:52  hristov
+# Changes to avoid warnings (I.Hrivnacova)
+#
+# Revision 1.4  2002/10/14 14:57:45  hristov
+# Merging the VirtualMC branch to the main development branch (HEAD)
+#
+# Revision 1.3.6.1  2002/07/09 12:24:49  alibrary
+# Corrections for new MC
+#
+# Revision 1.3  2002/02/22 07:57:35  alibrary
+# Reduce verbose output
+#
+# Revision 1.2  2001/11/14 17:52:48  hristov
+# Updated version of the flat makefiles (J.-E.Revsbech)
+#
+# Revision 1.1  2001/10/09 13:45:57  hristov
+# alibtool is added
+#
 #
 # SYNOPSIS
 # alirun <command> <commandparameters>
@@ -20,7 +44,7 @@
 #
 # This scipts is called with a primary command and a commandparameter. It generates output on stdout, so normally it is called with a redirection like
 #
-#   alibtool mkmoudle STEER > STEER/module.mk
+#   alibtool mkmodule STEER > STEER/module.mk
 #
 # The command is one of the following
 #
@@ -30,7 +54,7 @@
 # dependF
 #        Makes the dependencies for the file specified as second argument (fortran files)
 #
-# mkmoudle
+# mkmodule
 #        Creates the module.mk for the the given directory specified as the second argument.
 #
 # MKMOUDLE
@@ -40,7 +64,7 @@
 # PKG FILES
 #
 #
-# The syntax for the pkg file is very simple. You specify the sources, headers and possibly extra include or link options. The *.pkg files is just inserted "as is" in the module.mk file, so normal Makefile syntax can be used. These variables can be specified: SRCS, FSRCS, CSRCS, HDRS, CHDRS, DHDR, EINCLUDE, ELIBS, ELIBSDIR, PACKFFLAGS, PACKCFLAGS, PACKCXXFLAGS. The first five is just the c++ sources, fortran sources, c sources, c++ headers and c headers. DHDR is the dictionary header and is the LinkDef file. EINCLUDE, ELIBS and ELIBSDIR is extra includedirs, libraries and library search paths. If for example a binary is to be linked against $ALICE_ROOT/lib/tgt_$ALICE_TARGET/libminicern.so the variable ELIBSDIR would be set to lib/tgt_$ALICE_TARGET and ELIBS = minicern. Notice that -L and -l is not needed. If the PACKFFLAGS, PACKCFLAGS or PACKCXXFLAGS is not set it will be set to the default options (Set in config/Makefile.$ALICE_TARGET. For example on Linux GEANT321 has to be compiled without -O options, so a line like PACKFFLAGS := $(filter-out -O%,$(FFLAGS)) is needed.
+# The syntax for the pkg file is very simple. You specify the sources, headers and possibly extra include or link options. The *.pkg files is just inserted "as is" in the module.mk file, so normal Makefile syntax can be used. These variables can be specified: SRCS, FSRCS, CSRCS, HDRS, CHDRS, DHDR, EINCLUDE, ELIBS, ELIBSDIR, PACKFFLAGS, PACKCFLAGS, PACKCXXFLAGS. The first five is just the c++ sources, fortran sources, c sources, c++ headers and c headers. DHDR is the dictionary header and is the LinkDef file. EINCLUDE, ELIBS and ELIBSDIR is extra includedirs, libraries and library search paths. If for example a binary is to be linked against the variable ELIBSDIR would be set to lib/tgt_$ALICE_TARGET. Notice that -L and -l is not needed. If the PACKFFLAGS, PACKCFLAGS or PACKCXXFLAGS is not set it will be set to the default options (Set in config/Makefile.$ALICE_TARGET. For example on Linux GEANT321 has to be compiled without -O options, so a line like PACKFFLAGS := $(filter-out -O%,$(FFLAGS)) is needed.
 #
 #
 # DEPEND
 
 MkDepend()
 {
-rmkdepend -f- -w 3000 -- -I$ROOTSYS/cint/include $* | sed -e "s@^\(.*\)\/\(.*\)\.o:@\1\/tgt_${ALICE_TARGET}\/\2.d \1\/tgt_${ALICE_TARGET}/\\2.o:@" -e 's@^#.*$@@' -e '/^$/d'
+rmkdepend -f- -Y -w 3000 -- $* 2>/dev/null | sed -e "s@^\(.*\)\/\(.*\)\.o:@\1\/tgt_${ALICE_TARGET}\/\2.d \1\/tgt_${ALICE_TARGET}/\\2.o:@" -e 's@^#.*$@@' -e '/^$/d'
 }
 MkDependF()
 {
-rmkdepend -f- -Y -w 3000 -- $* | sed -e "s@^\(.*\)\/\(.*\)\.o:@\1\/tgt_${ALICE_TARGET}\/\2.d \1\/tgt_${ALICE_TARGET}/\\2.o:@" -e 's@^#.*$@@' -e '/^$/d'
+rmkdepend -f- -Y -w 3000 -- $* 2>/dev/null | sed -e "s@^\(.*\)\/\(.*\)\.o:@\1\/tgt_${ALICE_TARGET}\/\2.d \1\/tgt_${ALICE_TARGET}/\\2.o:@" -e 's@^#.*$@@' -e '/^$/d'
 }
 
 MkModule()
@@ -75,7 +99,7 @@ echo "#*************************************************************************
 echo "#**** This file is automatically generated from the mkmodules script  *****";
 echo "#****          DO NOT EDIT!!                                          *****";
 echo "#**************************************************************************";
-echo
+
 for i in $tempo; do
     package=$i;
     type=lib;
@@ -91,6 +115,8 @@ for i in $tempo; do
     MkModuleLib $package 
 done;
 
+#Now make general bottom for every module (Clean and so on)
+    cat build/clean.tpl | sed -e "sQ\@MODULE@Q${module}Qg"
 }
 
 MkModuleLib()