From 2f49c09aea91884c82d3a33fe0174ff3b093e846 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Fri, 3 Jul 2015 12:58:52 +0200 Subject: Allow changing template whitespace By default templates use tabs. Unfortunately there are misguided heretics who prefer spaces. Bummer. Two variables are introduced: * SP= can be set to use spaces per indentation level. * WS= can be set to use for each indentation level. Most users will just want to use SP, for example: make new t=gen_server n=my_server SP=4 Note that people who want tabs don't have to do anything; tabs are still the default. WS is reserved for advanced users. Normal Make rules apply: all whitespaces are trimmed. To specify 4 spaces using WS, you can do the following: make new t=gen_server n=my_server WS='$(empty) $(empty)' Ugly, right? So just use SP. Finally, SP and WS can be put in your Makefile directly. In fact, erlang.mk will automatically add SP to a newly created project if it was used during creation. For example: make -f erlang.mk bootstrap SP=2 So in time we should only need to make a note in the docs at project creation time, as there is very little value after that point. --- core/core.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'core/core.mk') diff --git a/core/core.mk b/core/core.mk index ad70ee6..2bf717a 100644 --- a/core/core.mk +++ b/core/core.mk @@ -119,6 +119,7 @@ help:: empty := space := $(empty) $(empty) +tab := $(empty) $(empty) comma := , define newline -- cgit v1.2.3