-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
.PHONY: clean check-nix check-git | ||
.DEFAULT_GOAL = all | ||
|
||
GIT_COMMIT = $(shell git rev-parse HEAD) | ||
SOURCES = include/*.inc | ||
|
||
all: check-nix check-git ${SOURCES} | ||
@echo "Starting build with git commit ID: ${GIT_COMMIT}" | ||
nix-build --argstr ref ${GIT_COMMIT} | ||
|
||
clean: | ||
rm result || true | ||
|
||
check-git: | ||
@command -v git > /dev/null 2>&1 || (echo "Must have git installed on your system." && exit 1) | ||
@git rev-parse HEAD >/dev/null 2>&1 || (echo "Must be running inside of a git repository." && exit 1) | ||
|
||
check-nix: | ||
@command -v nix-build > /dev/null 2>&1 || (echo "Must have Nix installed on your system." && exit 1) |