comparison Makefile @ 394:b6b13f669174 prerelease

Improved make coreclean
author Giulio Moro <giuliomoro@yahoo.it>
date Tue, 14 Jun 2016 17:55:30 +0100
parents 814e85de67e1
children 922535948800
comparison
equal deleted inserted replaced
393:814e85de67e1 394:b6b13f669174
27 endif 27 endif
28 28
29 # if we are building an example, just copy it to the projects/ folder 29 # if we are building an example, just copy it to the projects/ folder
30 # and then treat it as a project 30 # and then treat it as a project
31 ifdef EXAMPLE 31 ifdef EXAMPLE
32 #you can alternatively specify PROJECT= along with EXAMPLE=
32 PROJECT?=exampleTempProject 33 PROJECT?=exampleTempProject
33 PROJECT_DIR?=$(abspath projects/$(PROJECT)) 34 PROJECT_DIR?=$(abspath projects/$(PROJECT))
34 $(shell mkdir -p $(abspath projects)) 35 $(shell mkdir -p $(abspath projects))
35 $(shell rm -rf $(PROJECT_DIR)) 36 $(shell rm -rf $(PROJECT_DIR))
36 $(shell cp -r examples/$(EXAMPLE) $(PROJECT_DIR)) 37 $(shell cp -r examples/$(EXAMPLE) $(PROJECT_DIR))
205 206
206 clean: ## Same as projectclean 207 clean: ## Same as projectclean
207 clean: projectclean 208 clean: projectclean
208 209
209 coreclean: ## Remove the core's build objects 210 coreclean: ## Remove the core's build objects
210 -$(RM) build/* 211 -$(RM) build/core/*
211 212
212 prompt: 213 prompt:
213 @printf "Warning: you are about to DELETE the projects/ folder and its content. This operation cannot be undone. Continue? (y/N) " 214 @printf "Warning: you are about to DELETE the projects/ folder and its content. This operation cannot be undone. Continue? (y/N) "
214 @read REPLY; if [ $$REPLY != y ] && [ $$REPLY != Y ]; then echo "Aborting..."; exit 1; fi 215 @read REPLY; if [ $$REPLY != y ] && [ $$REPLY != Y ]; then echo "Aborting..."; exit 1; fi
215 216