Ignore:
Timestamp:
2010-09-03T13:32:30+12:00 (14 years ago)
Author:
sjm84
Message:

Added additional properties that are used when the release-kit wants to create a static build using the support library

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/build.xml

    r22782 r22845  
    220220    <isset property="compile.static"/>
    221221  </condition>
     222
     223  <!-- If building a release then we want to adjust environment variables so that the support library can be see during compilation -->
     224  <if><bool><isset property="use.support.lib"/></bool>
     225    <if><bool><isset property="env.CFLAGS"/></bool>
     226      <property name="cflags.arg" value="CFLAGS=-I${basedir}/ext/gnome-lib/include ${env.CFLAGS}"/>
     227      <else>
     228        <property name="cflags.arg" value="CFLAGS=-I${basedir}/ext/gnome-lib/include"/>
     229      </else>
     230    </if>
     231    <else>
     232      <property name="cflags.arg" value=" "/>
     233    </else>
     234  </if>
     235
     236  <if><bool><isset property="use.support.lib"/></bool>
     237    <if><bool><isset property="env.CPPFLAGS"/></bool>
     238      <property name="cppflags.arg" value="CPPFLAGS=-I${basedir}/ext/gnome-lib/include ${env.CPPFLAGS}"/>
     239      <else>
     240        <property name="cppflags.arg" value="CPPFLAGS=-I${basedir}/ext/gnome-lib/include"/>
     241      </else>
     242    </if>
     243    <else>
     244      <property name="cppflags.arg" value=" "/>
     245    </else>
     246  </if>
     247
     248  <if><bool><isset property="use.support.lib"/></bool>
     249    <if><bool><isset property="env.CXXFLAGS"/></bool>
     250      <property name="cxxflags.arg" value="CXXFLAGS=-I${basedir}/ext/gnome-lib/include ${env.CXXFLAGS}"/>
     251      <else>
     252        <property name="cxxflags.arg" value="CXXFLAGS=-I${basedir}/ext/gnome-lib/include"/>
     253      </else>
     254    </if>
     255    <else>
     256      <property name="cxxflags.arg" value=" "/>
     257    </else>
     258  </if>
    222259
    223260  <condition property="gs2.opt.args" value= " " else="--disable-mg --disable-mgpp --disable-accentfold --disable-gdbm --disable-sqlite">
     
    13081345        <arg value="--bindir=${basedir}/bin"/>
    13091346        <arg value="${static.arg}"/>
     1347        <env key="CFLAGS" value="${cflags.arg}"/>       
     1348        <env key="CPPFLAGS" value="${cppflags.arg}"/>
     1349        <env key="CXXFLAGS" value="${cxxflags.arg}"/>
    13101350      </exec>
    13111351      <exec executable="make" dir="${src.packages.home}/search4j" failonerror="true"/>
     
    14011441      <arg line="${gs2.opt.args}"/>
    14021442      <arg line="${static.arg}"/>
     1443      <env key="CFLAGS" value="${cflags.arg}"/>       
     1444      <env key="CPPFLAGS" value="${cppflags.arg}"/>
     1445      <env key="CXXFLAGS" value="${cxxflags.arg}"/>
    14031446    </exec>
    14041447  </target>
     
    14341477    <exec executable="make" os="${os.unix}" dir="${common.src.home}" failonerror="true">
    14351478      <arg value="${gs2.compile.target}"/>
     1479      <env key="CFLAGS" value="${cflags.arg}"/>       
     1480      <env key="CPPFLAGS" value="${cppflags.arg}"/>
     1481      <env key="CXXFLAGS" value="${cxxflags.arg}"/>
    14361482    </exec>
    14371483    <!-- windows: -->
     
    17221768  <target name="compile-build-src" depends="init" if="collection.building.enabled">
    17231769   
    1724     <exec executable="make" dir="${build.src.home}" os="${os.unix}" failonerror="true"/>
     1770    <exec executable="make" dir="${build.src.home}" os="${os.unix}" failonerror="true">
     1771      <env key="CFLAGS" value="${cflags.arg}"/>       
     1772      <env key="CPPFLAGS" value="${cppflags.arg}"/>
     1773      <env key="CXXFLAGS" value="${cxxflags.arg}"/>
     1774    </exec>
     1775   
    17251776    <exec executable="make" dir="${build.src.home}" os="${os.unix}" failonerror="true">
    17261777      <arg value="install"/>
Note: See TracChangeset for help on using the changeset viewer.