blob: f3b7b8f4e1b43d8b4ea352ca6b09c8fb62de38b9 [file] [log] [blame] [raw]
JDK_HOME := /opt/openjdk7
JDK_JAVAC = $(JDK_HOME)/bin/javac
#JDK_JAVAC_FLAGS += -source 1.7 -target 1.7
JAR = $(JDK_HOME)/bin/jar
COMMONMARK_VERSION := 0.12.1
#COMMONMARK_VERSION := 0.15.2
#COMMONMARK_VERSION := 0.16.1
SERVLET_VERSION := 2.5.0.v201103041518
#CLASS_PATH := /opt/minecraft/libraries/com/google/code/gson/gson/2.2.4/gson-2.2.4.jar:/opt/javax.servlet-api/javax.servlet-api-3.1.0.jar:/opt/guava/guava-30.1-android.jar:/opt/org.eclipse.jgit/org.eclipse.jgit-4.5.7.201904151645-r.jar:/opt/org.eclipse.jgit.archive/org.eclipse.jgit.archive-4.5.7.201904151645-r.jar:/opt/org.eclipse.jgit.http.server/org.eclipse.jgit.http.server-4.5.7.201904151645-r.jar
CLASS_PATH := ../blame-cache/blame-cache.jar:/opt/apache-commons/commons-lang3/commons-lang3-3.8.1.jar:/opt/gson/gson-2.7.jar:/opt/guava/guava-20.0.jar:/opt/joda-time/joda-time-2.12.7.jar:/opt/jsr305/jsr305-3.0.2.jar:/opt/commonmark-java/commonmark/commonmark-$(COMMONMARK_VERSION).jar:/opt/commonmark-java/commonmark-ext-autolink/commonmark-ext-autolink-$(COMMONMARK_VERSION).jar:/opt/commonmark-java/commonmark-ext-gfm-strikethrough/commonmark-ext-gfm-strikethrough-$(COMMONMARK_VERSION).jar:/opt/commonmark-java/commonmark-ext-gfm-tables/commonmark-ext-gfm-tables-$(COMMONMARK_VERSION).jar:/opt/java-prettify/java-prettify.jar:/opt/org.eclipse.jgit.archive/org.eclipse.jgit.archive-4.5.7.201904151645-r.jar:/opt/org.eclipse.jgit.http.server/org.eclipse.jgit.http.server-4.5.7.201904151645-r.jar:/opt/org.eclipse.jgit/org.eclipse.jgit-4.5.7.201904151645-r.jar:/opt/slf4j-api/slf4j-api-1.7.36.jar:/opt/closure-templates/soy/soy-2017-08-08.jar:/opt/guice/guice-4.2.2.jar:/opt/javax.servlet/javax.servlet-$(SERVLET_VERSION).jar
CLASSES := \
build/com/google/gitiles/CommitJsonData.class \
build/com/google/gitiles/CommitJsonData$$1.class \
build/com/google/gitiles/CommitJsonData$$Commit.class \
build/com/google/gitiles/CommitJsonData$$Diff.class \
build/com/google/gitiles/CommitJsonData$$Ident.class \
build/com/google/gitiles/CommitJsonData$$Log.class \
build/com/google/gitiles/PathServlet.class \
build/com/google/gitiles/PathServlet$$1.class \
build/com/google/gitiles/PathServlet$$AutoDiveFilter.class \
build/com/google/gitiles/PathServlet$$FileType.class \
build/com/google/gitiles/PathServlet$$WalkResult.class \
build/com/google/gitiles/AbstractHttpFilter.class \
build/com/google/gitiles/ArchiveFormat.class \
build/com/google/gitiles/Linkifier.class \
build/com/google/gitiles/GitilesUrls.class \
build/com/google/gitiles/GitilesUrls$$1.class \
build/com/google/gitiles/RepositoryDescription.class \
build/com/google/gitiles/GitilesAccess.class \
build/com/google/gitiles/GitilesAccess$$Factory.class \
build/com/google/gitiles/ArchiveServlet.class \
build/com/google/gitiles/DescribeServlet.class \
build/com/google/gitiles/DescribeServlet$$1.class \
build/com/google/gitiles/VisibilityCache.class \
build/com/google/gitiles/VisibilityCache$$1.class \
build/com/google/gitiles/VisibilityCache$$2.class \
build/com/google/gitiles/VisibilityCache$$3.class \
build/com/google/gitiles/VisibilityCache$$Key.class \
build/com/google/gitiles/HostIndexServlet.class \
build/com/google/gitiles/HostIndexServlet$$1.class \
build/com/google/gitiles/HostIndexServlet$$2.class \
build/com/google/gitiles/RevisionServlet.class \
build/com/google/gitiles/GitilesConfig.class \
build/com/google/gitiles/ReadmeHelper.class \
build/com/google/gitiles/ConfigUtil.class \
build/com/google/gitiles/RevisionParser.class \
build/com/google/gitiles/RevisionParser$$Result.class \
build/com/google/gitiles/LogSoyData.class \
build/com/google/gitiles/Revision.class \
build/com/google/gitiles/GitilesFilter.class \
build/com/google/gitiles/GitilesFilter$$1.class \
build/com/google/gitiles/GitilesFilter$$DispatchFilter.class \
build/com/google/gitiles/GitilesFilter$$DispatchFilter$$1.class \
build/com/google/gitiles/GitilesServlet.class \
build/com/google/gitiles/GitilesServlet$$1.class \
build/com/google/gitiles/BaseServlet.class \
build/com/google/gitiles/BaseServlet$$1.class \
build/com/google/gitiles/BaseServlet$$2.class \
build/com/google/gitiles/DefaultRenderer.class \
build/com/google/gitiles/DefaultRenderer$$1.class \
build/com/google/gitiles/HtmlDiffFormatter.class \
build/com/google/gitiles/RepositoryFilter.class \
build/com/google/gitiles/RefServlet.class \
build/com/google/gitiles/RefServlet$$1.class \
build/com/google/gitiles/RefServlet$$2.class \
build/com/google/gitiles/RefServlet$$3.class \
build/com/google/gitiles/RefServlet$$RefJsonData.class \
build/com/google/gitiles/RefServlet$$TextRefAdvertiser.class \
build/com/google/gitiles/MimeTypes.class \
build/com/google/gitiles/DebugRenderer.class \
build/com/google/gitiles/CommitData.class \
build/com/google/gitiles/CommitData$$Builder.class \
build/com/google/gitiles/CommitData$$Builder$$1.class \
build/com/google/gitiles/CommitData$$Builder$$2.class \
build/com/google/gitiles/CommitData$$DiffList.class \
build/com/google/gitiles/CommitData$$Field.class \
build/com/google/gitiles/IdentRevFilter.class \
build/com/google/gitiles/IdentRevFilter$$1.class \
build/com/google/gitiles/IdentRevFilter$$Author.class \
build/com/google/gitiles/IdentRevFilter$$Committer.class \
build/com/google/gitiles/CommitSoyData.class \
build/com/google/gitiles/DefaultUrls.class \
build/com/google/gitiles/DefaultAccess.class \
build/com/google/gitiles/DefaultAccess$$Factory.class \
build/com/google/gitiles/RootedDocServlet.class \
build/com/google/gitiles/Paginator.class \
build/com/google/gitiles/Paginator$$1.class \
build/com/google/gitiles/Paginator$$RenameWatcher.class \
build/com/google/gitiles/doc/BlockNoteExtension.class \
build/com/google/gitiles/doc/BlockNoteExtension$$1.class \
build/com/google/gitiles/doc/BlockNoteExtension$$NoteParser.class \
build/com/google/gitiles/doc/BlockNoteExtension$$NoteParserFactory.class \
build/com/google/gitiles/doc/html/HtmlBuilder.class \
build/com/google/gitiles/doc/PathResolver.class \
build/com/google/gitiles/doc/SmartQuoted.class \
build/com/google/gitiles/doc/SmartQuoted$$Type.class \
build/com/google/gitiles/doc/MarkdownConfig.class \
build/com/google/gitiles/doc/MarkdownConfig$$1.class \
build/com/google/gitiles/doc/SmartQuotedExtension.class \
build/com/google/gitiles/doc/SmartQuotedExtension$$QuotedProcessor.class \
build/com/google/gitiles/doc/MarkdownUtil.class \
build/com/google/gitiles/doc/NamedAnchorExtension.class \
build/com/google/gitiles/doc/NamedAnchorExtension$$1.class \
build/com/google/gitiles/doc/NamedAnchorExtension$$Processor.class \
build/com/google/gitiles/doc/ImageLoader.class \
build/com/google/gitiles/doc/MultiColumnExtension.class \
build/com/google/gitiles/doc/MultiColumnExtension$$1.class \
build/com/google/gitiles/doc/MultiColumnExtension$$MultiColumnParser.class \
build/com/google/gitiles/doc/MultiColumnExtension$$MultiColumnParserFactory.class \
build/com/google/gitiles/doc/TocFormatter.class \
build/com/google/gitiles/doc/TocFormatter$$TocEntry.class \
build/com/google/gitiles/doc/IframeBlock.class \
build/com/google/gitiles/doc/NamedAnchor.class \
build/com/google/gitiles/doc/MarkdownToHtml.class \
build/com/google/gitiles/doc/MarkdownToHtml$$1.class \
build/com/google/gitiles/doc/MarkdownToHtml$$Builder.class \
build/com/google/gitiles/doc/GitHubThematicBreakExtension.class \
build/com/google/gitiles/doc/GitHubThematicBreakExtension$$1.class \
build/com/google/gitiles/doc/GitHubThematicBreakExtension$$BreakParser.class \
build/com/google/gitiles/doc/GitHubThematicBreakExtension$$BreakParserFactory.class \
build/com/google/gitiles/doc/MultiColumnBlock.class \
build/com/google/gitiles/doc/MultiColumnBlock$$Column.class \
build/com/google/gitiles/doc/GitilesHtmlExtension.class \
build/com/google/gitiles/doc/GitilesHtmlExtension$$1.class \
build/com/google/gitiles/doc/GitilesHtmlExtension$$HtmlProcessor.class \
build/com/google/gitiles/doc/GitilesHtmlExtension$$HtmlVisitor.class \
build/com/google/gitiles/doc/TocExtension.class \
build/com/google/gitiles/doc/TocExtension$$1.class \
build/com/google/gitiles/doc/TocExtension$$TocParser.class \
build/com/google/gitiles/doc/TocExtension$$TocParserFactory.class \
build/com/google/gitiles/doc/DocServlet.class \
build/com/google/gitiles/doc/DocServlet$$MarkdownFile.class \
build/com/google/gitiles/doc/TocBlock.class \
build/com/google/gitiles/doc/GitilesMarkdown.class \
build/com/google/gitiles/doc/BlockNote.class \
build/com/google/gitiles/doc/Navbar.class \
build/com/google/gitiles/TreeSoyData.class \
build/com/google/gitiles/GitwebRedirectFilter.class \
build/com/google/gitiles/GitwebRedirectFilter$$TooManyUriParametersException.class \
build/com/google/gitiles/LogServlet.class \
build/com/google/gitiles/LogServlet$$1.class \
build/com/google/gitiles/LogServlet$$InvalidStartValueException.class \
build/com/google/gitiles/CommentLinkInfo.class \
build/com/google/gitiles/FormatType.class \
build/com/google/gitiles/Renderer.class \
build/com/google/gitiles/Renderer$$1.class \
build/com/google/gitiles/Renderer$$FileUrlMapper.class \
build/com/google/gitiles/TimeCache.class \
build/com/google/gitiles/TimeCache$$1.class \
build/com/google/gitiles/TreeJsonData.class \
build/com/google/gitiles/TreeJsonData$$Entry.class \
build/com/google/gitiles/TreeJsonData$$Tree.class \
build/com/google/gitiles/ThreadSafePrettifyParser.class \
build/com/google/gitiles/ThreadSafePrettifyParser$$1.class \
build/com/google/gitiles/blame/BlameServlet.class \
build/com/google/gitiles/blame/BlameServlet$$1.class \
build/com/google/gitiles/blame/BlameServlet$$RegionResult.class \
build/com/google/gitiles/blame/RegionAdapter.class \
build/com/google/gitiles/RepositoryIndexServlet.class \
build/com/google/gitiles/RepositoryIndexServlet$$1.class \
build/com/google/gitiles/RepositoryIndexServlet$$2.class \
build/com/google/gitiles/TagSoyData.class \
build/com/google/gitiles/DiffServlet.class \
build/com/google/gitiles/BlobSoyData.class \
build/com/google/gitiles/ViewFilter.class \
build/com/google/gitiles/PathUtil.class \
build/com/google/gitiles/GitilesView.class \
build/com/google/gitiles/GitilesView$$1.class \
build/com/google/gitiles/GitilesView$$Builder.class \
build/com/google/gitiles/GitilesView$$InvalidViewException.class \
build/com/google/gitiles/GitilesView$$Type.class \
build/com/google/gitiles/DateFormatter.class \
build/com/google/gitiles/DateFormatter$$Format.class
RESOURCES := \
build/com/google/gitiles/static/prettify/prettify.css \
build/com/google/gitiles/static/doc.css \
build/com/google/gitiles/static/base.css \
build/com/google/gitiles/mime-types.properties \
build/com/google/gitiles/templates/RevisionDetail.soy \
build/com/google/gitiles/templates/BlameDetail.soy \
build/com/google/gitiles/templates/DiffDetail.soy \
build/com/google/gitiles/templates/Doc.soy \
build/com/google/gitiles/templates/LogDetail.soy \
build/com/google/gitiles/templates/ObjectDetail.soy \
build/com/google/gitiles/templates/PathDetail.soy \
build/com/google/gitiles/templates/RefList.soy \
build/com/google/gitiles/templates/Common.soy \
build/com/google/gitiles/templates/RepositoryIndex.soy \
build/com/google/gitiles/templates/HostIndex.soy
default: build gitiles-servlet.jar
gitiles-servlet.jar: $(CLASSES) $(RESOURCES)
cd build && $(JAR) -c $(patsubst build/%,%,$(subst $$,\$$,$^)) > ../$@
clean:
rm -f gitiles-servlet.jar $(subst $$,\$$,$(CLASSES))
build:
mkdir $@
build/%.class: src/main/java/%.java
$(JDK_JAVAC) $(JDK_JAVAC_FLAGS) -classpath build:$(CLASS_PATH):src/main/java -d build $<
build/%$$*.class: src/main/java/%.java
build/%: src/main/resources/%
[ -d $(@D) ] || mkdir -p $(@D)
rm -f $@
cp -f $< $@