slweb

Једноставни генератор статичких веб страна
git clone https://git.sr.ht/~strahinja/slweb
Дневник | Датотеке | Референце | ПРОЧИТАЈМЕ | ЛИЦЕНЦА

чување 44bdcb1947b7c7a787abbc701ca0124c3ad8bbf4
родитељ 057f7edc721322c4bb2e13020f0ea52643d25b8a
Аутор: Страхиња Радић <contact@strahinja.org>
Датум:   Sun,  7 Apr 2024 01:19:17 +0200

Merge examples/{,includes/}Makefile into Makefile; correct
examples/includes/inc/footer.slw

Signed-off-by: Страхиња Радић <contact@strahinja.org>

Diffstat:
MMakefile | 21+++++++++++++++------
Dexamples/Makefile | 27---------------------------
Dexamples/includes/Makefile | 27---------------------------
Mexamples/includes/inc/footer.slw | 2+-
измењених датотека: 4, додавања: 16(+), брисања: 61(-)

diff --git a/Makefile b/Makefile @@ -2,7 +2,7 @@ include config.mk -.SUFFIXES: .1.in .1 .h.in .h .c .o +.SUFFIXES: .1.in .1 .h.in .h .c .o .slw .html .1.in.1: sh lib/replacepat $< $@ @@ -10,11 +10,15 @@ include config.mk .h.in.h: sh lib/replacepat $< $@ +.slw.html: + ./slweb -d $(<D) $< > $@ + all: makedate makeversion $(PROG) $(MANPAGE) examples if [ -f .rebuild ]; then rm .rebuild; make -e all; else true; fi -examples: - cd examples && make -e all +examples: $(HTMLS) examples/includes/index.html + +examples/includes/index.html: $(SLW_includes) date: sh lib/makedate @@ -40,22 +44,27 @@ $(PROG): $(OBJS) $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) clean: - cd examples && make -e clean && cd - + find examples -name '*.html' -exec rm {} \; rm -f version date version.h *.o *.xz *~ $(PROG) $(MANPAGE) install: all - cd examples && make -e install && cd - umask 022 + find examples -type f \( -name '*.slw' -o -name '*.html' \ + -o -name '*.css' \) -exec sh -c 'umask 022; \ + printf "%s\n" {} | sed 's,examples/,,' | \ + xargs printf "%s/%s\n" "$(EXDIR)" | \ + xargs $(INSTALL) -Dm 0644 {}' shell \; $(INSTALL) -Dm 0644 $(MANPAGE) $(MANPREFIX)/man1/$(MANPAGE) $(INSTALL) -Dm 0644 README $(DOCDIR)/README $(INSTALL) -Dm 0644 LICENSE $(DOCDIR)/LICENSE $(INSTALL) -Dm 0755 $(PROG) $(BINDIR)/$(PROG) uninstall: - cd examples && make -e uninstall && cd - rm -f $(MANPREFIX)/man1/$(MANPAGE) rmdir $(MANPREFIX)/man1 2>/dev/null || true rmdir $(MANPREFIX) 2>/dev/null || true + find $(EXDIR) -type f -exec rm {} \; || true + find $(EXDIR) -depth -type d -exec rmdir {} \; || true rm -f $(DOCDIR)/README rm -f $(DOCDIR)/LICENSE rmdir $(DOCDIR) 2>/dev/null || true diff --git a/examples/Makefile b/examples/Makefile @@ -1,27 +0,0 @@ -.POSIX: - -include ../config.mk - -.SUFFIXES: .html .slw - -.slw.html: - ../slweb -d $(<D) $< > $@ - -all: $(HTMLS) - cd includes && make -e all - -clean: - cd includes && make -e clean && cd - - find . -name '*.html' -exec rm {} \; - rm -f *~ - -install: all - find . -type f \( -name '*.slw' -o -name '*.html' -o -name '*.css' \) \ - -exec sh -c 'umask 022; \ - $(INSTALL) -Dm 0644 {} $(EXDIR)/{}' shell \; - -uninstall: - find $(EXDIR) -type f -exec rm {} \; || true - find $(EXDIR) -depth -type d -exec rmdir {} \; || true - -.PHONY: all clean install uninstall diff --git a/examples/includes/Makefile b/examples/includes/Makefile @@ -1,27 +0,0 @@ -.POSIX: - -include ../../config.mk - -.SUFFIXES: .html .slw - -.slw.html: - ../../slweb -d $(<D) $< > $@ - -all: index.html - -index.html: index.slw bugs.slw description.slw examples.slw inc/copy.slw \ - inc/footer.slw inc/header.slw index.slw options.slw reference.slw \ - seealso.slw - -clean: - find . -name '*.html' -exec rm {} \; - rm -f *~ - -install: all - $(INSTALL) -Dm 0644 index.html $(EXDIR)/examples/includes/index.html - -uninstall: - rm -f $(EXDIR)/includes/index.html - rmdir $(EXDIR) 2>/dev/null || true - -.PHONY: all clean install uninstall diff --git a/examples/includes/inc/footer.slw b/examples/includes/inc/footer.slw @@ -3,7 +3,7 @@ slweb v0.2.2-beta {/.left} {.center} -{include "copy"} +{include "inc/copy"} 23 Nov 2020 {/.center} {.right}