Magellan Linux

Diff of /trunk/include/cmake.sminc

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

trunk/core/include/cmake.sminc revision 2 by niro, Fri Oct 10 13:29:42 2008 UTC branches/magellan-next/include/cmake.sminc revision 8018 by niro, Tue Jun 28 22:04:41 2011 UTC
# Line 96  cmake_build_not() Line 96  cmake_build_not()
96   echo "-DBUILD_${feature}=OFF"   echo "-DBUILD_${feature}=OFF"
97  }  }
98    
99    # install cmake opts
100    cmake_install()
101    {
102     local feature="$1"
103     local option="$2"
104     echo "-DINSTALL_${feature}=${option}"
105    }
106    
107    # generic cmake opts
108    cmake_opt()
109    {
110     local feature="$1"
111     local option="$2"
112     echo "-D${feature}=${option}"
113    }
114    
115  cmake_src_prepare()  cmake_src_prepare()
116  {  {
117   munpack ${SRCFILE} || die   munpack ${SRCFILE} || die
# Line 127  cmake_src_compile() Line 143  cmake_src_compile()
143  {  {
144   cd ${SRCDIR}   cd ${SRCDIR}
145    
146     # remove build dir if exist
147     [[ -d ${BUILDDIR}/build ]] && rm -rf ${BUILDDIR}/build
148    
149     # build outside of the source dir
150     install -d ${BUILDDIR}/build || die
151     cd ${BUILDDIR}/build
152    
153   cmake_configure || die   cmake_configure || die
154   mmake || die   mmake || die
155  }  }
156    
157  cmake_src_install()  cmake_src_install()
158  {  {
159   cd ${SRCDIR}   cd ${BUILDDIR}/build
160   make DESTDIR=${BINDIR} install || die   make DESTDIR=${BINDIR} install || die
161    
162     cd ${SRCDIR}
163   local i   local i
164   for i in ABOUT-NLS AUTHORS BUGS CHANGES ChangeLog COPYING \   for i in ABOUT-NLS AUTHORS BUGS CHANGES ChangeLog COPYING \
165   FAQ LICENSE NEWS README TODO   FAQ LICENSE NEWS README TODO

Legend:
Removed from v.2  
changed lines
  Added in v.8018