summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Schafft <lion@lion.leolix.org>2017-05-07 17:20:57 +0000
committerPhilipp Schafft <lion@lion.leolix.org>2017-05-07 17:20:57 +0000
commitafcb0dce4b853b7a4c1676b563199448144fbca8 (patch)
tree0146babaae8d1389e8e34e6bfa091b733991f729
parent22e22e909ce51f676d441f6c73befe7b0dccfb36 (diff)
Update: Make Makefile work again for non-DESTDIR, DESTDIR still doesn't work correctly
-rwxr-xr-xwebgen12
1 files changed, 4 insertions, 8 deletions
diff --git a/webgen b/webgen
index 1f58e48..e1c6b59 100755
--- a/webgen
+++ b/webgen
@@ -123,23 +123,18 @@ TEMPLATES=$(shell $(WEBGEN) --list)
TARGETS = $(patsubst =%,%,$(filter =%,$(TEMPLATES))) $(foreach tpl,$(filter-out =%,$(TEMPLATES)),$(foreach lang,$(LANGUAGES),$(if $(findstring default,$(lang)),$(patsubst +%,%,$(tpl:~%=%)).html,$(if $(wildcard tpl/\#translate$(tpl).$(lang)),$(patsubst +%,%,$(tpl:~%=%)).$(lang).html))))
# Common phony targets:
-all: prep-dirs $(TARGETS)
+all: $(TARGETS)
clean:
rm -f $(TARGETS)
new: clean all
distclean: clean
-prep-dirs:
-ifdef DESTDIR
- mkdir -vp "$(DESTDIR)"
-endif
-
# Declare them as phony:
-.PHONY: all clean new distclean prep-dirs
+.PHONY: all clean new distclean
# Actual rule to run webgen and calculation of all prerequisites:
.SECONDEXPANSION:
-$(TARGETS): prep-dirs $$(shell $(WEBGEN) --list-dependencies $$@)
+$(TARGETS): $$(shell $(WEBGEN) --list-dependencies $$@)
$(WEBGEN) $@
#ll
@@ -243,6 +238,7 @@ do
shift
;;
'--destdir')
+ mkdir -p "$2"
pushd "$2" > /dev/null
OUT=`pwd`
popd > /dev/null