MKLS(1) General Commands Manual MKLS(1)

mklsgenerate make variable assignment list

mkls [-dis] [-f makefile] -- variable file ...

The mkls utility generates a make(1) conformant assignment list to variable for each file and appends it to makefile. An existing assignment list using the same variable is removed prior to appending. By default, the resulting makefile is written to standard output.

The options are as follows:

Produce a diff of makefile.
makefile
Specify an alternative makefile.
In place edit of makefile.
Sort each assignment list.
variable file ...
Add file to variable. Multiple assignment lists may be given by separating each one with the ‘--’ end of options sentinel.

Makefile
The default makefile.

Generate a list of all source code files and manuals:

$ ls *.[ch] *.[[:digit:]]
extern.h prog.c prog.1
$ mkls -- SRCS *.[ch] -- MAN *.[[:digit:]]
SRCS+=	extern.h
SRCS+=	prog.c

MAN+=	prog.1

The mkls utility exits 0 on success, and >0 if an error occurs.

make(1)

Anton Lindqvist <anton@basename.se>

OpenBSD 7.8 July 27, 2021 MKLS(1)