diff options
| author | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2020-12-30 23:46:44 +0100 |
|---|---|---|
| committer | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2020-12-30 23:46:44 +0100 |
| commit | 03629bb44b541ba63b61c6f03bf3b6a7d34e64ef (patch) | |
| tree | 94694cf94dac71e99442cab18889a2b3519da675 | |
| parent | 697963c5e4f56f871d4364043af450af6b6a2f9d (diff) | |
| download | quatuorbellefeuille.com-03629bb44b541ba63b61c6f03bf3b6a7d34e64ef.tar.xz | |
Allow changing the build directory
| -rw-r--r-- | Makefile | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -1,11 +1,13 @@ +OUTDIR = public + pages_src = $(filter-out template.html,$(wildcard *.html)) -pages = $(foreach p,$(pages_src),public/$(p)) +pages = $(foreach p,$(pages_src),$(OUTDIR)/$(p)) sheets = $(wildcard *.css) images = $(wildcard *.svg) feeds = $(wildcard *.xml) resources_src = $(sheets) $(images) $(feeds) -resources = $(foreach f,$(resources_src),public/$(f)) +resources = $(foreach f,$(resources_src),$(OUTDIR)/$(f)) .PHONY: all clean site @@ -14,15 +16,15 @@ all: site site: $(pages) $(resources) -public: +$(OUTDIR): mkdir $@ -$(resources): public/%: % | public +$(resources): $(OUTDIR)/%: % | $(OUTDIR) cp $< $@ # TODO: optional dependency to .sh template parameters. -$(pages): public/%.html: %.html | public +$(pages): $(OUTDIR)/%.html: %.html | $(OUTDIR) ./build.sh $< $@ clean: - -rm -r public + -rm -r $(OUTDIR) |
