stacinhtml

Static C in HTML - simple static site generator
git clone git://git.kocotian.pl/stacinhtml.git
Log | Files | Refs | README | LICENSE

commit 11cab944d99945442162107084835c74dbb20176
parent ffc1c41afe4395e49137dc1904064dbceb1f2c33
Author: kocotian <kocotian@kocotian.pl>
Date:   Mon, 12 Apr 2021 10:01:02 +0200

Fixed too much substitution

Diffstat:
MMakefile | 12++++++------
Mconfig.mk | 2+-
2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/Makefile b/Makefile @@ -60,12 +60,12 @@ ${OBJLIB}: ${SRCLIB} INDIRS = $(sort $(shell find $(INDIR) -type d)) IN = $(sort $(shell find $(INDIR) -type f -name '*.stac')) -METADIRS = $(subst $(INDIR),$(METADIR),$(INDIRS)) -META = $(subst $(INDIR),$(METADIR),$(IN:.stac=.c)) +METADIRS = $(patsubst $(INDIR)%,$(METADIR)%,$(INDIRS)) +META = $(patsubst $(INDIR)%,$(METADIR)%,$(IN:.stac=.c)) BIN = $(META:.c=.bin) -OUTDIRS = $(subst $(METADIR),$(OUTDIR),$(METADIRS)) -OUT = $(subst $(METADIR),$(OUTDIR),$(BIN:.bin=.html)) +OUTDIRS = $(patsubst $(METADIR)%,$(OUTDIR)%,$(METADIRS)) +OUT = $(patsubst $(METADIR)%,$(OUTDIR)%,$(BIN:.bin=.html)) GENERATOR = ./compile @@ -84,13 +84,13 @@ ${METADIRS}: ${INDIRS} ${IN}: generator ${GENERATOR} ${METADIR}%.c: ${INDIR}%.stac - ${GENERATOR} -o $@ $(subst $(METADIR),$(INDIR),$(@:.c=.stac)) + ${GENERATOR} -o $@ $(patsubst $(METADIR)%,$(INDIR)%,$(@:.c=.stac)) ${METADIR}%.bin: ${METADIR}%.c ${CC} -o $@ -I. $(@:.bin=.c) ${OBJLIB} ${OUTDIR}%.html: ${METADIR}%.bin - ./$(subst $(OUTDIR),$(METADIR),$(@:.html=.bin)) > $@ + ./$(patsubst $(OUTDIR)%,$(METADIR)%,$(@:.html=.bin)) > $@ clean: rm -f ${OBJLIB} ${EXE} *.o diff --git a/config.mk b/config.mk @@ -1,7 +1,7 @@ # basics MAJORVERSION = 0 SUBVERSION = 2 -PATCHLEVEL = 0 +PATCHLEVEL = 1 BUILDNAME = vanilla VERSION = ${MAJORVERSION}.${SUBVERSION}.${PATCHLEVEL}-${BUILDNAME}