.Dd Created:2025-10-03|Updated:2025-10-10| .de ocsi \\$* , .. .de oxr .ocsi .Xr \\$* .. .de oit .It \\$* .. .de obdi .Bl -dash -compact .oit \\$* .. .de obdl .Bd -literal -compact \\$* .. .de onote .Bl -hang -compact .oit \\$* .El .. .de ocomm .Bl -diag -compact .oit \\$* .El .. .de opsy .Pp .Sy - \\$* .. .de obc .Bl -column \\$* .. .de obc2 .obc opt desc .. .de obc3 .obc option arguments description .. .Dt MAKE oh .Os OpenBSD 7.7 linux| .Nm make .Nd using OpenBSD make .Sh SYNOPSIS .Cm make .Op Fl f Ar MAKEFILE .Bl -diag -compact .It use bmake on linux. It's Slackbuild on Slackware. .It Slackware has a core package pmake which works as well (as far as I have tested). .El .Sh DEFAULTS .Bl -column -offset indent ".Sy makefile " ".Sy description " .It makefile Ta : if no makefile is specified with -f makefile it defaults to makefile, Makefile. .It target Ta : defaults to the first defined target, unless .MAIN: is specified. .It echo Ta : it echoes the command unless the command is called @command. .It errors Ta : exits on error unless ignored by calling -command. .El .Sh MODIFIERS .Bl -column -offset indent ".Sy option " ".Sy description " .It :S Ta : Substitute string :S/old/new/ .It :C Ta : Substitute regex :C/pattern/replacement .El .Sh USAGE .Bd -literal -compact target: commands .MAIN: [MAIN_TARGET] 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 .END: [TARGET_RUN_ON_SUCCESS_AT_THE_END] .BEGIN: [TARGET_RUN_AT_BEGINNING] VAR=something VAR_RES!=command result VAR_SUB=${VAR:S/STRING/REP/} VAR_REGSUB=${VAR:C/REGEX/REP/} target_show: echo 'target name: ' ${@} .Ed .Sh EXAMPLE .Bd -literal -compact 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/^.*_//} .MAIN: t1 .Ed .Sh TODO .Bl -dash -compact .It Improve document. .El .Sh SEE ALSO .Xr openbsd oh .opsy example makefiles: .In /dev/ohazot.mk .opsy OpenBSD manpages: .Xr make 1 .opsy ArchLinux manpages: .Lk https://man.archlinux.org/man/bmake.1 bmake (OpenBSD make): .El .Sh AUTHORS .An -nosplit .Xr ohazot oh | .Xr about oh | .Lk https://ohazot.com ohazot.com .Aq Mt admin@ohazot.com