From 9835846d8e13e66591b7b5713a4a4f36d0fb39f8 Mon Sep 17 00:00:00 2001 From: Javier Cicchelli Date: Sat, 8 Apr 2023 20:26:07 +0200 Subject: [PATCH] Added the Makefile file to the project and implemented some environment and help commands in it. --- DeepLinking.xcodeproj/project.pbxproj | 12 +++++++++++ Makefile | 31 +++++++++++++++++++++++++++ README.md | 2 +- 3 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 Makefile diff --git a/DeepLinking.xcodeproj/project.pbxproj b/DeepLinking.xcodeproj/project.pbxproj index 17b8ec6..bcde49f 100644 --- a/DeepLinking.xcodeproj/project.pbxproj +++ b/DeepLinking.xcodeproj/project.pbxproj @@ -125,6 +125,8 @@ 46EB332B29E1CE05001D5EAF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 46EB333229E1CFD9001D5EAF /* Libraries */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = Libraries; sourceTree = ""; }; 46EB333429E1D158001D5EAF /* Shared */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = Shared; sourceTree = ""; }; + 46EB334929E1D34B001D5EAF /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; + 46EB334A29E1D3C0001D5EAF /* Makefile */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -145,6 +147,7 @@ children = ( 46EB333429E1D158001D5EAF /* Shared */, 46EB325729E1BCAB001D5EAF /* Apps */, + 46EB334B29E1D3D2001D5EAF /* Others */, 46EB32EE29E1CD20001D5EAF /* Products */, 46EB334229E1D1EC001D5EAF /* Frameworks */, ); @@ -226,6 +229,15 @@ name = Frameworks; sourceTree = ""; }; + 46EB334B29E1D3D2001D5EAF /* Others */ = { + isa = PBXGroup; + children = ( + 46EB334A29E1D3C0001D5EAF /* Makefile */, + 46EB334929E1D34B001D5EAF /* README.md */, + ); + name = Others; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..e23d831 --- /dev/null +++ b/Makefile @@ -0,0 +1,31 @@ +# Variables + +BREW_FORMULAE := clang-format swiftlint + +# --- ENVIRONMENT --- + +set-environment: ## Setup your development environment for this project. +ifeq (, $(shell which brew)) + @echo "You're required to enter your root password to install HOMEBREW in your Mac." + @sudo true + @curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh | sudo -u $$USER bash +else + @echo "Updating HOMEBREW before installing the dependencies. This might take a little while..." + @brew update +endif + @brew install $(BREW_FORMULAE) || brew upgrade $(BREW_FORMULAE) + +unset-environment: ## Unset your development environment for this project. + @brew uninstall $(BREW_FORMULAE) + @brew cleanup + +# --- HELP --- + +# Output the documentation for each of the defined tasks when `help` is called. +# Reference: https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html +.PHONY: help + +help: ## Print the written documentation for all the defined tasks. + @awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) + +.DEFAULT_GOAL := help diff --git a/README.md b/README.md index 0f086b8..79481bb 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ -# deep-linking-assignment +# Deep linking: Wikipedia