summaryrefslogtreecommitdiffstats
path: root/build/TFbuild.epilogue
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@iki.fi>2009-11-19 14:32:11 +0200
committerTimo Teras <timo.teras@iki.fi>2009-11-24 08:12:45 +0200
commite4e54c2ec744e884f6f55c135bea78e815d28d6c (patch)
tree3278c0bdb3eedc47eaf71ef53b9ff849cb136593 /build/TFbuild.epilogue
downloadlibtf-e4e54c2ec744e884f6f55c135bea78e815d28d6c.tar.bz2
libtf-e4e54c2ec744e884f6f55c135bea78e815d28d6c.tar.xz
libtf: initial commit
libtf is to be user-space cooperative threading library similar to State Threads (http://state-threads.sourceforge.net/), but with additional support for multiple cores, using better algorithms and taking advantage of new Linux kernel syscalls such as eventfd, signalfd and epoll (edge-triggered mode). Initial implementation has setjmp based user-space context switching and trivial testcase. Works on Linux/x86. TFbuild uses ideas from different build systems, namely Kbuild, but it's inner workings are quite different. All build files are included (using macro trickery) instead of recursive making. Thus the build dependency graph is complete and should yield good make performance. Also parallel stuff should work.
Diffstat (limited to 'build/TFbuild.epilogue')
-rw-r--r--build/TFbuild.epilogue20
1 files changed, 20 insertions, 0 deletions
diff --git a/build/TFbuild.epilogue b/build/TFbuild.epilogue
new file mode 100644
index 0000000..af0baad
--- /dev/null
+++ b/build/TFbuild.epilogue
@@ -0,0 +1,20 @@
+# Store per-directory variables
+#$(call MemoizeVariables, CFLAGS LDFLAGS LIBS)
+
+file-vars := $(filter $(foreach m,$(local-vars),$(m)_%),$(.VARIABLES))
+file-vars := $(filter-out $(foreach m,$(local-vars),$(m)_ALL),$(file-vars))
+$(foreach m,$(file-vars),$(eval $(call MemoizeVariable,$(m))))
+
+# Handle this directory's rules
+$(foreach m,$(libs-y),$(eval $(call CreateLibrary,$(m))))
+$(foreach m,$(progs-y),$(eval $(call CreateProgram,$(m))))
+
+# Handle subdir of this subdir
+subdirs--$(recursion-level) := $(addsuffix /,$(subdirs-y))
+include $(subdirs-y:%=$(build-prologue) $(current-dir)%/TFbuild $(build-epilogue))
+
+# And restore parent context
+$(foreach m,$(local-vars),$(eval $(call MemoizeAndPopVariable,$(m))))
+
+current-dir := $(parent-dir--$(recursion-level))
+current-dirc := $(parent-dirc--$(recursion-level))