1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-13 17:10:47 +02:00

Split Makefile.lib into several *.mk files

This commit is contained in:
Eelco Dolstra 2013-11-25 09:50:35 +00:00
parent e9b6397d2f
commit f980755766
9 changed files with 243 additions and 203 deletions

23
mk/install.mk Normal file
View file

@ -0,0 +1,23 @@
# Add a rule for creating $(1) as a directory. This template may be
# called multiple times for the same directory.
define create-dir =
ifndef $(1)_SEEN
$(1)_SEEN = 1
$(1):
install -d $(1)
endif
endef
# Add a rule for installing file $(2) in directory $(1). The
# directory will be created automatically.
define install-file-in =
install:: $(1)/$(notdir $(2))
$$(eval $$(call create-dir,$(1)))
$(1)/$(notdir $(2)): $(2) | $(1)
install -t $(1) $(2)
endef