From 2637742612ebe1870032e9e15c9f317cbbdb13cf Mon Sep 17 00:00:00 2001 From: Eugeniy Mikhailov Date: Thu, 16 Apr 2015 23:53:37 -0400 Subject: css, pandoc, and rem use dest_dir facilities --- rem.mk | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'rem.mk') diff --git a/rem.mk b/rem.mk index b070616..1d8be29 100644 --- a/rem.mk +++ b/rem.mk @@ -4,8 +4,12 @@ CLEAN_TARGETS += clean_rem REAL_CLEAN_TARGETS += real_clean_rem +dest_dir_rem ?= $(dest_dir) +destination_dirs += $(dest_dir_rem) + rem_files = $(wildcard *.rem) html_from_rem = $(rem_files:%.rem=%.html) +html_from_rem_dest_targets = $(html_from_rem:%=$(dest_dir_rem)/%) html_rem: $(html_from_rem) @@ -21,12 +25,12 @@ ifneq ($(strip $(html_from_rem)),) rm -f $(html_from_rem) endif -dest_dir_rem: - $(INSTALL) -d -m 0755 $(dest_dir) -install_html_from_rem: dest_dir_rem $(html_from_rem) +install_html_from_rem: $(html_from_rem_dest_targets) + +$(html_from_rem_dest_targets): $(dest_dir_rem)/% : % | $(dest_dir_rem) ifneq ($(strip $(html_from_rem)),) - $(INSTALL) -m 0644 $(html_from_rem) $(dest_dir)/ + $(INSTALL) -m 0644 '$<' '$@' endif -- cgit v1.2.3