diff options
| author | Philipp Schafft <lion@lion.leolix.org> | 2017-05-07 17:20:57 +0000 |
|---|---|---|
| committer | Philipp Schafft <lion@lion.leolix.org> | 2017-05-07 17:20:57 +0000 |
| commit | afcb0dce4b853b7a4c1676b563199448144fbca8 (patch) | |
| tree | 0146babaae8d1389e8e34e6bfa091b733991f729 /webgen | |
| parent | 22e22e909ce51f676d441f6c73befe7b0dccfb36 (diff) | |
Update: Make Makefile work again for non-DESTDIR, DESTDIR still doesn't work correctly
Diffstat (limited to 'webgen')
| -rwxr-xr-x | webgen | 12 |
1 files changed, 4 insertions, 8 deletions
@@ -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 |
