Magellan Linux

Diff of /trunk/mage/usr/lib/mage/smage2.sh

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

revision 194 by niro, Sat Aug 20 15:32:59 2005 UTC revision 195 by niro, Sat Aug 20 15:51:14 2005 UTC
# Line 4  Line 4 
4  # needs pkgbuild_dir (mage)  # needs pkgbuild_dir (mage)
5    
6  # SMAGE2  # SMAGE2
7  # $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/smage2.sh,v 1.25 2005-08-20 15:32:59 niro Exp $  # $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/smage2.sh,v 1.26 2005-08-20 15:51:14 niro Exp $
8    
9  #01.10.2004  #01.10.2004
10  # added ccache support  # added ccache support
# Line 408  setup_ccache_environment(){ Line 408  setup_ccache_environment(){
408    
409    
410  # fixes given dependencies to match a MAGE_TARGET  # fixes given dependencies to match a MAGE_TARGET
411  # fix_mage_deps -target s/depend # <-- '-' is essential ! (build_mage_script needs this)  # fix_mage_deps target s/depend
412  fix_mage_deps() {  fix_mage_deps() {
413   local target="$1"   local target="$1"
414   local depend="$2"   local depend="$2"
# Line 438  fix_mage_deps() { Line 438  fix_mage_deps() {
438   # do not add empty lines   # do not add empty lines
439   if [ -z "${NDEPEND}" ]   if [ -z "${NDEPEND}" ]
440   then   then
441   NDEPEND="${sym} ${cat}/${pname}${target}-${pver}"   NDEPEND="${sym} ${cat}/${pname}-${target}-${pver}"
442   else   else
443   NDEPEND="${NDEPEND}   NDEPEND="${NDEPEND}
444   ${sym} ${cat}/${pname}${target}-${pver}"   ${sym} ${cat}/${pname}-${target}-${pver}"
445   fi   fi
446    
447   unset cat pname pver   unset cat pname pver
# Line 478  EOF Line 478  EOF
478  #   MAGE_TREE_DEST        target destination of the generated tree  #   MAGE_TREE_DEST        target destination of the generated tree
479  #   REGEN_MAGE_TREE       set to 'true' to enable this  #   REGEN_MAGE_TREE       set to 'true' to enable this
480  #  #
481  # gets called with build_mage_script target # <-- '-' is essential !  # gets called with build_mage_script target
482  build_mage_script()  build_mage_script()
483  {  {
484   local magefile   local magefile
# Line 491  build_mage_script() Line 491  build_mage_script()
491   : ${MAGE_TREE_DEST=${BUILDDIR}/mage-tree}   : ${MAGE_TREE_DEST=${BUILDDIR}/mage-tree}
492    
493   # determinate which suffix this mage file should get, if any   # determinate which suffix this mage file should get, if any
494   target="$1"   [ -n "$1" ] && target="-$1"
495    
496   # name of magefile   # name of magefile
497   magefile="${PNAME}${target}-${PVER}-${PBUILD}.mage"   magefile="${PNAME}${target}-${PVER}-${PBUILD}.mage"
# Line 508  build_mage_script() Line 508  build_mage_script()
508   > ${dest}   > ${dest}
509    
510   # header   # header
511   echo '# $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/smage2.sh,v 1.25 2005-08-20 15:32:59 niro Exp $' >> ${dest}   echo '# $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/smage2.sh,v 1.26 2005-08-20 15:51:14 niro Exp $' >> ${dest}
512   echo  >> ${dest}   echo  >> ${dest}
513    
514   # pgkname and state   # pgkname and state
# Line 583  regen_mage_tree() Line 583  regen_mage_tree()
583   # build them only if requested   # build them only if requested
584   if [[ ${REGEN_MAGE_TREE} = true ]]   if [[ ${REGEN_MAGE_TREE} = true ]]
585   then   then
586   # build for each target an mage file   # run it without targets
587   for i in ${MAGE_TARGETS}   if [ -z "${MAGE_TARGETS}" ]
588   do   then
589   echo   echo
590   build_mage_script "-${i}"   build_mage_script
591   echo   echo
592   done   else
593    
594     # build for each target an mage file
595     # run it with several targets
596     for i in ${MAGE_TARGETS}
597     do
598     echo
599     build_mage_script "${i}"
600     echo
601     done
602     fi
603   fi   fi
604    
605   # now unset all uneeded vars to be safe   # now unset all uneeded vars to be safe

Legend:
Removed from v.194  
changed lines
  Added in v.195