-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
50 lines (42 loc) · 1.21 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#
# Maintenance Helpers
#
# This makefile contains targets used for development, as well as helpers to
# aid automatization of maintenance.
#
BUILDDIR ?= .
SRCDIR ?= .
BIN_MKDIR ?= mkdir
SHELL = /bin/bash
BUILDDIR_ABS := $(abspath $(BUILDDIR))
SRCDIR_ABS := $(abspath $(SRCDIR))
#
# Generic Targets
#
# The following is a set of generic targets used across the makefile. The
# following targets are defined:
#
# help
# This target prints all supported targets. This is also the default
# target.
#
# $(BUILDDIR)/
# $(BUILDDIR)/%/
# This target simply creates the specified directory. It is limited to
# the build-dir as a safety measure. Note that this requires you to use
# a trailing slash after the directory to not mix it up with regular
# files. Lastly, you mostly want this as order-only dependency, since
# timestamps on directories do not affect their content.
#
.PHONY: help
help:
@echo "make [TARGETS...]"
@echo
@echo "This is a project-maintenance makefile. The following"
@echo "targets are available:"
@echo
@echo " help: Print this usage information."
$(BUILDDIR)/:
$(BIN_MKDIR) -p "$@"
$(BUILDDIR)/%/:
$(BIN_MKDIR) -p "$@"