@@ -8,21 +8,33 @@ defined by a series of options similar to those supported by `javac`.
88` apidiff ` uses the following dependencies:
99
1010* _ [ Daisy Diff] _ : an HTML comparison library, required when building ` apidiff `
11+ * _ [ Equinox] _ : the Eclipse Common Runtime, used by Daisy Diff; it is required
12+ when building Daisy Diff from source, but may already be included if using
13+ a precompiled copy of Daisy Diff in a JAR file.
14+ * _ [ HTMLCleaner] _ : a library to sanitize HTML prior to comparison with Daisy Diff
1115* _ [ Java Diff Utils] _ : a plain-text comparison library, required when building ` apidiff `
1216* _ [ JUnit] _ : the testing framework, used to run some of the tests for ` apidiff `
1317
1418Suitable versions of these dependencies can be downloaded by running
15- ` make/build.sh ` .
19+ ` make/build.sh ` , using configuration details in ` make/build-support/version-numbers ` .
1620
1721### Building with GNU Make
1822
19- The default configuration uses values provided in ` make/dependencies.gmk ` ,
20- unless these values have been overridden on the command line used to run ` make ` .
23+ If you have run ` make/build.sh ` , there will be a convenient shell script stored
24+ in ` build/make.sh ` that runs ` make ` with variables set to the locations of the
25+ downloaded dependencies. You may also run ` make ` directly, using _ make_ variables
26+ to specify the locations of any necessary dependencies.
2127
2228````
23- make -C make Makefile <target>
29+ sh build/ make.sh <target>
2430````
2531
32+ Useful targets are:
33+
34+ * ` sanity ` -- to check settings of necessary _ make_ variables,
35+ * ` build ` -- to build the files for a release, and
36+ * ` test ` -- to run all the available tests.
37+
2638### Building with an IDE
2739
2840An IDE such as IntelliJ IDEA needs the following configuration:
@@ -33,6 +45,13 @@ An IDE such as IntelliJ IDEA needs the following configuration:
3345 * _ Daisy Diff_ , _ HTMLCleaner_ , _ Java Diff Utils_ available for compilation
3446 * _ JUnit_ available for testing
3547
48+ _ Note:_ when working in an IDE, it is strongly recommended that you use
49+ a precompiled JAR file for Daisy Diff. The source files refer to additional
50+ dependencies that are not required or downloaded for APIDiff. While these
51+ source files are ignored when building APIDiff with GNU Make, it may not
52+ be possible to exclude those source files when registering Daisy Diff as
53+ a source-file dependency in the IDE.
54+
3655In addition, some JUnit tests require access to internal classes in
3756the ` jdk.compiler ` and ` jdk.jdeps ` modules:
3857
@@ -51,22 +70,51 @@ The following compiler options may also be desirable:
5170````
5271
5372_ Note:_ When working on the test files, be careful not to mark module source directories
54- as ` Test Sources Root ` at the same time as any source directories that are not
73+ as ` Test Sources Root ` at the same time as any source directories that are not
5574for a module.
5675
76+ ## Testing ` apidiff `
77+
78+ You can run the tests using the ` test ` target for GNU Make, using either
79+ ` make/build.sh ` or the subsequently generated ` build/make.sh ` . You can
80+ specify either the overall ` test ` target or the absolute path name of
81+ the ` *.ok ` file for any individual tests. That being said, most of the
82+ tests are written as JUnit tests, and can either be invoked as a group
83+ as part of the overall ` test ` target, or individually, by using JUnit
84+ directly, either using the JUnit command-line tool, or by using JUnit
85+ support within an IDE.
86+
87+ Just as some ` --add-exports ` options are needed to compile APIDiff,
88+ the same options will need to be provided in any IDE configuration used
89+ to run tests.
90+
5791## Documentation
5892
5993A "man" page is generated as part of the build, and is the primary source
60- of information for how to run ` apidiff ` .
94+ of information for how to run ` apidiff ` . The tool also provides simple
95+ command-line help, listing the available options and a summary of their
96+ meaning.
97+
98+ You can see recent versions of the documentation on the APIDiff
99+ [ project page] [ apidiff-project ] :
100+
101+ * [ "man" page] [ apidiff-man ]
102+ * [ command-line help] [ apidiff-cmdline-help ]
103+
104+ [ apidiff-project ] : https://openjdk.org/projects/code-tools/apidiff/
105+ [ apidiff-man ] : https://openjdk.org/projects/code-tools/apidiff/apidiff.html
106+ [ apidiff-cmdline-help ] : https://openjdk.org/projects/code-tools/apidiff/cmdline-help.html
61107
62108## ShowDocs
63109
64- ` showDocs ` is a small utility program that is a simple wrapper around the
110+ ` showDocs ` is a small utility program that is a simple wrapper around the
65111` APIReader ` and ` SerializedFormReader ` classes in ` apidiff ` , that can provide
66112filtered views of the files generated by ` javadoc ` , in order to view the
67113parts of those files that will be compared by ` apidiff ` .
68114
69115
70116[ Daisy Diff ] : https://github.com/DaisyDiff/DaisyDiff
117+ [ Equinox ] : https://projects.eclipse.org/projects/eclipse.equinox
118+ [ HtmlCleaner ] : https://htmlcleaner.sourceforge.net
71119[ Java Diff Utils ] : https://github.com/java-diff-utils/java-diff-utils
72120[ JUnit ] : https://junit.org/
0 commit comments