Skip to content

Commit 5325a09

Browse files
committed
Update README
1 parent b3617a0 commit 5325a09

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
11
# Makefiles
22

33
Common Makefiles for Devilbox ecosystem.
4+
5+
6+
## Usage in main Makefile
7+
8+
```makefile
9+
ifneq (,)
10+
.error This Makefile requires GNU Make.
11+
endif
12+
13+
# Ensure additional Makefiles are present
14+
MAKEFILES = Makefile.docker Makefile.lint
15+
$(MAKEFILES): URL=https://raw.githubusercontent.com/devilbox/makefiles/master/$(@)
16+
$(MAKEFILES):
17+
@if ! (curl --fail -sS -o $(@) $(URL) || wget -O $(@) $(URL)); then \
18+
echo "Error, curl or wget required."; \
19+
echo "Exiting."; \
20+
false; \
21+
fi
22+
include $(MAKEFILES)
23+
```

0 commit comments

Comments
 (0)