diff options
author | Christian Hesse <mail@eworm.de> | 2021-05-26 08:53:46 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2021-05-26 12:16:31 +0200 |
commit | 708563c1642ec3130997136bab66adae10682202 (patch) | |
tree | 1408fbe25bbf5f062b28530d350b222af51d380d /Makefile | |
parent | 6b288217b3bf2d4895aeb9be11f70c7bb56c4524 (diff) | |
download | pacredir-708563c1642ec3130997136bab66adae10682202.tar.gz pacredir-708563c1642ec3130997136bab66adae10682202.tar.zst |
Makefile: convert all markdown files to html
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 19 |
1 files changed, 11 insertions, 8 deletions
@@ -30,7 +30,10 @@ ID := $(shell shopt -u extglob && source /etc/os-release && echo $$ID) # a release tarball... VERSION := 0.4.3 -all: pacredir avahi/pacserve.service README.html +MARKDOWN = $(wildcard *.md) +HTML = $(MARKDOWN:.md=.html) + +all: pacredir avahi/pacserve.service $(HTML) pacredir: pacredir.c pacredir.h config.h version.h $(CC) pacredir.c $(CFLAGS) $(CFLAGS_EXTRA) $(LDFLAGS) -DREPRODUCIBLE=$(REPRODUCIBLE) -DARCH=\"$(ARCH)\" -DID=\"$(ID)\" -o pacredir @@ -44,8 +47,8 @@ version.h: $(wildcard .git/HEAD .git/index .git/refs/tags/*) Makefile avahi/pacserve.service: avahi/pacserve.service.in $(SED) 's/%ARCH%/$(ARCH)/;s/%ID%/$(ID)/' avahi/pacserve.service.in > avahi/pacserve.service -README.html: README.md - $(MD) README.md > README.html +%.html: %.md Makefile + markdown $< | sed 's/href="\([-[:alnum:]]*\)\.md"/href="\1.html"/g' > $@ install: install-bin install-doc @@ -63,15 +66,15 @@ install-bin: pacredir avahi/pacserve.service $(INSTALL) -D -m0644 dhcpcd/80-pacredir $(DESTDIR)$(PREFIX)/lib/dhcpcd/dhcpcd-hooks/80-pacredir $(INSTALL) -D -m0755 networkmanager/80-pacredir $(DESTDIR)$(PREFIX)/lib/NetworkManager/dispatcher.d/80-pacredir -install-doc: README.html - $(INSTALL) -D -m0644 README.md $(DESTDIR)$(PREFIX)/share/doc/pacredir/README.md - $(INSTALL) -D -m0644 README.html $(DESTDIR)$(PREFIX)/share/doc/pacredir/README.html +install-doc: $(HTML) + $(INSTALL) -d -m0755 $(DESTDIR)$(PREFIX)/share/doc/pacredir/ + $(INSTALL) -D -m0644 $(MARKDOWN) $(HTML) -t $(DESTDIR)$(PREFIX)/share/doc/pacredir/ clean: - $(RM) -f *.o *~ pacredir avahi/pacserve.service README.html version.h + $(RM) -f *.o *~ pacredir avahi/pacserve.service $(HTML) version.h distclean: - $(RM) -f *.o *~ pacredir avahi/pacserve.service README.html version.h config.h + $(RM) -f *.o *~ pacredir avahi/pacserve.service $(HTML) version.h config.h release: git archive --format=tar.xz --prefix=pacredir-$(VERSION)/ $(VERSION) > pacredir-$(VERSION).tar.xz |