From ed33d13de57716c49080e286c45031abac2b4967 Mon Sep 17 00:00:00 2001 From: Artur Adib Date: Fri, 4 Nov 2011 16:30:05 -0400 Subject: [PATCH 1/3] Fixes Makefile for web deployment --- Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 3484ab414..35e8675c2 100644 --- a/Makefile +++ b/Makefile @@ -159,7 +159,7 @@ web: | production extension compiler pages-repo \ # everything with data from the master repo. The 'make web' target # then uses 'git add -A' to track additions, modifications, moves, # and deletions. -pages-repo: | $(BUILD_DIR) +pages-repo: | $(BUILD_DIR) @if [ ! -d "$(GH_PAGES)" ]; then \ git clone -b gh-pages $(REPO) $(GH_PAGES); \ rm -rf $(GH_PAGES)/*; \ @@ -169,8 +169,9 @@ pages-repo: | $(BUILD_DIR) @mkdir -p $(GH_PAGES)/build; @mkdir -p $(GH_PAGES)/$(EXTENSION_SRC); -$(GH_PAGES)/$(BUILD_DIR)/%.js: build/%.js - @cp $< $@ +$(GH_PAGES)/$(BUILD_DIR)/pdf.js: + @mkdir -p $(GH_PAGES)/$(BUILD_DIR) + @cp build/pdf.js $(GH_PAGES)/$(BUILD_DIR) $(GH_PAGES)/web/%: web/% @cp $< $@ From 57ecc46b028bbe4c58ea42a54f2b66e72816bf5b Mon Sep 17 00:00:00 2001 From: Artur Adib Date: Fri, 4 Nov 2011 16:37:33 -0400 Subject: [PATCH 2/3] nit --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 35e8675c2..110709906 100644 --- a/Makefile +++ b/Makefile @@ -159,7 +159,7 @@ web: | production extension compiler pages-repo \ # everything with data from the master repo. The 'make web' target # then uses 'git add -A' to track additions, modifications, moves, # and deletions. -pages-repo: | $(BUILD_DIR) +pages-repo: | $(BUILD_DIR) @if [ ! -d "$(GH_PAGES)" ]; then \ git clone -b gh-pages $(REPO) $(GH_PAGES); \ rm -rf $(GH_PAGES)/*; \ From e58c2ab99517ec71a8bf36cf5669a25809e88d9a Mon Sep 17 00:00:00 2001 From: Artur Adib Date: Fri, 4 Nov 2011 17:18:23 -0400 Subject: [PATCH 3/3] Fixing again --- Makefile | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/Makefile b/Makefile index 110709906..c642f1eb1 100644 --- a/Makefile +++ b/Makefile @@ -139,12 +139,11 @@ lint: # TODO: Use the Closure compiler to optimize the pdf.js files. # GH_PAGES = $(BUILD_DIR)/gh-pages -web: | production extension compiler pages-repo \ - $(addprefix $(GH_PAGES)/, $(BUILD_TARGET)) \ - $(addprefix $(GH_PAGES)/, $(wildcard web/*.*)) \ - $(addprefix $(GH_PAGES)/, $(wildcard web/images/*.*)) \ - $(addprefix $(GH_PAGES)/, $(wildcard $(EXTENSION_SRC)/*.xpi)) - +web: | production extension compiler pages-repo + @cp $(BUILD_TARGET) $(GH_PAGES)/$(BUILD_TARGET) + @cp -R web/* $(GH_PAGES)/web + @cp web/images/* $(GH_PAGES)/web/images + @cp $(EXTENSION_SRC)/*.xpi $(GH_PAGES)/$(EXTENSION_SRC) @cp $(GH_PAGES)/web/index.html.template $(GH_PAGES)/index.html; @mv -f $(GH_PAGES)/web/viewer-production.html $(GH_PAGES)/web/viewer.html; @cd $(GH_PAGES); git add -A; @@ -169,19 +168,6 @@ pages-repo: | $(BUILD_DIR) @mkdir -p $(GH_PAGES)/build; @mkdir -p $(GH_PAGES)/$(EXTENSION_SRC); -$(GH_PAGES)/$(BUILD_DIR)/pdf.js: - @mkdir -p $(GH_PAGES)/$(BUILD_DIR) - @cp build/pdf.js $(GH_PAGES)/$(BUILD_DIR) - -$(GH_PAGES)/web/%: web/% - @cp $< $@ - -$(GH_PAGES)/web/images/%: web/images/% - @cp $< $@ - -$(GH_PAGES)/$(EXTENSION_SRC)/%: $(EXTENSION_SRC)/% - @cp -R $< $@ - # # make compiler # # # # This target downloads the Closure compiler, and places it in the