From 3ca0b616c02442d8e48eb6c0beefde6515a183b8 Mon Sep 17 00:00:00 2001 From: "Darryl L. Miles" Date: Wed, 16 Oct 2024 18:31:19 +0100 Subject: [PATCH] Makefile: toplevel 'make techs' target to process scmos during build Previously it would only build the 'scmos' subdir when the 'make install' target is running, which is done sudo. This would result in a number of files in scmos/cif_template/objs to be owned by 'root'. Renamed TECH to TECHS which is inline with the other caregories MODULES and LIBS. --- Makefile | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 0c9ca509..3895f4b1 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ MAGICDIR = . PROGRAMS = magic -TECH = scmos +TECHS = scmos LIBRARIES = database utils extflat MODULES = bplane cmwind commands database dbwind debug drc extflat \ extract graphics netmenu plow resis select sim textio tiles \ @@ -14,11 +14,11 @@ MODULES = bplane cmwind commands database dbwind debug drc extflat \ VERSION := $(shell cat ${MAGICDIR}/VERSION) MAKEFLAGS = -INSTALL_CAD_DIRS = windows doc ${TECH} +INSTALL_CAD_DIRS = windows doc ${TECHS} -include defs.mak -all: $(ALL_TARGET) +all: $(ALL_TARGET) techs standard: @echo --- errors and warnings logged in file make.log @@ -81,6 +81,12 @@ $(addsuffix /Depend, ${SUBDIRS_FILTERED}): database/database.h .PHONY: depend depend: defs.mak $(addsuffix /Depend, ${SUBDIRS_FILTERED}) +.PHONY: techs +techs: depend + @echo --- making techs + for dir in ${TECHS}; do \ + (cd $$dir && ${MAKE} all) || exit 1; done + install: $(INSTALL_TARGET) install-magic: