summaryrefslogtreecommitdiff
path: root/config.mk
diff options
context:
space:
mode:
authorLouie S <louie@example.com>2024-06-19 16:15:21 -0400
committerLouie S <louie@example.com>2024-06-19 16:15:21 -0400
commitdb6dc09396ce2ec8888c96c5a986f4f6cca96fc9 (patch)
tree6a5f52364a8552327bee1326661d01d78ade98ef /config.mk
parent9b79eadc9523bb49ddc100164a9be42d93360080 (diff)
Convert to submodule
Diffstat (limited to 'config.mk')
-rw-r--r--config.mk65
1 files changed, 65 insertions, 0 deletions
diff --git a/config.mk b/config.mk
new file mode 100644
index 0000000..5f2d284
--- /dev/null
+++ b/config.mk
@@ -0,0 +1,65 @@
+DOCSET_NAME = GNU_Autoconf
+
+DOCSET_DIR = $(DOCSET_NAME).docset
+CONTENTS_DIR = $(DOCSET_DIR)/Contents
+RESOURCES_DIR = $(CONTENTS_DIR)/Resources
+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
+
+VERSION=2.72
+MANUAL_URL = https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-${VERSION}/autoconf.html_node.tar.gz
+MANUAL_FILE = tmp/autoconf.html_node.tar.gz
+
+DOCSET = $(INFO_PLIST_FILE) $(INDEX_FILE) $(ICON_FILE)
+
+all: $(DOCSET)
+
+archive: $(ARCHIVE_FILE)
+
+clean:
+ rm -rf $(DOCSET_DIR) $(ARCHIVE_FILE)
+
+tmp:
+ mkdir -p $@
+
+$(ARCHIVE_FILE): $(DOCSET)
+ tar --exclude='.DS_Store' -czf $@ $(DOCSET_DIR)
+
+$(MANUAL_FILE): tmp
+ curl -o $@ $(MANUAL_URL)
+
+$(DOCSET_DIR):
+ mkdir -p $@
+
+$(CONTENTS_DIR): $(DOCSET_DIR)
+ mkdir -p $@
+
+$(RESOURCES_DIR): $(CONTENTS_DIR)
+ mkdir -p $@
+
+$(DOCUMENTS_DIR): $(RESOURCES_DIR) $(MANUAL_FILE)
+ mkdir -p $@
+ tar -x -z -f $(MANUAL_FILE) -C $@
+
+$(INFO_PLIST_FILE): src/Info.plist $(CONTENTS_DIR)
+ cp src/Info.plist $@
+
+$(INDEX_FILE): src/index.sh $(DOCUMENTS_DIR)
+ rm -f $@
+ src/index.sh $@ $(DOCUMENTS_DIR)/*.html
+ src/index.sh -i "Entry" $@ $(DOCUMENTS_DIR)/Concept-Index.html
+ src/index.sh -i "Macro" $@ $(DOCUMENTS_DIR)/M4-Macro-Index.html
+ src/index.sh -i "Macro" $@ $(DOCUMENTS_DIR)/Autoconf-Macro-Index.html
+ src/index.sh -i "Macro" $@ $(DOCUMENTS_DIR)/Autotest-Macro-Index.html
+ src/index.sh -i "Variable" $@ $(DOCUMENTS_DIR)/Cache-Variable-Index.html
+ src/index.sh -i "Variable" $@ $(DOCUMENTS_DIR)/Output-Variable-Index.html
+ src/index.sh -i "Function" $@ $(DOCUMENTS_DIR)/Program-_0026-Function-Index.html
+ src/index.sh -i "Entry" $@ $(DOCUMENTS_DIR)/Preprocessor-Symbol-Index.html
+ src/index.sh -i "Variable" $@ $(DOCUMENTS_DIR)/Environment-Variable-Index.html
+
+$(ICON_FILE): src/icon.png $(DOCSET_DIR)
+ cp src/icon.png $@