From 169297c8e8464ca0cf600e9e426f11d170ee169d Mon Sep 17 00:00:00 2001 From: Ben Beltran Date: Thu, 18 May 2017 22:44:41 -0500 Subject: Include makefile for easier building --- Makefile | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..34eec3a --- /dev/null +++ b/Makefile @@ -0,0 +1,28 @@ +configuration = debug +build_path = .build + +# These are used to rename the executable to lrc without renaming the package +source_binary_name = lyricli +target_binary_name = lrc +install_path = /usr/local/bin +source_binary_path = $(build_path)/$(configuration)/$(source_binary_name) +install_binary_path = $(install_path)/$(target_binary_name) + +# Default to release configuration on install +install: configuration = release + +default: build + +build: + swift build --build-path $(build_path) --configuration $(configuration) + +install: build + cp $(source_binary_path) $(install_binary_path) + +test: build + swift test + +clean: + swift build --clean + +.PHONY: build test clean -- cgit From 307993a0c51d3207581c33068d69e2b826348bd6 Mon Sep 17 00:00:00 2001 From: Ben Beltran Date: Fri, 19 May 2017 00:05:14 -0500 Subject: Add lint target to make --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 34eec3a..abbfd02 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,10 @@ install: build test: build swift test +lint: + cd Sources && swiftlint + clean: swift build --clean -.PHONY: build test clean +.PHONY: build install test clean lint -- cgit From 0a349ded18c79cfab18627e48bbd5ddeb21153d1 Mon Sep 17 00:00:00 2001 From: Ben Beltran Date: Fri, 19 May 2017 00:32:10 -0500 Subject: Add documentation target to make --- Makefile | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index abbfd02..499e1d1 100644 --- a/Makefile +++ b/Makefile @@ -25,6 +25,18 @@ test: build lint: cd Sources && swiftlint +document: build + sourcekitten doc --spm-module $(source_binary_name) > $(build_path)/$(source_binary_name).json + jazzy \ + -s $(build_path)/$(source_binary_name).json \ + --readme README.md \ + --clean \ + --author Lyricli \ + --author_url https://github.com/lyricli-app \ + --github_url https://github.com/lyricli-app/lyricli \ + --module-version 0.0.0 \ + --module Lyricli \ + clean: swift build --clean -- cgit