Makefiles and make

Makefiles and make

To use the makefile, at the command line in UNIX, give the command

make

Using only make on the makefile will

If you want to use the make to call the javadocs command do:

make docs

On my makefile, I edited it so that it would also make the html page for classes that are not public. This is done by changing the DOC line in the makefile to use the -private argument.

DOC=javadoc -private -d _docs

I also added the -d   _docs argument so that your documentation will go in its own directory called _docs. This is a common practice to keep your files organized. Make sure that your link to your documentation for the lab4 web page goes to that directory. You can do this with a "relative link" by using the href="./_docs/". The dot slash ( ./ )says that from the directory I am in go to the _docs directory. If you do not give it a filename (e.g. ./_docs/packages.html), it will show the index.html file (which is OK here).

So, a command of
make docs
now does the following:

javadoc -private -d _docs ComputeFigure.java
Loading source file ComputeFigure.java...
Constructing Javadoc information...
Standard Doclet version 1.4.1

Generating _docs/constant-values.html...
Building tree for all the packages and classes...
Building index for all the packages and classes...
Generating _docs/overview-tree.html...
Generating _docs/index-all.html...
Generating _docs/deprecated-list.html...
Building index for all classes...
Generating _docs/allclasses-frame.html...
Generating _docs/allclasses-noframe.html...
Generating _docs/index.html...
Generating _docs/packages.html...
Generating _docs/ComputeFigure.html...
Generating _docs/TheButtonHandler.html...
Generating _docs/TheMouseHandler.html...
Generating _docs/serialized-form.html...
Generating _docs/package-list...
Generating _docs/help-doc.html...
Generating _docs/stylesheet.css...

Notice that in this list it made a file called index.html but it is in the _docs directory so it is fine. Do the command
ls
and you see that your lab4 directory now has an _docs directory with all of the API stuff there.