@@ -49,43 +49,50 @@ INSTALL ?= /usr/bin/install
49
49
MOLINILLO_VERSION = $(shell $(CRYSTAL ) eval 'require "yaml"; puts YAML.parse(File.read("shard.lock") )["shards"]["molinillo"]["version"]')
50
50
MOLINILLO_URL = "https://github.com/crystal-lang/crystal-molinillo/archive/v$(MOLINILLO_VERSION ) .tar.gz"
51
51
52
+ .PHONY : all
52
53
all : build
53
54
54
55
include docs.mk
55
56
56
- build : # # Build shards
57
- build : phony bin/shards
57
+ .PHONY : build
58
+ build : bin/shards
58
59
60
+ .PHONY : clean
59
61
clean : # # Remove build artifacts
60
- clean : phony clean_docs
62
+ clean : clean_docs
61
63
rm -f bin/shards
62
64
63
65
bin/shards : $(SOURCES ) $(TEMPLATES ) lib
64
66
@mkdir -p bin
65
67
$(EXPORTS ) $(CRYSTAL ) build $(FLAGS ) src/shards.cr -o bin/shards
66
68
69
+ .PHONY : install
67
70
install : # # Install shards
68
- install : bin/shards man/shards.1.gz man/shard.yml.5.gz phony
71
+ install : bin/shards man/shards.1.gz man/shard.yml.5.gz
69
72
$(INSTALL ) -m 0755 -d " $( BINDIR) " " $( MANDIR) /man1" " $( MANDIR) /man5"
70
73
$(INSTALL ) -m 0755 bin/shards " $( BINDIR) "
71
74
$(INSTALL ) -m 0644 man/shards.1.gz " $( MANDIR) /man1"
72
75
$(INSTALL ) -m 0644 man/shard.yml.5.gz " $( MANDIR) /man5"
73
76
77
+ .PHONY : uninstall
74
78
uninstall : # # Uninstall shards
75
- uninstall : phony
79
+ uninstall :
76
80
rm -f " $( BINDIR) /shards"
77
81
rm -f " $( MANDIR) /man1/shards.1.gz"
78
82
rm -f " $( MANDIR) /man5/shard.yml.5.gz"
79
83
84
+ .PHONY : test
80
85
test : # # Run all tests
81
86
test : test_unit test_integration
82
87
88
+ .PHONY : test_unit
83
89
test_unit : # # Run unit tests
84
- test_unit : phony lib
90
+ test_unit : lib
85
91
$(CRYSTAL ) spec ./spec/unit/ $(if $(skip_fossil ) ,--tag ~fossil) $(if $(skip_git ) ,--tag ~git) $(if $(skip_hg ) ,--tag ~hg)
86
92
93
+ .PHONY : test_integration
87
94
test_integration : # # Run integration tests
88
- test_integration : bin/shards phony
95
+ test_integration : bin/shards
89
96
$(CRYSTAL ) spec ./spec/integration/
90
97
91
98
lib : shard.lock
@@ -98,8 +105,6 @@ shard.lock: shard.yml
98
105
man/% .gz : man/%
99
106
gzip -c -9 $< > $@
100
107
101
- phony :
102
-
103
108
.PHONY : help
104
109
help : # # Show this help
105
110
@echo
0 commit comments