/plugins/SuperAbbrevs/tags/version0.23/build.xml

# · XML · 120 lines · 79 code · 16 blank · 25 comment · 0 complexity · 3ba47b73ee7553f9d046566b7a67fc78 MD5 · raw file

  1. <?xml version="1.0"?>
  2. <!--
  3. This build.xml file for building the SuperAbbrevs plugin is based
  4. upon the model file used for building the QuickNotepad plugin.
  5. The 'dist' target compiles the plugin and creates the JAR file.
  6. Before running the 'dist' target, you will need to generate the
  7. documentation using one of these two targets:
  8. - 'docs-xalan': Creates documentation using the Xalan XSLT processor
  9. - 'docs-xsltproc': Creates documentation using the xsltproc tool
  10. To use it for building your own plugin, make these changes:
  11. - Change definition of 'jedit.install.dir' to point to the directory
  12. containing jedit.jar
  13. - Change definition of 'jar.name' to the name of your plugin's JAR file
  14. - If necessary, add any dependencies to the 'project.class.path'
  15. definition
  16. - If necessary, change the list of files in the 'dist' targtet
  17. - If your plugin has documentation generated using the DocBook XSL
  18. stylesheets, change the 'docs-xalan' and 'docs-xsltproc' targets
  19. accordingly.
  20. -->
  21. <project name="SuperAbbrevs" default="dist" basedir=".">
  22. <property file="build.properties"/>
  23. <property name="jar.name" value="SuperAbbrevs.jar"/>
  24. <property name="jedit.install.dir" value="/home/sune/apps/jedit/4.3pre8"/>
  25. <property name="src.dir" value="."/>
  26. <property name="build.dir" value="build"/>
  27. <property name="install.dir" value="/home/sune/.jedit/jars"/>
  28. <path id="project.class.path">
  29. <pathelement location="${jedit.install.dir}/jedit.jar"/>
  30. </path>
  31. <target name="init">
  32. <mkdir dir="${build.dir}"/>
  33. <!-- make ctags -->
  34. <exec executable="ctags">
  35. <arg value="-R"/>
  36. <arg value="."/>
  37. </exec>
  38. </target>
  39. <target name="jflex">
  40. <exec executable="jflex">
  41. <arg value="superabbrevs/lexer/*.lex"/>
  42. </exec>
  43. </target>
  44. <target name="compile" depends="init">
  45. <javac
  46. target="1.4"
  47. source="1.4"
  48. srcdir="${src.dir}"
  49. destdir="${build.dir}"
  50. debug="on"
  51. deprecation="on"
  52. includeJavaRuntime="yes"
  53. >
  54. <classpath refid="project.class.path"/>
  55. </javac>
  56. </target>
  57. <target name="dist" depends="compile">
  58. <mkdir dir="${install.dir}"/>
  59. <jar jarfile="${install.dir}/${jar.name}">
  60. <fileset dir="${build.dir}"/>
  61. <fileset dir="${src.dir}">
  62. <include name="actions.xml"/>
  63. <include name="**/*.props"/>
  64. <include name="**/*.html"/>
  65. <include name="**/*.gif"/>
  66. <include name="**/*.bsh"/>
  67. <include name="*.bsh"/>
  68. <include name="resources/*"/>
  69. </fileset>
  70. </jar>
  71. </target>
  72. <target name="generate-docbook-wrapper">
  73. <delete file="doc/docbook-wrapper.xsl"/>
  74. <echo file="doc/docbook-wrapper.xsl" message="&lt;xsl:stylesheet"/>
  75. <echo file="doc/docbook-wrapper.xsl" append="true" message=" xmlns:xsl='http://www.w3.org/1999/XSL/Transform'"/>
  76. <echo file="doc/docbook-wrapper.xsl" append="true" message=" version='1.0'&gt;"/>
  77. <echo file="doc/docbook-wrapper.xsl" append="true" message="&lt;xsl:import href='${docbook.xsl}/${stylesheet}'/>"/>
  78. <echo file="doc/docbook-wrapper.xsl" append="true" message="&lt;/xsl:stylesheet&gt;"/>
  79. </target>
  80. <!-- Generate docs with xsltproc tool from www.xmlsoft.org -->
  81. <target name="docs">
  82. <antcall target="generate-docbook-wrapper"/>
  83. <exec executable="xsltproc" dir="doc">
  84. <arg value="users-guide.xsl"/>
  85. <arg value="users-guide.xml"/>
  86. </exec>
  87. </target>
  88. <target name="clean-docs">
  89. <delete>
  90. <fileset dir="doc" includes="*~" defaultexcludes="no"/>
  91. <fileset dir="doc" includes="*.html" defaultexcludes="no"/>
  92. </delete>
  93. </target>
  94. <target name="clean" depends="clean-docs">
  95. <delete dir="${build.dir}"/>
  96. <delete>
  97. <fileset dir="." includes="**/*~" defaultexcludes="no"/>
  98. </delete>
  99. </target>
  100. </project>