config

OpenBSD system configuration
git clone git://jacobedwards.org/config
Log | Files | Refs | README

commit 35deefa23a8925b483fae697f749a2f6cd4a0e32
parent 4c27c74f9523fa214ae39195a3b6529bde6f331a
Author: Jacob R. Edwards <n/a>
Date:   Thu, 10 Feb 2022 09:34:28 -0800

Update Makefiles

Mostly change variable names to be lowercase and improve the recursive
make(1) system.

Diffstat:
MMakefile | 12++----------
MREADME | 12+++++++++---
Mglobal/Makefile | 10+++++-----
Mlib/module.make | 8+++++---
Alib/subdirs.make | 6++++++
Mlocal/Makefile | 10+++++-----
6 files changed, 32 insertions(+), 26 deletions(-)

diff --git a/Makefile b/Makefile @@ -1,13 +1,5 @@ -PKGS = local +subdirs = local all: install -install: -.for PKG in ${PKGS} - make -C ${PKG} install -.endfor - -uninstall: -.for PKG in ${PKGS} - make -C ${PKG} uninstall -.endfor +.include "lib/subdirs.make" diff --git a/README b/README @@ -1,6 +1,12 @@ OpenBSD system configuration -Using make(1) you can install various modules and packages such as -the vi and ksh modules from the local package: +It's organized into packages and modules, each package contains one +or more modules. Modules consist of a tree of flies relating to the +module's name. - $ make PKGS=local MODULES='vi ksh' +You may install specific modules (make(1) mods variable) from +specific packages (make(1) pkgs variable), or leave them to their +defaults, which are set how I like them. + +Note that a lot of modules in the global package are specific to +myself. diff --git a/global/Makefile b/global/Makefile @@ -1,11 +1,11 @@ -LIB = ../lib -ACTION = force copy -TARGET = / -MODULES =\ +lib = ../lib +act = force copy +dest = / +mods =\ doas\ rc\ sysctl\ wsconsctl\ xenodm\ -.include "${LIB}/module.make" +.include "${lib}/module.make" diff --git a/lib/module.make b/lib/module.make @@ -1,13 +1,15 @@ +# Module targets + all: install lib: - make -C ${LIB} + make -C ${lib} install: lib - ${LIB}/module ${ACTION} ${MODULES} ${TARGET} + ${lib}/module ${act} ${mods} ${dest} uninstall: lib - ${LIB}/module remove ${MODULES} ${TARGET} + ${lib}/module remove ${mods} ${dest} .PHONY: all lib install uninstall diff --git a/lib/subdirs.make b/lib/subdirs.make @@ -0,0 +1,6 @@ +# Make sub-directories + +install uninstall: +.for subdir in ${subdirs} + make -C ${subdir} $@ +.endfor diff --git a/local/Makefile b/local/Makefile @@ -1,7 +1,7 @@ -LIB = ../lib -ACTION = link -TARGET = ${HOME} -MODULES =\ +lib = ../lib +act = link +dest = ${HOME} +mods =\ bin\ dillo\ git\ @@ -18,4 +18,4 @@ MODULES =\ # tmux\ # vi\ -.include "${LIB}/module.make" +.include "${lib}/module.make"