Add a separate version of the docs build that only does the stubs.

That way we don't have to wait for clearsilver to write the thousands
of html files during every build.

(This is the build change, there is also a frameworks/base change)
This commit is contained in:
Joe Onorato
2009-07-20 11:57:59 -04:00
parent dce85e32ec
commit b7c41aaad0
2 changed files with 61 additions and 51 deletions

View File

@@ -400,8 +400,6 @@ ifeq ($(BUILD_TINY_ANDROID), true)
# TINY_ANDROID is a super-minimal build configuration, handy for board # TINY_ANDROID is a super-minimal build configuration, handy for board
# bringup and very low level debugging # bringup and very low level debugging
INTERNAL_DEFAULT_DOCS_TARGETS :=
subdirs := \ subdirs := \
bionic \ bionic \
system/core \ system/core \
@@ -420,7 +418,6 @@ else # !BUILD_TINY_ANDROID
# #
# Typical build; include any Android.mk files we can find. # Typical build; include any Android.mk files we can find.
# #
INTERNAL_DEFAULT_DOCS_TARGETS := offline-sdk-docs
subdirs := $(TOP) subdirs := $(TOP)
FULL_BUILD := true FULL_BUILD := true
@@ -449,7 +446,6 @@ include $(ONE_SHOT_MAKEFILE)
# would have been with a normal make. # would have been with a normal make.
CUSTOM_MODULES := $(sort $(call get-tagged-modules,$(ALL_MODULE_TAGS),)) CUSTOM_MODULES := $(sort $(call get-tagged-modules,$(ALL_MODULE_TAGS),))
FULL_BUILD := FULL_BUILD :=
INTERNAL_DEFAULT_DOCS_TARGETS :=
# Stub out the notice targets, which probably aren't defined # Stub out the notice targets, which probably aren't defined
# when using ONE_SHOT_MAKEFILE. # when using ONE_SHOT_MAKEFILE.
NOTICE-HOST-%: ; NOTICE-HOST-%: ;
@@ -657,7 +653,6 @@ droidcore: files \
$(INSTALLED_BOOTIMAGE_TARGET) \ $(INSTALLED_BOOTIMAGE_TARGET) \
$(INSTALLED_RECOVERYIMAGE_TARGET) \ $(INSTALLED_RECOVERYIMAGE_TARGET) \
$(INSTALLED_USERDATAIMAGE_TARGET) \ $(INSTALLED_USERDATAIMAGE_TARGET) \
$(INTERNAL_DEFAULT_DOCS_TARGETS) \
$(INSTALLED_FILES_FILE) $(INSTALLED_FILES_FILE)
# The actual files built by the droidcore target changes depending # The actual files built by the droidcore target changes depending

View File

@@ -94,6 +94,7 @@ public class DroidDoc
String stubsDir = null; String stubsDir = null;
//Create the dependency graph for the stubs directory //Create the dependency graph for the stubs directory
boolean apiXML = false; boolean apiXML = false;
boolean noDocs = false;
String apiFile = null; String apiFile = null;
String debugStubsFile = ""; String debugStubsFile = "";
HashSet<String> stubPackages = null; HashSet<String> stubPackages = null;
@@ -186,6 +187,9 @@ public class DroidDoc
apiXML = true; apiXML = true;
apiFile = a[1]; apiFile = a[1];
} }
else if (a[0].equals("-nodocs")) {
noDocs = true;
}
} }
// read some prefs from the template // read some prefs from the template
@@ -196,59 +200,67 @@ public class DroidDoc
// Set up the data structures // Set up the data structures
Converter.makeInfo(r); Converter.makeInfo(r);
// Files for proofreading if (!noDocs) {
if (proofreadFile != null) { long startTime = System.nanoTime();
Proofread.initProofread(proofreadFile);
// Files for proofreading
if (proofreadFile != null) {
Proofread.initProofread(proofreadFile);
}
if (todoFile != null) {
TodoFile.writeTodoFile(todoFile);
}
// HTML Pages
if (ClearPage.htmlDir != null) {
writeHTMLPages();
}
// Navigation tree
NavTree.writeNavTree(javadocDir);
// Packages Pages
writePackages(javadocDir
+ (ClearPage.htmlDir!=null
? "packages" + htmlExtension
: "index" + htmlExtension));
// Classes
writeClassLists();
writeClasses();
writeHierarchy();
// writeKeywords();
// Lists for JavaScript
writeLists();
if (keepListFile != null) {
writeKeepList(keepListFile);
}
// Sample Code
for (SampleCode sc: sampleCodes) {
sc.write();
}
// Index page
writeIndex();
Proofread.finishProofread(proofreadFile);
if (sdkValuePath != null) {
writeSdkValues(sdkValuePath);
}
long time = System.nanoTime() - startTime;
System.out.println("DroidDoc took " + (time / 1000000000) + " sec. to write docs to "
+ ClearPage.outputDir);
} }
if (todoFile != null) {
TodoFile.writeTodoFile(todoFile);
}
// HTML Pages
if (ClearPage.htmlDir != null) {
writeHTMLPages();
}
// Navigation tree
NavTree.writeNavTree(javadocDir);
// Packages Pages
writePackages(javadocDir
+ (ClearPage.htmlDir!=null
? "packages" + htmlExtension
: "index" + htmlExtension));
// Classes
writeClassLists();
writeClasses();
writeHierarchy();
// writeKeywords();
// Lists for JavaScript
writeLists();
if (keepListFile != null) {
writeKeepList(keepListFile);
}
// Sample Code
for (SampleCode sc: sampleCodes) {
sc.write();
}
// Index page
writeIndex();
Proofread.finishProofread(proofreadFile);
// Stubs // Stubs
if (stubsDir != null) { if (stubsDir != null) {
Stubs.writeStubs(stubsDir, apiXML, apiFile, stubPackages); Stubs.writeStubs(stubsDir, apiXML, apiFile, stubPackages);
} }
if (sdkValuePath != null) {
writeSdkValues(sdkValuePath);
}
Errors.printErrors(); Errors.printErrors();
return !Errors.hadError; return !Errors.hadError;
} }
@@ -394,6 +406,9 @@ public class DroidDoc
if (option.equals("-apixml")) { if (option.equals("-apixml")) {
return 2; return 2;
} }
if (option.equals("-nodocs")) {
return 1;
}
return 0; return 0;
} }