[Hints] Generating JavaDoc documentation with a Project Builder target
[Hints] Generating JavaDoc documentation with a Project Builder target
- Subject: [Hints] Generating JavaDoc documentation with a Project Builder target
- From: Francis Labrie <email@hidden>
- Date: Mon, 8 Sep 2003 12:02:50 -0400
Hi,
I've always wanted to build my JavaDoc documentation directly from
Project Builder instead of doing it with a separate script.
Unfortunately, I've found no instruction to do so in mailing lists.
I've finally find myself a way to do it, and you'll find below the
steps to do it yourself. Comments and enhancements are welcome:
- In Project Builder, select the "Project / New Target..." menu option;
- Select "Framework" in list then click on <Next> button;
- Type "Documentation" as Target Name;
- Select the proper project and click on <Finish> button;
- In Project Builder, select the new "Documentation" target;
- Click on the "Summary" section in the list;
- Change the "Base product name:" to
"_WO$(DOCUMENTATION_UNIQUIFIER)<ProjectName>", replacing "<ProjectName>"
with your current project name;
- Click on the "Settings / Expert View" section on the list;
- Remove the following Build Settings:
DYLIB_COMPATIBILITY_VERSION = 1
DYLIB_CURRENT_VERSION = 1
OPTIMIZATION_CFLAGS =
OTHER_CFLAGS =
OTHER_LDFLAGS =
OTHER_LIBTOOL_FLAGS =
OTHER_REZFLAGS =
PRINCIPAL_CLASS =
SECTORDER_FLAGS =
WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"
- Change the following Build Settings to make them hold these values:
FRAMEWORK_VERSION = TMP
WRAPPER_EXTENSION = tmp
- Add the following new Build Settings:
BUILD_FILES_DIR = "$(SYSTEM_DEVELOPER_DIR)/ProjectBuilder
Extras/WebObjects Support"
DOCUMENTATION_UNIQUIFIER = Documentation
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"
JAVAC_SOURCE_FILE_ENCODING = UTF-8
JAVA_ARCHIVE_CLASSES = NO
JAVA_COMPILER = /usr/bin/javadoc
JAVA_COMPILER_DEBUGGING_SYMBOLS = NO
JAVA_COMPILER_FLAGS = "-charset UTF-8 -version -author -package -link
http://developer.apple.com/documentation/WebObjects/Reference/API -link
http://java.sun.com/products/jdk/1.3/docs/api"
JAVA_FRAMEWORK_RESOURCES_DIRS = Resources
RESOURCES_DIR = "$(CONTENTS_DIR)/Resources"
- In Project Builder, select the "Project / New Build Phase / New Shell
Script Build Phase" menu option;
- Move this new Build Phase from the beginning to the end of the Build
Phases in the list;
- Add this code to the text field below the "Shell:" field:
#
# Construct Documentation resources path
#
DOCUMENTATION_BUILD_DIR="${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.tmp"
RESOURCES_DOCUMENTATION_DIR=${DSTROOT}${INSTALL_PATH}/
${PROJECT_NAME}.framework${RESOURCES_DIR}/Documentation
#
# Copy Documentation resources into the Contents/Resources directory.
#
. "${BUILD_FILES_DIR}/CopyResources.sh" "WebObjects"
"${DOCUMENTATION_BUILD_DIR}/Versions/TMP/Resources/Java"
"${RESOURCES_DOCUMENTATION_DIR}"
- Select the "Run only when installing" checkbox.
You must then add all Java sources and frameworks to the "Documentation"
target. Then, you can generate and install JavaDoc documentation in the
"Resources" folder of the framework with the following console commands:
# Installing the binary
sudo pbxbuild install -buildstyle Deployment DSTROOT=/
# Installing the documentation in the binary resources
sudo pbxbuild install -target Documentation -buildstyle Deployment
DSTROOT=/
Kind regards,
--
Francis Labrie
Saint-Bruno-de-Montarville, Quebec, Canada
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.