From 42523cf2ff2bbac13eeeb18ab3a57d7f4ec795a5 Mon Sep 17 00:00:00 2001 From: mfe-a5sys <87469153+mfe-a5sys@users.noreply.github.com> Date: Tue, 28 Jan 2025 09:44:34 +0100 Subject: [PATCH 1/2] fix (Makefile): Configure editor to use tabs by default Add indent style to tabs when editing Makefiles --- .editorconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.editorconfig b/.editorconfig index 0315479cc..7384c6a1d 100644 --- a/.editorconfig +++ b/.editorconfig @@ -55,3 +55,6 @@ indent_style = tab [*.*Caddyfile] indent_style = tab + +[Makefile] +indent_style = tab From d8fe58d83f535f221695ec646de116db1397b400 Mon Sep 17 00:00:00 2001 From: mfe-a5sys <87469153+mfe-a5sys@users.noreply.github.com> Date: Tue, 28 Jan 2025 12:08:06 +0100 Subject: [PATCH 2/2] fix (Makefile): Add documentation for .editorconfig --- .editorconfig | 3 --- docs/makefile.md | 13 +++++++++++++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.editorconfig b/.editorconfig index 7384c6a1d..0315479cc 100644 --- a/.editorconfig +++ b/.editorconfig @@ -55,6 +55,3 @@ indent_style = tab [*.*Caddyfile] indent_style = tab - -[Makefile] -indent_style = tab diff --git a/docs/makefile.md b/docs/makefile.md index 80c4d20aa..05b071a1a 100644 --- a/docs/makefile.md +++ b/docs/makefile.md @@ -95,3 +95,16 @@ sf: ## List all Symfony commands or pass the parameter "c=" to run a given comma cc: c=c:c ## Clear the cache cc: sf ``` + +## Adding and modifying jobs + +Make sure to add this configuration to the [.editorconfig](/.editorconfig) file, so that it forces your editor to use tabs instead of spaces (Makefiles are not compatible with spaces by default). + +```.editorconfig + +[Makefile] +indent_style = tab + +``` + +If you still want to use space, you can configure the prefix in the Makefile itself. See [this answer on StackExchange](https://retrocomputing.stackexchange.com/a/20303). \ No newline at end of file