From 173581b657202995829b200ac9e4a1244937a638 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20M=C3=BCller?= Date: Fri, 5 Jan 2024 19:18:21 +0100 Subject: [PATCH] Fix botched merge --- Makefile | 22 +++++++++++++--------- docs.mk | 5 ++++- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index be9f02f1..63161999 100644 --- a/Makefile +++ b/Makefile @@ -54,39 +54,45 @@ all: build include docs.mk -build: ## Build shards -build: phony bin/shards +.PHONY: build +build: bin/shards +.PHONY: clean clean: ## Remove build artifacts -clean: phony clean_docs +clean: clean_docs rm -f bin/shards bin/shards: $(SOURCES) $(TEMPLATES) lib @mkdir -p bin $(EXPORTS) $(CRYSTAL) build $(FLAGS) src/shards.cr -o bin/shards +.PHONY: install install: ## Install shards -install: bin/shards man/shards.1.gz man/shard.yml.5.gz phony +install: bin/shards man/shards.1.gz man/shard.yml.5.gz $(INSTALL) -m 0755 -d "$(BINDIR)" "$(MANDIR)/man1" "$(MANDIR)/man5" $(INSTALL) -m 0755 bin/shards "$(BINDIR)" $(INSTALL) -m 0644 man/shards.1.gz "$(MANDIR)/man1" $(INSTALL) -m 0644 man/shard.yml.5.gz "$(MANDIR)/man5" +.PHONY: uninstall uninstall: ## Uninstall shards -uninstall: phony +uninstall: rm -f "$(BINDIR)/shards" rm -f "$(MANDIR)/man1/shards.1.gz" rm -f "$(MANDIR)/man5/shard.yml.5.gz" +.PHONY: test test: ## Run all tests test: test_unit test_integration +.PHONY: test_unit test_unit: ## Run unit tests -test_unit: phony lib +test_unit: lib $(CRYSTAL) spec ./spec/unit/ $(if $(skip_fossil),--tag ~fossil) $(if $(skip_git),--tag ~git) $(if $(skip_hg),--tag ~hg) +.PHONY: test_integration test_integration: ## Run integration tests -test_integration: bin/shards phony +test_integration: bin/shards $(CRYSTAL) spec ./spec/integration/ lib: shard.lock @@ -99,8 +105,6 @@ shard.lock: shard.yml man/%.gz: man/% gzip -c -9 $< > $@ -phony: - .PHONY: help help: ## Show this help @echo diff --git a/docs.mk b/docs.mk index 03014e91..5a536e8d 100644 --- a/docs.mk +++ b/docs.mk @@ -8,12 +8,15 @@ HTML_FILES := docs/shards.html docs/shard.yml.html SHARDS_VERSION := $(shell cat VERSION) SOURCE_DATE_EPOCH := $(shell (git show -s --format=%ct HEAD || stat -c "%Y" Makefile || stat -f "%m" Makefile) 2> /dev/null) +.PHONY: docs docs: ## Build documentation docs: manpages +.PHONY: manpages manpages: ## Generate manpages from adoc manpages: $(MAN_FILES) +.PHONY: htmlpages htmlpages: ## Generate HTML files from adoc htmlpages: $(HTML_FILES) @@ -23,7 +26,7 @@ man/%.1 man/%.5: docs/%.adoc docs/%.html: docs/%.adoc SOURCE_DATE_EPOCH=$(SOURCE_DATE_EPOCH) $(ASCIIDOC) $(ASCIIDOC_OPTIONS) $< -b html5 -o $@ +.PHONY: clean_docs clean_docs: ## Remove documentation data -clean_docs: phony rm -f $(MAN_FILES) rm -rf docs/*.html