X-Git-Url: https://git.ladys.computer/WWW/blobdiff_plain/73fc43cc0e92049ffbe1c57fa31e87314c0b914d..HEAD:/GNUmakefile diff --git a/GNUmakefile b/GNUmakefile index 275f6ca..8486bff 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -6,31 +6,48 @@ SHELL = /bin/sh # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. -SHUSHE := .shushe -SHUSHE_OPTIONS := INCLUDEDIR='sources/INCLUDE' TRANSFORMS='$(wildcard transforms/*.xslt) $(wildcard $(SHUSHE)/transforms/*.xslt)' +SRCDIR := sources +BUILDDIR := build +BUILDTARGET := .grass +DESTDIR := public -YSEME := .yseme -YSEME_OPTIONS := DESTDIR=public SERVERPATH=lady/www +SHUSHE := .β›©πŸ“° +SHUSHEOPTS := SRCDIR='$(SRCDIR)' INCLUDEDIR='$(SRCDIR)/{include}' EXTRAPARSERS='$(wildcard parsers/*.xslt)' EXTRATRANSFORMS='$(wildcard transforms/*.xslt)' -build: $(SHUSHE)/GNUmakefile - rm -rf ./public - @$(MAKE) -f $< install $(SHUSHE_OPTIONS) - touch .grass +YSEME := .πŸ‘₯πŸ“€ +YSEMEOPTS := BUILDTARGET='.grass' DESTDIR='$(DESTDIR)' SERVERPATH='lady/www' -list: $(SHUSHE)/GNUmakefile - @$(MAKE) -f $< $@ $(SHUSHE_OPTIONS) +# ━ Β§ Call out to β›©πŸ“° δΉ¦η€Ύ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ -$(SHUSHE)/GNUmakefile $(YSEME)/GNUmakefile: %/GNUmakefile: - git submodule update --init $* +build : $(SHUSHE)/GNUmakefile prebuild + @for publicfile in $(patsubst %,"%",$(wildcard $(DESTDIR)/*)); do if git check-ignore -q "$$publicfile"; then rm -rf "$$publicfile"; fi; done + @$(MAKE) -f '$<' install $(SHUSHEOPTS) + @touch '$(BUILDTARGET)' -GNUmakefile: $(SHUSHE)/GNUmakefile $(YSEME)/GNUmakefile - touch GNUmakefile +prebuild : $(SHUSHE)/GNUmakefile + @$(MAKE) -f '$<' $(SHUSHEOPTS) -ifneq ($(wildcard $(YSEME)/GNUmakefile),) -YSEME_TARGETS := $(shell sed '/^\.PHONY[ :]/!d;/^\.PHONY[ :]/s/ *;.*//;/^\.PHONY[ :]/s/\.PHONY.*: *//' < $(YSEME)/GNUmakefile) +list : $(SHUSHE)/GNUmakefile + @$(MAKE) -f '$<' $@ $(SHUSHEOPTS) -$(YSEME_TARGETS): $(YSEME)/GNUmakefile - @$(MAKE) -f $< $@ $(YSEME_OPTIONS) -endif +$(BUILDDIR)/% $(DESTDIR)/% : $(SHUSHE)/GNUmakefile + @$(MAKE) -f '$<' $@ $(SHUSHEOPTS) -.PHONY: build list $(YSEME_TARGETS); +# ━ Β§ Call out to πŸ‘₯πŸ“€ Yseme ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + +dry-sync sync : $(YSEME)/GNUmakefile + $(MAKE) -f '$<' $@ $(YSEMEOPTS) + +# ━ Β§ Special targets ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + +gone : + @for publicfile in $(patsubst %,"%",$(wildcard $(DESTDIR)/*)); do if git check-ignore -q "$$publicfile"; then rm -rf "$$publicfile"; fi; done + +FORCE : ; + +.PHONY : FORCE build dry-sync gone list prebuild sync ; + +# ━ Β§ MakeΒ·file targets ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + +$(SHUSHE)/GNUmakefile $(YSEME)/GNUmakefile : %/GNUmakefile : FORCE + git submodule update --init '$*'