I have Ant build file which is used in Docbook. Now I am going to convert that Ant build file to a Makefile which uses Xsltproc processor. I am not particularly familiar with either Makefile or Ant. So please help me to convert it. Are there any resources which I should follow?
Here I want to, 1. copy folder structure and its content into another folder 2. configure java system properties 3. configure classpath
In ant script, it has code like this,
<copy todir="${output-dir}">
<fileset dir="${ant.file.dir}/template">
<include name="**/*"/>
</fileset>
</copy>
<java classname="com.nexwave.nquindexer.IndexerMain" fork="true">
<sysproperty key="htmlDir" value="${output-dir}/content"/>
<sysproperty key="htmlExtension" value="${html.extension}"/>
<classpath>
<path refid="classpath"/>
<pathelement location="${xercesImpl.jar}"/>
<pathelement location="/usr/share/xml-commons/lib/xml-apis.jar"/>
</classpath>
</java>
I want to convert above 2 codes in make. Thank you..!!
Make and ANT are very different technologies. Your requirement would difficult to fufil for all but the simplest use cases.
Here are some of the technical challenges:
The following ANT java task
<java classname="com.nexwave.nquindexer.IndexerMain" fork="true">
<sysproperty key="htmlDir" value="${output-dir}/content"/>
<sysproperty key="htmlExtension" value="${html.extension}"/>
<classpath>
<path refid="classpath"/>
<pathelement location="${xercesImpl.jar}"/>
<pathelement location="/usr/share/xml-commons/lib/xml-apis.jar"/>
</classpath>
</java>
can be translated into the following unix java command-line.
java \
-DhtmlDir=$PUT_OUTPUT_DIR_HERE \
-DhtmlExtension=$PUT_EXT_HERE \
-cp $CLASSPATH:$PATH_TO_XERCES_JAR:/usr/share/xml-commons/lib/xml-apis.jar \
com.nexwave.nquindexer.IndexerMain