|
From: <kin...@us...> - 2025-08-28 19:46:01
|
Revision: 7333
http://sourceforge.net/p/teem/code/7333
Author: kindlmann
Date: 2025-08-28 19:45:58 +0000 (Thu, 28 Aug 2025)
Log Message:
-----------
TeemV2 GNUmakefile simplification seems to be done (but will have to do more Teem hacking with them to really exercise them)
Modified Paths:
--------------
teem/trunk/src/GNUmakefile
teem/trunk/src/TODO.txt
teem/trunk/src/air/GNUmakefile
teem/trunk/src/alan/GNUmakefile
teem/trunk/src/bane/GNUmakefile
teem/trunk/src/biff/GNUmakefile
teem/trunk/src/bin/GNUmakefile
teem/trunk/src/coil/GNUmakefile
teem/trunk/src/dye/GNUmakefile
teem/trunk/src/echo/GNUmakefile
teem/trunk/src/elf/GNUmakefile
teem/trunk/src/ell/GNUmakefile
teem/trunk/src/gage/GNUmakefile
teem/trunk/src/hest/GNUmakefile
teem/trunk/src/hoover/GNUmakefile
teem/trunk/src/limn/GNUmakefile
teem/trunk/src/make/template.mk
teem/trunk/src/meet/GNUmakefile
teem/trunk/src/mite/GNUmakefile
teem/trunk/src/moss/GNUmakefile
teem/trunk/src/nrrd/GNUmakefile
teem/trunk/src/pull/GNUmakefile
teem/trunk/src/push/GNUmakefile
teem/trunk/src/seek/GNUmakefile
teem/trunk/src/ten/GNUmakefile
teem/trunk/src/tijk/GNUmakefile
teem/trunk/src/unrrdu/GNUmakefile
Modified: teem/trunk/src/GNUmakefile
===================================================================
--- teem/trunk/src/GNUmakefile 2025-08-28 17:29:52 UTC (rev 7332)
+++ teem/trunk/src/GNUmakefile 2025-08-28 19:45:58 UTC (rev 7333)
@@ -169,8 +169,6 @@
HdrPath := $(TeemRoot)/built/include
LibPath := $(TeemRoot)/built/lib
BinPath := $(TeemRoot)/built/bin
-$(foreach dir,$(ObjPath) $(HdrPath) $(HdrPath)/teem $(LibPath) $(BinPath),\
- $(call create.if.missing,$(dir)))
dashI += -I$(HdrPath)
# we still need this for the teem*.h headers (such as teemPng.h)
dashI += -I$(TeemRoot)/include
@@ -194,6 +192,10 @@
llink = $(foreach L,$(call RevOrder,$(1)),-l$(L))
banner = echo -e "\n-------" $(1) "-------" $(1) "-------" $(1) "-------" $(1) "-------\n"
+## name of parent directory that immediately contains us
+## (used in a previous version of lib/GNUmakefile)
+# pardir := $(notdir $(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST))))))
+
## NOTE: In all of these, "File" could be singular or plural
## SrcHdrFile(L): paths to all (public and private) headers in souce for lib L
## HdrFile(Ls): paths to all public headers "installed" for lib L in Ls
@@ -300,6 +302,10 @@
#######################################
+## Create missing directories as needed
+$(foreach dir,$(ObjPath) $(HdrPath) $(HdrPath)/teem $(LibPath) $(BinPath),\
+ $(call create.if.missing,$(dir)))
+
## Read in the makefiles for all the libraries, and the bins. Run-away recursive
## inclusion is prevented by the Top.Included and other guards. Note: "include" is a
## directive, not a function, which would seem to eliminate the possibility of iterating
Modified: teem/trunk/src/TODO.txt
===================================================================
--- teem/trunk/src/TODO.txt 2025-08-28 17:29:52 UTC (rev 7332)
+++ teem/trunk/src/TODO.txt 2025-08-28 19:45:58 UTC (rev 7333)
@@ -31,11 +31,6 @@
Teem can't use "meet", but there should at least be consistent naming
conventions.
-Consider doing away with "experimental" libraries and applications:
-its annoying to have two totally different kinds of Teem installs,
-especially when it means that it would mean two different python
-wrappings.
-
Consider extending const-correctness of function input not just to
pointers, but to all values as well.
@@ -244,7 +239,6 @@
** should be re-evaluated.
for cmake:
- - build pv on windows
- see if wild-card expansion works as expected on windows
- make cmd-line utilities link with static libs
@@ -297,26 +291,3 @@
fout Eurovis 05: High-Quality Rendering of Compressed Volume Data Formats
callahan TVCG May/June 05: Hardware-Assisted Visibility Sorting for Unstructured Volume Rendering
jorik blaas vis05 fiber paper
-
-Following are less of an issue now that CMake is in use ...
-
-make system really botched: change the size of the tenFiberContext
-(added a field or two), do a make ten/install,
-then cd ../push; rm -f test/pusher
-
-make install; make; and
-you'll STILL get memory errors due to seeing library/object files
-which use the older context size. Do a top-level make clobber, and
-then things work. This is crap. I think the problem is that
-development object files of push were not recompiled when they should
-have been- doing a make clobber; make in push solved the problem...
-Examples of this:
-- change limn.h, cd ../ten, make, nothing to be done WRONG
-- make a change in nrrdEnums.h, which unrrdu/project.c
- uses directly. recompile, and nrrd gets compiled, but not unrrdu,
- so unu doesn't get updated correctly!
-- add a macro in ELL, make install in ell,
- cd limn, make ../limn/test/tiso, doesn't see new header
- and fails at link-time with "<new macro> symbol undefined"
-- want seperate directories for static and shared libraries
-- want bin/dev and bin/install targets
Modified: teem/trunk/src/air/GNUmakefile
===================================================================
--- teem/trunk/src/air/GNUmakefile 2025-08-28 17:29:52 UTC (rev 7332)
+++ teem/trunk/src/air/GNUmakefile 2025-08-28 19:45:58 UTC (rev 7333)
@@ -17,13 +17,16 @@
# along with this library; if not, see <https://www.gnu.org/licenses/>.
#
-# boilerplate: start include guard based on containing dir, then
-# set library name L, define default targets, include top-level GNUmakefile
-pardir := $(notdir $(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST))))))
-ifndef $(pardir).Included
-######## HERE is where L is set to library name
-L := $(pardir)
-$(L).Included := yes
+#### Library name
+####
+####
+L := air
+####
+####
+####
+
+# boilerplate: set top-level paths and targets if not set, include top-level GNUmakefile,
+# and guard reading of per-library variables and (via template.mk) rules
TeemRoot ?= ../..
TeemSrc ?= ..
ifndef DefaultTargets
@@ -32,8 +35,9 @@
test : $(L).test
clean : $(L).clean
endif # ifndef DefaultTargets
-.PHONY: $(TeemSrc)/GNUmakefile
include $(TeemSrc)/GNUmakefile
+ifndef $(L).Included
+$(L).Included := yes
#### Describe library L here
####
@@ -49,7 +53,7 @@
####
####
-# boilerplate: declare rules for L via template, finish include guard
-.PHONY: $(TeemSrc)/make/template.mk
+# boilerplate: enable "make test/T", template lib L rules, finish include guard
+$(foreach T,$($(L).Test),$(eval test/$(T) : ../$(L)/test/$(T)))
include $(TeemSrc)/make/template.mk
endif # ifndef $(L).Included
Modified: teem/trunk/src/alan/GNUmakefile
===================================================================
--- teem/trunk/src/alan/GNUmakefile 2025-08-28 17:29:52 UTC (rev 7332)
+++ teem/trunk/src/alan/GNUmakefile 2025-08-28 19:45:58 UTC (rev 7333)
@@ -17,13 +17,16 @@
# along with this library; if not, see <https://www.gnu.org/licenses/>.
#
-# boilerplate: start include guard based on containing dir, then
-# set library name L, define default targets, include top-level GNUmakefile
-pardir := $(notdir $(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST))))))
-ifndef $(pardir).Included
-######## HERE is where L is set to library name
-L := $(pardir)
-$(L).Included := yes
+#### Library name
+####
+####
+L := alan
+####
+####
+####
+
+# boilerplate: set top-level paths and targets if not set, include top-level GNUmakefile,
+# and guard reading of per-library variables and (via template.mk) rules
TeemRoot ?= ../..
TeemSrc ?= ..
ifndef DefaultTargets
@@ -32,8 +35,9 @@
test : $(L).test
clean : $(L).clean
endif # ifndef DefaultTargets
-.PHONY: $(TeemSrc)/GNUmakefile
include $(TeemSrc)/GNUmakefile
+ifndef $(L).Included
+$(L).Included := yes
#### Describe library L here
####
@@ -47,7 +51,7 @@
####
####
-# boilerplate: declare rules for L via template, finish include guard
-.PHONY: $(TeemSrc)/make/template.mk
+# boilerplate: enable "make test/T", template lib L rules, finish include guard
+$(foreach T,$($(L).Test),$(eval test/$(T) : ../$(L)/test/$(T)))
include $(TeemSrc)/make/template.mk
endif # ifndef $(L).Included
Modified: teem/trunk/src/bane/GNUmakefile
===================================================================
--- teem/trunk/src/bane/GNUmakefile 2025-08-28 17:29:52 UTC (rev 7332)
+++ teem/trunk/src/bane/GNUmakefile 2025-08-28 19:45:58 UTC (rev 7333)
@@ -17,13 +17,16 @@
# along with this library; if not, see <https://www.gnu.org/licenses/>.
#
-# boilerplate: start include guard based on containing dir, then
-# set library name L, define default targets, include top-level GNUmakefile
-pardir := $(notdir $(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST))))))
-ifndef $(pardir).Included
-######## HERE is where L is set to library name
-L := $(pardir)
-$(L).Included := yes
+#### Library name
+####
+####
+L := bane
+####
+####
+####
+
+# boilerplate: set top-level paths and targets if not set, include top-level GNUmakefile,
+# and guard reading of per-library variables and (via template.mk) rules
TeemRoot ?= ../..
TeemSrc ?= ..
ifndef DefaultTargets
@@ -32,8 +35,9 @@
test : $(L).test
clean : $(L).clean
endif # ifndef DefaultTargets
-.PHONY: $(TeemSrc)/GNUmakefile
include $(TeemSrc)/GNUmakefile
+ifndef $(L).Included
+$(L).Included := yes
#### Describe library L here
####
@@ -51,7 +55,7 @@
####
####
-# boilerplate: declare rules for L via template, finish include guard
-.PHONY: $(TeemSrc)/make/template.mk
+# boilerplate: enable "make test/T", template lib L rules, finish include guard
+$(foreach T,$($(L).Test),$(eval test/$(T) : ../$(L)/test/$(T)))
include $(TeemSrc)/make/template.mk
endif # ifndef $(L).Included
Modified: teem/trunk/src/biff/GNUmakefile
===================================================================
--- teem/trunk/src/biff/GNUmakefile 2025-08-28 17:29:52 UTC (rev 7332)
+++ teem/trunk/src/biff/GNUmakefile 2025-08-28 19:45:58 UTC (rev 7333)
@@ -17,13 +17,16 @@
# along with this library; if not, see <https://www.gnu.org/licenses/>.
#
-# boilerplate: start include guard based on containing dir, then
-# set library name L, define default targets, include top-level GNUmakefile
-pardir := $(notdir $(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST))))))
-ifndef $(pardir).Included
-######## HERE is where L is set to library name
-L := $(pardir)
-$(L).Included := yes
+#### Library name
+####
+####
+L := biff
+####
+####
+####
+
+# boilerplate: set top-level paths and targets if not set, include top-level GNUmakefile,
+# and guard reading of per-library variables and (via template.mk) rules
TeemRoot ?= ../..
TeemSrc ?= ..
ifndef DefaultTargets
@@ -32,8 +35,9 @@
test : $(L).test
clean : $(L).clean
endif # ifndef DefaultTargets
-.PHONY: $(TeemSrc)/GNUmakefile
include $(TeemSrc)/GNUmakefile
+ifndef $(L).Included
+$(L).Included := yes
#### Describe library L here
####
@@ -47,7 +51,7 @@
####
####
-# boilerplate: declare rules for L via template, finish include guard
-.PHONY: $(TeemSrc)/make/template.mk
+# boilerplate: enable "make test/T", template lib L rules, finish include guard
+$(foreach T,$($(L).Test),$(eval test/$(T) : ../$(L)/test/$(T)))
include $(TeemSrc)/make/template.mk
endif # ifndef $(L).Included
Modified: teem/trunk/src/bin/GNUmakefile
===================================================================
--- teem/trunk/src/bin/GNUmakefile 2025-08-28 17:29:52 UTC (rev 7332)
+++ teem/trunk/src/bin/GNUmakefile 2025-08-28 19:45:58 UTC (rev 7333)
@@ -18,7 +18,6 @@
#
# boiler-ish-plate: default targets, include, and guarding per-"lib" rules
-ifndef bin.Included
TeemRoot ?= ../..
TeemSrc ?= ..
ifndef DefaultTargets
@@ -26,8 +25,9 @@
bild : bin.bild
clean : bin.clean
endif
-.PHONY: $(TeemSrc)/GNUmakefile
include $(TeemSrc)/GNUmakefile
+ifndef bin.Included
+bin.Included := yes
#### By the ordering and guarding of includes, this should ALWAYS be the last "library"
#### makefile to be parsed, regardless of the directory in which make started.
Modified: teem/trunk/src/coil/GNUmakefile
===================================================================
--- teem/trunk/src/coil/GNUmakefile 2025-08-28 17:29:52 UTC (rev 7332)
+++ teem/trunk/src/coil/GNUmakefile 2025-08-28 19:45:58 UTC (rev 7333)
@@ -17,13 +17,16 @@
# along with this library; if not, see <https://www.gnu.org/licenses/>.
#
-# boilerplate: start include guard based on containing dir, then
-# set library name L, define default targets, include top-level GNUmakefile
-pardir := $(notdir $(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST))))))
-ifndef $(pardir).Included
-######## HERE is where L is set to library name
-L := $(pardir)
-$(L).Included := yes
+#### Library name
+####
+####
+L := coil
+####
+####
+####
+
+# boilerplate: set top-level paths and targets if not set, include top-level GNUmakefile,
+# and guard reading of per-library variables and (via template.mk) rules
TeemRoot ?= ../..
TeemSrc ?= ..
ifndef DefaultTargets
@@ -32,8 +35,9 @@
test : $(L).test
clean : $(L).clean
endif # ifndef DefaultTargets
-.PHONY: $(TeemSrc)/GNUmakefile
include $(TeemSrc)/GNUmakefile
+ifndef $(L).Included
+$(L).Included := yes
#### Describe library L here
####
@@ -49,7 +53,7 @@
####
####
-# boilerplate: declare rules for L via template, finish include guard
-.PHONY: $(TeemSrc)/make/template.mk
+# boilerplate: enable "make test/T", template lib L rules, finish include guard
+$(foreach T,$($(L).Test),$(eval test/$(T) : ../$(L)/test/$(T)))
include $(TeemSrc)/make/template.mk
endif # ifndef $(L).Included
Modified: teem/trunk/src/dye/GNUmakefile
===================================================================
--- teem/trunk/src/dye/GNUmakefile 2025-08-28 17:29:52 UTC (rev 7332)
+++ teem/trunk/src/dye/GNUmakefile 2025-08-28 19:45:58 UTC (rev 7333)
@@ -17,13 +17,16 @@
# along with this library; if not, see <https://www.gnu.org/licenses/>.
#
-# boilerplate: start include guard based on containing dir, then
-# set library name L, define default targets, include top-level GNUmakefile
-pardir := $(notdir $(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST))))))
-ifndef $(pardir).Included
-######## HERE is where L is set to library name
-L := $(pardir)
-$(L).Included := yes
+#### Library name
+####
+####
+L := dye
+####
+####
+####
+
+# boilerplate: set top-level paths and targets if not set, include top-level GNUmakefile,
+# and guard reading of per-library variables and (via template.mk) rules
TeemRoot ?= ../..
TeemSrc ?= ..
ifndef DefaultTargets
@@ -32,8 +35,9 @@
test : $(L).test
clean : $(L).clean
endif # ifndef DefaultTargets
-.PHONY: $(TeemSrc)/GNUmakefile
include $(TeemSrc)/GNUmakefile
+ifndef $(L).Included
+$(L).Included := yes
#### Describe library L here
####
@@ -48,7 +52,7 @@
####
####
-# boilerplate: declare rules for L via template, finish include guard
-.PHONY: $(TeemSrc)/make/template.mk
+# boilerplate: enable "make test/T", template lib L rules, finish include guard
+$(foreach T,$($(L).Test),$(eval test/$(T) : ../$(L)/test/$(T)))
include $(TeemSrc)/make/template.mk
endif # ifndef $(L).Included
Modified: teem/trunk/src/echo/GNUmakefile
===================================================================
--- teem/trunk/src/echo/GNUmakefile 2025-08-28 17:29:52 UTC (rev 7332)
+++ teem/trunk/src/echo/GNUmakefile 2025-08-28 19:45:58 UTC (rev 7333)
@@ -17,13 +17,16 @@
# along with this library; if not, see <https://www.gnu.org/licenses/>.
#
-# boilerplate: start include guard based on containing dir, then
-# set library name L, define default targets, include top-level GNUmakefile
-pardir := $(notdir $(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST))))))
-ifndef $(pardir).Included
-######## HERE is where L is set to library name
-L := $(pardir)
-$(L).Included := yes
+#### Library name
+####
+####
+L := echo
+####
+####
+####
+
+# boilerplate: set top-level paths and targets if not set, include top-level GNUmakefile,
+# and guard reading of per-library variables and (via template.mk) rules
TeemRoot ?= ../..
TeemSrc ?= ..
ifndef DefaultTargets
@@ -32,8 +35,9 @@
test : $(L).test
clean : $(L).clean
endif # ifndef DefaultTargets
-.PHONY: $(TeemSrc)/GNUmakefile
include $(TeemSrc)/GNUmakefile
+ifndef $(L).Included
+$(L).Included := yes
#### Describe library L here
####
@@ -48,7 +52,7 @@
####
####
-# boilerplate: declare rules for L via template, finish include guard
-.PHONY: $(TeemSrc)/make/template.mk
+# boilerplate: enable "make test/T", template lib L rules, finish include guard
+$(foreach T,$($(L).Test),$(eval test/$(T) : ../$(L)/test/$(T)))
include $(TeemSrc)/make/template.mk
endif # ifndef $(L).Included
Modified: teem/trunk/src/elf/GNUmakefile
===================================================================
--- teem/trunk/src/elf/GNUmakefile 2025-08-28 17:29:52 UTC (rev 7332)
+++ teem/trunk/src/elf/GNUmakefile 2025-08-28 19:45:58 UTC (rev 7333)
@@ -17,13 +17,16 @@
# along with this library; if not, see <https://www.gnu.org/licenses/>.
#
-# boilerplate: start include guard based on containing dir, then
-# set library name L, define default targets, include top-level GNUmakefile
-pardir := $(notdir $(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST))))))
-ifndef $(pardir).Included
-######## HERE is where L is set to library name
-L := $(pardir)
-$(L).Included := yes
+#### Library name
+####
+####
+L := elf
+####
+####
+####
+
+# boilerplate: set top-level paths and targets if not set, include top-level GNUmakefile,
+# and guard reading of per-library variables and (via template.mk) rules
TeemRoot ?= ../..
TeemSrc ?= ..
ifndef DefaultTargets
@@ -32,8 +35,9 @@
test : $(L).test
clean : $(L).clean
endif # ifndef DefaultTargets
-.PHONY: $(TeemSrc)/GNUmakefile
include $(TeemSrc)/GNUmakefile
+ifndef $(L).Included
+$(L).Included := yes
#### Describe library L here
####
@@ -47,7 +51,7 @@
####
####
-# boilerplate: declare rules for L via template, finish include guard
-.PHONY: $(TeemSrc)/make/template.mk
+# boilerplate: enable "make test/T", template lib L rules, finish include guard
+$(foreach T,$($(L).Test),$(eval test/$(T) : ../$(L)/test/$(T)))
include $(TeemSrc)/make/template.mk
endif # ifndef $(L).Included
Modified: teem/trunk/src/ell/GNUmakefile
===================================================================
--- teem/trunk/src/ell/GNUmakefile 2025-08-28 17:29:52 UTC (rev 7332)
+++ teem/trunk/src/ell/GNUmakefile 2025-08-28 19:45:58 UTC (rev 7333)
@@ -17,13 +17,16 @@
# along with this library; if not, see <https://www.gnu.org/licenses/>.
#
-# boilerplate: start include guard based on containing dir, then
-# set library name L, define default targets, include top-level GNUmakefile
-pardir := $(notdir $(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST))))))
-ifndef $(pardir).Included
-######## HERE is where L is set to library name
-L := $(pardir)
-$(L).Included := yes
+#### Library name
+####
+####
+L := ell
+####
+####
+####
+
+# boilerplate: set top-level paths and targets if not set, include top-level GNUmakefile,
+# and guard reading of per-library variables and (via template.mk) rules
TeemRoot ?= ../..
TeemSrc ?= ..
ifndef DefaultTargets
@@ -32,8 +35,9 @@
test : $(L).test
clean : $(L).clean
endif # ifndef DefaultTargets
-.PHONY: $(TeemSrc)/GNUmakefile
include $(TeemSrc)/GNUmakefile
+ifndef $(L).Included
+$(L).Included := yes
#### Describe library L here
####
@@ -47,7 +51,7 @@
####
####
-# boilerplate: declare rules for L via template, finish include guard
-.PHONY: $(TeemSrc)/make/template.mk
+# boilerplate: enable "make test/T", template lib L rules, finish include guard
+$(foreach T,$($(L).Test),$(eval test/$(T) : ../$(L)/test/$(T)))
include $(TeemSrc)/make/template.mk
endif # ifndef $(L).Included
Modified: teem/trunk/src/gage/GNUmakefile
===================================================================
--- teem/trunk/src/gage/GNUmakefile 2025-08-28 17:29:52 UTC (rev 7332)
+++ teem/trunk/src/gage/GNUmakefile 2025-08-28 19:45:58 UTC (rev 7333)
@@ -17,13 +17,16 @@
# along with this library; if not, see <https://www.gnu.org/licenses/>.
#
-# boilerplate: start include guard based on containing dir, then
-# set library name L, define default targets, include top-level GNUmakefile
-pardir := $(notdir $(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST))))))
-ifndef $(pardir).Included
-######## HERE is where L is set to library name
-L := $(pardir)
-$(L).Included := yes
+#### Library name
+####
+####
+L := gage
+####
+####
+####
+
+# boilerplate: set top-level paths and targets if not set, include top-level GNUmakefile,
+# and guard reading of per-library variables and (via template.mk) rules
TeemRoot ?= ../..
TeemSrc ?= ..
ifndef DefaultTargets
@@ -32,8 +35,9 @@
test : $(L).test
clean : $(L).clean
endif # ifndef DefaultTargets
-.PHONY: $(TeemSrc)/GNUmakefile
include $(TeemSrc)/GNUmakefile
+ifndef $(L).Included
+$(L).Included := yes
#### Describe library L here
####
@@ -51,7 +55,7 @@
####
####
-# boilerplate: declare rules for L via template, finish include guard
-.PHONY: $(TeemSrc)/make/template.mk
+# boilerplate: enable "make test/T", template lib L rules, finish include guard
+$(foreach T,$($(L).Test),$(eval test/$(T) : ../$(L)/test/$(T)))
include $(TeemSrc)/make/template.mk
endif # ifndef $(L).Included
Modified: teem/trunk/src/hest/GNUmakefile
===================================================================
--- teem/trunk/src/hest/GNUmakefile 2025-08-28 17:29:52 UTC (rev 7332)
+++ teem/trunk/src/hest/GNUmakefile 2025-08-28 19:45:58 UTC (rev 7333)
@@ -17,13 +17,16 @@
# along with this library; if not, see <https://www.gnu.org/licenses/>.
#
-# boilerplate: start include guard based on containing dir, then
-# set library name L, define default targets, include top-level GNUmakefile
-pardir := $(notdir $(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST))))))
-ifndef $(pardir).Included
-######## HERE is where L is set to library name
-L := $(pardir)
-$(L).Included := yes
+#### Library name
+####
+####
+L := hest
+####
+####
+####
+
+# boilerplate: set top-level paths and targets if not set, include top-level GNUmakefile,
+# and guard reading of per-library variables and (via template.mk) rules
TeemRoot ?= ../..
TeemSrc ?= ..
ifndef DefaultTargets
@@ -32,8 +35,9 @@
test : $(L).test
clean : $(L).clean
endif # ifndef DefaultTargets
-.PHONY: $(TeemSrc)/GNUmakefile
include $(TeemSrc)/GNUmakefile
+ifndef $(L).Included
+$(L).Included := yes
#### Describe library L here
####
@@ -47,7 +51,7 @@
####
####
-# boilerplate: declare rules for L via template, finish include guard
-.PHONY: $(TeemSrc)/make/template.mk
+# boilerplate: enable "make test/T", template lib L rules, finish include guard
+$(foreach T,$($(L).Test),$(eval test/$(T) : ../$(L)/test/$(T)))
include $(TeemSrc)/make/template.mk
endif # ifndef $(L).Included
Modified: teem/trunk/src/hoover/GNUmakefile
===================================================================
--- teem/trunk/src/hoover/GNUmakefile 2025-08-28 17:29:52 UTC (rev 7332)
+++ teem/trunk/src/hoover/GNUmakefile 2025-08-28 19:45:58 UTC (rev 7333)
@@ -17,13 +17,16 @@
# along with this library; if not, see <https://www.gnu.org/licenses/>.
#
-# boilerplate: start include guard based on containing dir, then
-# set library name L, define default targets, include top-level GNUmakefile
-pardir := $(notdir $(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST))))))
-ifndef $(pardir).Included
-######## HERE is where L is set to library name
-L := $(pardir)
-$(L).Included := yes
+#### Library name
+####
+####
+L := hoover
+####
+####
+####
+
+# boilerplate: set top-level paths and targets if not set, include top-level GNUmakefile,
+# and guard reading of per-library variables and (via template.mk) rules
TeemRoot ?= ../..
TeemSrc ?= ..
ifndef DefaultTargets
@@ -32,8 +35,9 @@
test : $(L).test
clean : $(L).clean
endif # ifndef DefaultTargets
-.PHONY: $(TeemSrc)/GNUmakefile
include $(TeemSrc)/GNUmakefile
+ifndef $(L).Included
+$(L).Included := yes
#### Describe library L here
####
@@ -47,7 +51,7 @@
####
####
-# boilerplate: declare rules for L via template, finish include guard
-.PHONY: $(TeemSrc)/make/template.mk
+# boilerplate: enable "make test/T", template lib L rules, finish include guard
+$(foreach T,$($(L).Test),$(eval test/$(T) : ../$(L)/test/$(T)))
include $(TeemSrc)/make/template.mk
endif # ifndef $(L).Included
Modified: teem/trunk/src/limn/GNUmakefile
===================================================================
--- teem/trunk/src/limn/GNUmakefile 2025-08-28 17:29:52 UTC (rev 7332)
+++ teem/trunk/src/limn/GNUmakefile 2025-08-28 19:45:58 UTC (rev 7333)
@@ -17,13 +17,16 @@
# along with this library; if not, see <https://www.gnu.org/licenses/>.
#
-# boilerplate: start include guard based on containing dir, then
-# set library name L, define default targets, include top-level GNUmakefile
-pardir := $(notdir $(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST))))))
-ifndef $(pardir).Included
-######## HERE is where L is set to library name
-L := $(pardir)
-$(L).Included := yes
+#### Library name
+####
+####
+L := limn
+####
+####
+####
+
+# boilerplate: set top-level paths and targets if not set, include top-level GNUmakefile,
+# and guard reading of per-library variables and (via template.mk) rules
TeemRoot ?= ../..
TeemSrc ?= ..
ifndef DefaultTargets
@@ -32,8 +35,9 @@
test : $(L).test
clean : $(L).clean
endif # ifndef DefaultTargets
-.PHONY: $(TeemSrc)/GNUmakefile
include $(TeemSrc)/GNUmakefile
+ifndef $(L).Included
+$(L).Included := yes
#### Describe library L here
####
@@ -53,7 +57,7 @@
####
####
-# boilerplate: declare rules for L via template, finish include guard
-.PHONY: $(TeemSrc)/make/template.mk
+# boilerplate: enable "make test/T", template lib L rules, finish include guard
+$(foreach T,$($(L).Test),$(eval test/$(T) : ../$(L)/test/$(T)))
include $(TeemSrc)/make/template.mk
endif # ifndef $(L).Included
Modified: teem/trunk/src/make/template.mk
===================================================================
--- teem/trunk/src/make/template.mk 2025-08-28 17:29:52 UTC (rev 7332)
+++ teem/trunk/src/make/template.mk 2025-08-28 19:45:58 UTC (rev 7333)
@@ -1,4 +1,4 @@
- #
+#
# Teem: Tools to process and visualize scientific data and images
# Copyright (C) 2009--2025 University of Chicago
# Copyright (C) 2005--2008 Gordon Kindlmann
@@ -25,11 +25,14 @@
#### an immediate set by the library GNUmakefile.
####
-## Avoid redundant calls to Need(L) by evaluating and saving this once
+## Avoid redundant expensive calls evaluating and saving these once
##
$(L).Need := $(call Need,$(L))
$(L).MeNeed := $(call MeNeed,$(L))
-#$(warning template(L): $(L).Need = |$($(L).Need)|, $(L).MeNeed = |$($(L).MeNeed)|)
+$(L).MeNeedFile := $(foreach lib,$($(L).MeNeed),$(call LibFile,$(lib)) $(call HdrFile,$(lib)))
+#$(warning template($(L)): $(L).Need = |$($(L).Need)|)
+#$(warning template($(L)): $(L).MeNeed = |$($(L).MeNeed)|)
+#$(warning template($(L)): $(L).MeNeedFile = |$($(L).MeNeedFile)|)
## In a rule, the contexts of the target and the prerequisite are immediate, the contexts
## of the commands are deferred; there is no getting around this. Thus, if the commands
@@ -37,12 +40,12 @@
## is the one in effect with WHEN THE COMMAND IS RUN, not the one when the rule was read
## by make. Not useful.
##
-## For all the "entry-point" targets, we enstate a pattern-specific immediate variable
-## value _L. This bridges the immediate and deferred stages by remembering the value of
-## L at the time the rule was read, so that it can be used in the deferred context of the
-## rule's commands when run. Fortunately, the sementics of pattern-specific variables
-## mean that the value of _L will be set the same when satisfying all prerequisites of
-## $(L).%, which is exactly what we want.
+## For all the phony entry-point targets, we enstate a pattern-specific immediate
+## variable value _L. This bridges the immediate and deferred stages by remembering the
+## value of L at the time the rule was read, so that it can be used in the deferred
+## context of the rule's commands when run. Fortunately, the sementics of
+## pattern-specific variables mean that the value of _L will be set the same when
+## satisfying all prerequisites of $(L).%, which is exactly what we want.
##
$(L).% : _L := $(L)
@@ -51,9 +54,6 @@
## subsume the definition above, but it doesn't hurt to have both.
##
$(call LibFile,$(L)) : _L := $(L)
-
-## not sure why these are needed- version 3.78.1 on a solaris box definately needed the
-## last one, while others didn't
$(call HdrFile,$(L)) : _L := $(L)
$(call ObjFile,$(L)) : _L := $(L)
$(call TestFile,$(L)): _L := $(L)
@@ -60,18 +60,20 @@
## Here are the actual rules for building!
-## $(L).bild depends on $(P).bild for each pre-req libraries P,
-## on and $(L)'s library and header files in their built location
+## $(L).bild depends on the library and header files, in their built location, for me (L)
+## and for everything I (transitively) depend on. Rules below will describe how my
+## library and header files are created; prior libraries running this template.mk will do
+## the same for them.
##
-#$(warning [L.bild] $(L).bild : $(foreach P,$($(L).Need),$(P).bild) $(call LibFile,$(L)) $(call HdrFile,$(L)))
-$(L).bild : $(foreach P,$($(L).Need),$(P).bild) $(call LibFile,$(L)) $(call HdrFile,$(L))
+#$(warning $(L).bild : $($(L).MeNeedFile))
+$(L).bild : $($(L).MeNeedFile)
-## $(L).test depends first building L (and everything that depends on),
-## and then specifically on all the per-lib test programs
-#$(warning $(L).test : $(L).bild)
-$(L).test : $(L).bild
+## $(L).test depends on all the per-lib test programs
+## which in turn depend on first building L (and everything that it depends on),
#$(warning $(L).test : $(call TestFile,$(L)))
$(L).test : $(call TestFile,$(L))
+#$(warning $(call TestFile,$(L)) : $($(L).MeNeedFile)
+$(call TestFile,$(L)) : $($(L).MeNeedFile)
## $(L).clean undoes $(L).bild and $(L).test
##
@@ -81,18 +83,16 @@
$(RM) -r $(foreach bin,$(call TestFile,$(_L)),$(bin)$(LITTER))
endif
-# HEY still have to figure this out $(if $(LITTER),$(RM) $(TEEM_ROOT)/src/$(_L)/$(LITTER))
-
-## The objects of a lib depend on the headers of the libraries we depend on,
-## and on our own headers.
+## The objects of a lib depend on the headers of the libraries we
+## depend on (both directly and indirectly, or else ABI mismatches,
+## no?), and on our own headers.
##
#$(warning [ObjFile(L)] $(call ObjFile,$(L)) : ...)
-#$(warning [ObjFile(L)] ... : $(call HdrFile,$($(L).Depends)) $(call SrcHdrFile,$(L)))
-$(call ObjFile,$(L)) : $(call HdrFile,$($(L).Depends)) $(call SrcHdrFile,$(L))
+#$(warning [ObjFile(L)] ... : $(call HdrFile,$($(L).Need)) $(call SrcHdrFile,$(L)))
+$(call ObjFile,$(L)) : $(call HdrFile,$($(L).Need)) $(call SrcHdrFile,$(L))
## (L).maybebanner(obj) returns "echo ..." to show a library banner progress indicator,
-## but only if obj is the first object in $(L).OBJS. This mimics the behavior under the
-## old recursive teem makefile.
+## but only if obj is the first object in $(L).OBJS.
##
$(L).maybebanner = $(if $(filter $(notdir $(1:.c=.o)),\
$(word 1,$($(_L).Obj))),\
Modified: teem/trunk/src/meet/GNUmakefile
===================================================================
--- teem/trunk/src/meet/GNUmakefile 2025-08-28 17:29:52 UTC (rev 7332)
+++ teem/trunk/src/meet/GNUmakefile 2025-08-28 19:45:58 UTC (rev 7333)
@@ -17,13 +17,16 @@
# along with this library; if not, see <https://www.gnu.org/licenses/>.
#
-# boilerplate: start include guard based on containing dir, then
-# set library name L, define default targets, include top-level GNUmakefile
-pardir := $(notdir $(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST))))))
-ifndef $(pardir).Included
-######## HERE is where L is set to library name
-L := $(pardir)
-$(L).Included := yes
+#### Library name
+####
+####
+L := meet
+####
+####
+####
+
+# boilerplate: set top-level paths and targets if not set, include top-level GNUmakefile,
+# and guard reading of per-library variables and (via template.mk) rules
TeemRoot ?= ../..
TeemSrc ?= ..
ifndef DefaultTargets
@@ -32,8 +35,9 @@
test : $(L).test
clean : $(L).clean
endif # ifndef DefaultTargets
-.PHONY: $(TeemSrc)/GNUmakefile
include $(TeemSrc)/GNUmakefile
+ifndef $(L).Included
+$(L).Included := yes
#### Describe library L here
####
@@ -48,7 +52,7 @@
####
####
-# boilerplate: declare rules for L via template, finish include guard
-.PHONY: $(TeemSrc)/make/template.mk
+# boilerplate: enable "make test/T", template lib L rules, finish include guard
+$(foreach T,$($(L).Test),$(eval test/$(T) : ../$(L)/test/$(T)))
include $(TeemSrc)/make/template.mk
endif # ifndef $(L).Included
Modified: teem/trunk/src/mite/GNUmakefile
===================================================================
--- teem/trunk/src/mite/GNUmakefile 2025-08-28 17:29:52 UTC (rev 7332)
+++ teem/trunk/src/mite/GNUmakefile 2025-08-28 19:45:58 UTC (rev 7333)
@@ -17,13 +17,16 @@
# along with this library; if not, see <https://www.gnu.org/licenses/>.
#
-# boilerplate: start include guard based on containing dir, then
-# set library name L, define default targets, include top-level GNUmakefile
-pardir := $(notdir $(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST))))))
-ifndef $(pardir).Included
-######## HERE is where L is set to library name
-L := $(pardir)
-$(L).Included := yes
+#### Library name
+####
+####
+L := mite
+####
+####
+####
+
+# boilerplate: set top-level paths and targets if not set, include top-level GNUmakefile,
+# and guard reading of per-library variables and (via template.mk) rules
TeemRoot ?= ../..
TeemSrc ?= ..
ifndef DefaultTargets
@@ -32,8 +35,9 @@
test : $(L).test
clean : $(L).clean
endif # ifndef DefaultTargets
-.PHONY: $(TeemSrc)/GNUmakefile
include $(TeemSrc)/GNUmakefile
+ifndef $(L).Included
+$(L).Included := yes
#### Describe library L here
####
@@ -49,7 +53,7 @@
####
####
-# boilerplate: declare rules for L via template, finish include guard
-.PHONY: $(TeemSrc)/make/template.mk
+# boilerplate: enable "make test/T", template lib L rules, finish include guard
+$(foreach T,$($(L).Test),$(eval test/$(T) : ../$(L)/test/$(T)))
include $(TeemSrc)/make/template.mk
endif # ifndef $(L).Included
Modified: teem/trunk/src/moss/GNUmakefile
===================================================================
--- teem/trunk/src/moss/GNUmakefile 2025-08-28 17:29:52 UTC (rev 7332)
+++ teem/trunk/src/moss/GNUmakefile 2025-08-28 19:45:58 UTC (rev 7333)
@@ -17,13 +17,16 @@
# along with this library; if not, see <https://www.gnu.org/licenses/>.
#
-# boilerplate: start include guard based on containing dir, then
-# set library name L, define default targets, include top-level GNUmakefile
-pardir := $(notdir $(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST))))))
-ifndef $(pardir).Included
-######## HERE is where L is set to library name
-L := $(pardir)
-$(L).Included := yes
+#### Library name
+####
+####
+L := moss
+####
+####
+####
+
+# boilerplate: set top-level paths and targets if not set, include top-level GNUmakefile,
+# and guard reading of per-library variables and (via template.mk) rules
TeemRoot ?= ../..
TeemSrc ?= ..
ifndef DefaultTargets
@@ -32,8 +35,9 @@
test : $(L).test
clean : $(L).clean
endif # ifndef DefaultTargets
-.PHONY: $(TeemSrc)/GNUmakefile
include $(TeemSrc)/GNUmakefile
+ifndef $(L).Included
+$(L).Included := yes
#### Describe library L here
####
@@ -47,7 +51,7 @@
####
####
-# boilerplate: declare rules for L via template, finish include guard
-.PHONY: $(TeemSrc)/make/template.mk
+# boilerplate: enable "make test/T", template lib L rules, finish include guard
+$(foreach T,$($(L).Test),$(eval test/$(T) : ../$(L)/test/$(T)))
include $(TeemSrc)/make/template.mk
endif # ifndef $(L).Included
Modified: teem/trunk/src/nrrd/GNUmakefile
===================================================================
--- teem/trunk/src/nrrd/GNUmakefile 2025-08-28 17:29:52 UTC (rev 7332)
+++ teem/trunk/src/nrrd/GNUmakefile 2025-08-28 19:45:58 UTC (rev 7333)
@@ -17,13 +17,16 @@
# along with this library; if not, see <https://www.gnu.org/licenses/>.
#
-# boilerplate: start include guard based on containing dir, then
-# set library name L, define default targets, include top-level GNUmakefile
-pardir := $(notdir $(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST))))))
-ifndef $(pardir).Included
-######## HERE is where L is set to library name
-L := $(pardir)
-$(L).Included := yes
+#### Library name
+####
+####
+L := nrrd
+####
+####
+####
+
+# boilerplate: set top-level paths and targets if not set, include top-level GNUmakefile,
+# and guard reading of per-library variables and (via template.mk) rules
TeemRoot ?= ../..
TeemSrc ?= ..
ifndef DefaultTargets
@@ -32,8 +35,9 @@
test : $(L).test
clean : $(L).clean
endif # ifndef DefaultTargets
-.PHONY: $(TeemSrc)/GNUmakefile
include $(TeemSrc)/GNUmakefile
+ifndef $(L).Included
+$(L).Included := yes
#### Describe library L here
####
@@ -63,7 +67,7 @@
####
####
-# boilerplate: declare rules for L via template, finish include guard
-.PHONY: $(TeemSrc)/make/template.mk
+# boilerplate: enable "make test/T", template lib L rules, finish include guard
+$(foreach T,$($(L).Test),$(eval test/$(T) : ../$(L)/test/$(T)))
include $(TeemSrc)/make/template.mk
endif # ifndef $(L).Included
Modified: teem/trunk/src/pull/GNUmakefile
===================================================================
--- teem/trunk/src/pull/GNUmakefile 2025-08-28 17:29:52 UTC (rev 7332)
+++ teem/trunk/src/pull/GNUmakefile 2025-08-28 19:45:58 UTC (rev 7333)
@@ -17,13 +17,16 @@
# along with this library; if not, see <https://www.gnu.org/licenses/>.
#
-# boilerplate: start include guard based on containing dir, then
-# set library name L, define default targets, include top-level GNUmakefile
-pardir := $(notdir $(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST))))))
-ifndef $(pardir).Included
-######## HERE is where L is set to library name
-L := $(pardir)
-$(L).Included := yes
+#### Library name
+####
+####
+L := pull
+####
+####
+####
+
+# boilerplate: set top-level paths and targets if not set, include top-level GNUmakefile,
+# and guard reading of per-library variables and (via template.mk) rules
TeemRoot ?= ../..
TeemSrc ?= ..
ifndef DefaultTargets
@@ -32,8 +35,9 @@
test : $(L).test
clean : $(L).clean
endif # ifndef DefaultTargets
-.PHONY: $(TeemSrc)/GNUmakefile
include $(TeemSrc)/GNUmakefile
+ifndef $(L).Included
+$(L).Included := yes
#### Describe library L here
####
@@ -49,7 +53,7 @@
####
####
-# boilerplate: declare rules for L via template, finish include guard
-.PHONY: $(TeemSrc)/make/template.mk
+# boilerplate: enable "make test/T", template lib L rules, finish include guard
+$(foreach T,$($(L).Test),$(eval test/$(T) : ../$(L)/test/$(T)))
include $(TeemSrc)/make/template.mk
endif # ifndef $(L).Included
Modified: teem/trunk/src/push/GNUmakefile
===================================================================
--- teem/trunk/src/push/GNUmakefile 2025-08-28 17:29:52 UTC (rev 7332)
+++ teem/trunk/src/push/GNUmakefile 2025-08-28 19:45:58 UTC (rev 7333)
@@ -17,13 +17,16 @@
# along with this library; if not, see <https://www.gnu.org/licenses/>.
#
-# boilerplate: start include guard based on containing dir, then
-# set library name L, define default targets, include top-level GNUmakefile
-pardir := $(notdir $(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST))))))
-ifndef $(pardir).Included
-######## HERE is where L is set to library name
-L := $(pardir)
-$(L).Included := yes
+#### Library name
+####
+####
+L := push
+####
+####
+####
+
+# boilerplate: set top-level paths and targets if not set, include top-level GNUmakefile,
+# and guard reading of per-library variables and (via template.mk) rules
TeemRoot ?= ../..
TeemSrc ?= ..
ifndef DefaultTargets
@@ -32,8 +35,9 @@
test : $(L).test
clean : $(L).clean
endif # ifndef DefaultTargets
-.PHONY: $(TeemSrc)/GNUmakefile
include $(TeemSrc)/GNUmakefile
+ifndef $(L).Included
+$(L).Included := yes
#### Describe library L here
####
@@ -48,7 +52,7 @@
####
####
-# boilerplate: declare rules for L via template, finish include guard
-.PHONY: $(TeemSrc)/make/template.mk
+# boilerplate: enable "make test/T", template lib L rules, finish include guard
+$(foreach T,$($(L).Test),$(eval test/$(T) : ../$(L)/test/$(T)))
include $(TeemSrc)/make/template.mk
endif # ifndef $(L).Included
Modified: teem/trunk/src/seek/GNUmakefile
===================================================================
--- teem/trunk/src/seek/GNUmakefile 2025-08-28 17:29:52 UTC (rev 7332)
+++ teem/trunk/src/seek/GNUmakefile 2025-08-28 19:45:58 UTC (rev 7333)
@@ -17,13 +17,16 @@
# along with this library; if not, see <https://www.gnu.org/licenses/>.
#
-# boilerplate: start include guard based on containing dir, then
-# set library name L, define default targets, include top-level GNUmakefile
-pardir := $(notdir $(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST))))))
-ifndef $(pardir).Included
-######## HERE is where L is set to library name
-L := $(pardir)
-$(L).Included := yes
+#### Library name
+####
+####
+L := seek
+####
+####
+####
+
+# boilerplate: set top-level paths and targets if not set, include top-level GNUmakefile,
+# and guard reading of per-library variables and (via template.mk) rules
TeemRoot ?= ../..
TeemSrc ?= ..
ifndef DefaultTargets
@@ -32,8 +35,9 @@
test : $(L).test
clean : $(L).clean
endif # ifndef DefaultTargets
-.PHONY: $(TeemSrc)/GNUmakefile
include $(TeemSrc)/GNUmakefile
+ifndef $(L).Included
+$(L).Included := yes
#### Describe library L here
####
@@ -48,7 +52,7 @@
####
####
-# boilerplate: declare rules for L via template, finish include guard
-.PHONY: $(TeemSrc)/make/template.mk
+# boilerplate: enable "make test/T", template lib L rules, finish include guard
+$(foreach T,$($(L).Test),$(eval test/$(T) : ../$(L)/test/$(T)))
include $(TeemSrc)/make/template.mk
endif # ifndef $(L).Included
Modified: teem/trunk/src/ten/GNUmakefile
===================================================================
--- teem/trunk/src/ten/GNUmakefile 2025-08-28 17:29:52 UTC (rev 7332)
+++ teem/trunk/src/ten/GNUmakefile 2025-08-28 19:45:58 UTC (rev 7333)
@@ -17,13 +17,16 @@
# along with this library; if not, see <https://www.gnu.org/licenses/>.
#
-# boilerplate: start include guard based on containing dir, then
-# set library name L, define default targets, include top-level GNUmakefile
-pardir := $(notdir $(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST))))))
-ifndef $(pardir).Included
-######## HERE is where L is set to library name
-L := $(pardir)
-$(L).Included := yes
+#### Library name
+####
+####
+L := ten
+####
+####
+####
+
+# boilerplate: set top-level paths and targets if not set, include top-level GNUmakefile,
+# and guard reading of per-library variables and (via template.mk) rules
TeemRoot ?= ../..
TeemSrc ?= ..
ifndef DefaultTargets
@@ -32,8 +35,9 @@
test : $(L).test
clean : $(L).clean
endif # ifndef DefaultTargets
-.PHONY: $(TeemSrc)/GNUmakefile
include $(TeemSrc)/GNUmakefile
+ifndef $(L).Included
+$(L).Included := yes
#### Describe library L here
####
@@ -66,7 +70,7 @@
####
####
-# boilerplate: declare rules for L via template, finish include guard
-.PHONY: $(TeemSrc)/make/template.mk
+# boilerplate: enable "make test/T", template lib L rules, finish include guard
+$(foreach T,$($(L).Test),$(eval test/$(T) : ../$(L)/test/$(T)))
include $(TeemSrc)/make/template.mk
endif # ifndef $(L).Included
Modified: teem/trunk/src/tijk/GNUmakefile
===================================================================
--- teem/trunk/src/tijk/GNUmakefile 2025-08-28 17:29:52 UTC (rev 7332)
+++ teem/trunk/src/tijk/GNUmakefile 2025-08-28 19:45:58 UTC (rev 7333)
@@ -17,13 +17,16 @@
# along with this library; if not, see <https://www.gnu.org/licenses/>.
#
-# boilerplate: start include guard based on containing dir, then
-# set library name L, define default targets, include top-level GNUmakefile
-pardir := $(notdir $(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST))))))
-ifndef $(pardir).Included
-######## HERE is where L is set to library name
-L := $(pardir)
-$(L).Included := yes
+#### Library name
+####
+####
+L := tijk
+####
+####
+####
+
+# boilerplate: set top-level paths and targets if not set, include top-level GNUmakefile,
+# and guard reading of per-library variables and (via template.mk) rules
TeemRoot ?= ../..
TeemSrc ?= ..
ifndef DefaultTargets
@@ -32,8 +35,9 @@
test : $(L).test
clean : $(L).clean
endif # ifndef DefaultTargets
-.PHONY: $(TeemSrc)/GNUmakefile
include $(TeemSrc)/GNUmakefile
+ifndef $(L).Included
+$(L).Included := yes
#### Describe library L here
####
@@ -48,7 +52,7 @@
####
####
-# boilerplate: declare rules for L via template, finish include guard
-.PHONY: $(TeemSrc)/make/template.mk
+# boilerplate: enable "make test/T", template lib L rules, finish include guard
+$(foreach T,$($(L).Test),$(eval test/$(T) : ../$(L)/test/$(T)))
include $(TeemSrc)/make/template.mk
endif # ifndef $(L).Included
Modified: teem/trunk/src/unrrdu/GNUmakefile
===================================================================
--- teem/trunk/src/unrrdu/GNUmakefile 2025-08-28 17:29:52 UTC (rev 7332)
+++ teem/trunk/src/unrrdu/GNUmakefile 2025-08-28 19:45:58 UTC (rev 7333)
@@ -17,13 +17,16 @@
# along with this library; if not, see <https://www.gnu.org/licenses/>.
#
-# boilerplate: start include guard based on containing dir, then
-# set library name L, define default targets, include top-level GNUmakefile
-pardir := $(notdir $(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST))))))
-ifndef $(pardir).Included
-######## HERE is where L is set to library name
-L := $(pardir)
-$(L).Included := yes
+#### Library name
+####
+####
+L := unrrdu
+####
+####
+####
+
+# boilerplate: set top-level paths and targets if not set, include top-level GNUmakefile,
+# and guard reading of per-library variables and (via template.mk) rules
TeemRoot ?= ../..
TeemSrc ?= ..
ifndef DefaultTargets
@@ -32,8 +35,9 @@
test : $(L).test
clean : $(L).clean
endif # ifndef DefaultTargets
-.PHONY: $(TeemSrc)/GNUmakefile
include $(TeemSrc)/GNUmakefile
+ifndef $(L).Included
+$(L).Included := yes
#### Describe library L here
####
@@ -61,7 +65,7 @@
####
####
-# boilerplate: declare rules for L via template, finish include guard
-.PHONY: $(TeemSrc)/make/template.mk
+# boilerplate: enable "make test/T", template lib L rules, finish include guard
+$(foreach T,$($(L).Test),$(eval test/$(T) : ../$(L)/test/$(T)))
include $(TeemSrc)/make/template.mk
endif # ifndef $(L).Included
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|