[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
119/376: Add support for order-only dependencies
From: |
Ludovic Courtès |
Subject: |
119/376: Add support for order-only dependencies |
Date: |
Wed, 28 Jan 2015 22:04:27 +0000 |
civodul pushed a commit to tag 1.8
in repository guix.
commit a6f4554656d24d488627c713274e2cae82fc51d3
Author: Eelco Dolstra <address@hidden>
Date: Thu Aug 7 16:10:23 2014 +0200
Add support for order-only dependencies
---
libraries.mk | 12 ++++++++++++
programs.mk | 10 ++++++++++
2 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/libraries.mk b/libraries.mk
index 4b8292c..3b91c69 100644
--- a/libraries.mk
+++ b/libraries.mk
@@ -21,6 +21,9 @@ endif
#
# - $(1)_CXXFLAGS: additional C++ compiler flags.
#
+# - $(1)_ORDER_AFTER: a set of targets on which the object files of
+# this libraries will have an order-only dependency.
+#
# - $(1)_LIBS: the symbolic names of other libraries on which this
# library depends.
#
@@ -89,6 +92,8 @@ define build-library
$(1)_LDFLAGS_USE_INSTALLED += -L$$(DESTDIR)$$($(1)_INSTALL_DIR)
-l$$(patsubst lib%,%,$$(strip $$($(1)_NAME)))
ifeq ($(SET_RPATH_TO_LIBS), 1)
$(1)_LDFLAGS_USE_INSTALLED += -Wl,-rpath,$$($(1)_INSTALL_DIR)
+ else
+ $(1)_LDFLAGS_USE_INSTALLED += -Wl,-rpath-link,$$($(1)_INSTALL_DIR)
endif
ifdef $(1)_FORCE_INSTALL
@@ -118,6 +123,13 @@ define build-library
# Make each object file depend on the common dependencies.
$$(foreach obj, $$($(1)_OBJS), $$(eval $$(obj): $$($(1)_COMMON_DEPS)
$$(GLOBAL_COMMON_DEPS)))
+ # Make each object file have order-only dependencies on the common
+ # order-only dependencies. This includes the order-only dependencies
+ # of libraries we're depending on.
+ $(1)_ORDER_AFTER_CLOSED = $$($(1)_ORDER_AFTER) $$(foreach lib,
$$($(1)_LIBS), $$($$(lib)_ORDER_AFTER_CLOSED))
+
+ $$(foreach obj, $$($(1)_OBJS), $$(eval $$(obj): |
$$($(1)_ORDER_AFTER_CLOSED) $$(GLOBAL_ORDER_AFTER)))
+
# Include .dep files, if they exist.
$(1)_DEPS := $$(foreach fn, $$($(1)_OBJS), $$(call filename-to-dep, $$(fn)))
-include $$($(1)_DEPS)
diff --git a/programs.mk b/programs.mk
index b6de068..72afdf9 100644
--- a/programs.mk
+++ b/programs.mk
@@ -12,6 +12,9 @@ programs-list :=
#
# - $(1)_CXXFLAGS: additional C++ compiler flags.
#
+# - $(1)_ORDER_AFTER: a set of targets on which the object files of
+# this program will have an order-only dependency.
+#
# - $(1)_LIBS: the symbolic names of libraries on which this program
# depends.
#
@@ -59,6 +62,13 @@ define build-program
# Make each object file depend on the common dependencies.
$$(foreach obj, $$($(1)_OBJS), $$(eval $$(obj): $$($(1)_COMMON_DEPS)
$$(GLOBAL_COMMON_DEPS)))
+ # Make each object file have order-only dependencies on the common
+ # order-only dependencies. This includes the order-only dependencies
+ # of libraries we're depending on.
+ $(1)_ORDER_AFTER_CLOSED = $$($(1)_ORDER_AFTER) $$(foreach lib,
$$($(1)_LIBS), $$($$(lib)_ORDER_AFTER_CLOSED))
+
+ $$(foreach obj, $$($(1)_OBJS), $$(eval $$(obj): |
$$($(1)_ORDER_AFTER_CLOSED) $$(GLOBAL_ORDER_AFTER)))
+
# Include .dep files, if they exist.
$(1)_DEPS := $$(foreach fn, $$($(1)_OBJS), $$(call filename-to-dep, $$(fn)))
-include $$($(1)_DEPS)
- 96/376: nix-daemon: Pass on the user's $SSH_AUTH_SOCK to the SSH substituter, (continued)
- 96/376: nix-daemon: Pass on the user's $SSH_AUTH_SOCK to the SSH substituter, Ludovic Courtès, 2015/01/28
- 101/376: make clean: Remove Makefile.config, Ludovic Courtès, 2015/01/28
- 105/376: findRoots(): Prevent a call to lstat(), Ludovic Courtès, 2015/01/28
- 108/376: Remove ugly hack for detecting build environment setup errors, Ludovic Courtès, 2015/01/28
- 107/376: Call commonChildInit() before doing chroot init, Ludovic Courtès, 2015/01/28
- 104/376: Make readDirectory() return inode / file type, Ludovic Courtès, 2015/01/28
- 106/376: Eliminate redundant copy, Ludovic Courtès, 2015/01/28
- 110/376: Make chroot builds easier to set up, Ludovic Courtès, 2015/01/28
- 109/376: Speed up nix-shell, Ludovic Courtès, 2015/01/28
- 121/376: nix-install-package: Use extra-binary-caches, Ludovic Courtès, 2015/01/28
- 119/376: Add support for order-only dependencies,
Ludovic Courtès <=
- 118/376: install-nix-from-closure.sh: Use https channel if possible, Ludovic Courtès, 2015/01/28
- 114/376: Refactor, Ludovic Courtès, 2015/01/28
- 117/376: Remove unnecessary call to addTempRoot(), Ludovic Courtès, 2015/01/28
- 115/376: Move some options out of globals, Ludovic Courtès, 2015/01/28
- 116/376: Doh, Ludovic Courtès, 2015/01/28
- 112/376: Add option ‘build-extra-chroot-dirs’, Ludovic Courtès, 2015/01/28
- 111/376: Get rid of "killing <pid>" message for unused build hooks, Ludovic Courtès, 2015/01/28
- 129/376: Remove log2html.xsl and friends, Ludovic Courtès, 2015/01/28
- 122/376: Warn about untrusted binary caches in extra-binary-caches, Ludovic Courtès, 2015/01/28
- 113/376: Update manual, Ludovic Courtès, 2015/01/28