Sample Header Ad - 728x90

Makefile alternative for those who don't want tab indenting all content under the opener

2 votes
4 answers
2462 views
Is there a GNU make alternative if don't want to use tab indents in my make program (or make-like) program? For example, when I use make, I need to indent everything after the make opener, (% :). This is a recipe for some problems in some circumstances (for example, I work cross-platform and I use a Windows10 AutoHotkey mechanism that strips tabs from codes I paste into Linux terminals from different reasons and it doesn't pass over make hence I need a non tab including solution). The necessity to tab-indent everything under % : makes my work with make non fluent. This is the make I use to create new virtual host conf files. I execute it with make domain.tld.conf: % : printf '%s\n' \ '' \ 'DocumentRoot "/var/www/html/$@"' \ 'ServerName $@' \ '' \ 'Options +SymLinksIfOwnerMatch' \ 'Require all granted' \ '' \ 'ServerAlias www.$@' \ '' \ > "$@" a2ensite "$@" systemctl restart apache2.service Is there any alternative, maybe something that comes with Unix itself that provides similar functionality but without having to use tab indents in the pattern file itself?
Asked by user149572
May 5, 2017, 04:51 AM
Last activity: May 16, 2017, 07:32 PM