Skip to content

Commit

Permalink
Fix botched merge
Browse files Browse the repository at this point in the history
  • Loading branch information
straight-shoota committed Jan 5, 2024
1 parent abcfeab commit 173581b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
22 changes: 13 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -99,8 +105,6 @@ shard.lock: shard.yml
man/%.gz: man/%
gzip -c -9 $< > $@

phony:

.PHONY: help
help: ## Show this help
@echo
Expand Down
5 changes: 4 additions & 1 deletion docs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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

0 comments on commit 173581b

Please sign in to comment.