summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorBenjamin Ragheb <ben@benzado.com>2015-05-09 18:08:08 -0400
committerBenjamin Ragheb <ben@benzado.com>2015-05-09 18:08:08 -0400
commit11fb1559b94ab61bd4678de3352ad8ddd0997dc7 (patch)
treef526a6132c6687da3a6048e969af22e102267382 /Makefile
parent1944a844a74312fb68277acae003da3b7d773162 (diff)
Add Makefile target to generate tgz archive of docset
Also fix and update .gitignore
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 10 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index c6240a0..d5985d4 100644
--- a/Makefile
+++ b/Makefile
@@ -8,18 +8,26 @@ DOCUMENTS_DIR = $(RESOURCES_DIR)/Documents
INFO_PLIST_FILE = $(CONTENTS_DIR)/Info.plist
INDEX_FILE = $(RESOURCES_DIR)/docSet.dsidx
ICON_FILE = $(DOCSET_DIR)/icon.png
+ARCHIVE_FILE = $(DOCSET_NAME).tgz
MANUAL_URL = http://www.gnu.org/software/make/manual/make.html_node.tar.gz
MANUAL_FILE = tmp/make.html_node.tar.gz
-all: $(INFO_PLIST_FILE) $(INDEX_FILE) $(ICON_FILE)
+DOCSET = $(INFO_PLIST_FILE) $(INDEX_FILE) $(ICON_FILE)
+
+all: $(DOCSET)
+
+archive: $(ARCHIVE_FILE)
clean:
- rm -rf $(DOCSET_DIR)
+ rm -rf $(DOCSET_DIR) $(ARCHIVE_FILE)
tmp:
mkdir $@
+$(ARCHIVE_FILE): $(DOCSET)
+ tar --exclude='.DS_Store' -czf $@ $(DOCSET_DIR)
+
$(MANUAL_FILE): tmp
curl -o $@ $(MANUAL_URL)