From 11fb1559b94ab61bd4678de3352ad8ddd0997dc7 Mon Sep 17 00:00:00 2001 From: Benjamin Ragheb Date: Sat, 9 May 2015 18:08:08 -0400 Subject: Add Makefile target to generate tgz archive of docset Also fix and update .gitignore --- .gitignore | 3 ++- Makefile | 12 ++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 13c780c..9941ba2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ -/GNUMake.docset +/GNU_Make.docset +/GNU_Make.tgz /tmp 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) -- cgit