_ _
___ | |__ __ _ _______ | |_
/ _ \| '_ \ / _` |_ / _ \| __|
| (_) | | | | (_| |/ / (_) | |_
\___/|_| |_|\__,_/___\___/ \__|
make —
using OpenBSD make
(back to top)
| makefile |
: if no makefile is specified with -f makefile it defaults to makefile,
Makefile. |
| target |
: defaults to the first defined target, unless .MAIN: is specified. |
| echo |
: it echoes the command unless the command is called @command or make is
called with -s. |
| errors |
: exits on error unless ignored by calling -command or make is called
with -i. |
(back to top)
| -n |
: display commands instead of excuting them. |
| -I DIRECTORY |
: specify directory to search makefile. |
| -j MAX_JOBS |
: specify maximum parallel jobs. |
(back to top)
| :S |
: Substitute string :S/old/new/ |
| :C |
: Substitute regex :C/pattern/replacement |
(back to top)
target:
commands
target! #run even when up-to-date
target: prereq
target1 target2:
@echo "this only displays this text but not the command itself."
-cat /tmp/file_that_does_not_exist
VAR=something
VAR_RES!=command result
VAR_SUB=${VAR:S/STRING/REP/}
VAR_REGSUB=${VAR:C/REGEX/REP/}
target_show:
echo 'target name: ' ${@}
(back to top)
t2:
-cat Makefile
t1: t2
cat makefile
makefile t3!
echo ${@}
t4_t5:
@echo 'target: ' ${@}
@echo 'change t5 to t6: ' ${@:S/t5/t6/}
@echo 't4: ' ${@:C/_.*$//}
@echo 't5: ' ${@:C/^.*_//}
(back to top)
| 2025-11-10 |
: added pmake and Slackbuilds considerations. |
| 2025-10-03 |
: Created. |