mirror of
https://git.sr.ht/~nabijaczleweli/tzpfms
synced 2025-04-17 09:42:19 +03:00
-MD. bookworm manpages.d.o link
This commit is contained in:
parent
8e02233ad5
commit
e78ba80bc9
17
Makefile
17
Makefile
@ -25,7 +25,7 @@ PKGCONF_CFLAGS := $(shell pkg-config --cflags $(PKGS))
|
||||
LDFLAGS += -Wl,--as-needed
|
||||
LDLIBS += -lrt -ltspi -lcrypto $(PKGCONF_LIBS)
|
||||
CXXFLAGS += -g -O3 -std=c++17 -fno-exceptions -fno-rtti -Wall -Wextra -pipe -fPIC $(PKGCONF_CFLAGS)
|
||||
CPPFLAGS += -DTZPFMS_VERSION='$(TZPFMS_VERSION)'
|
||||
CPPFLAGS += -MD -DTZPFMS_VERSION='$(TZPFMS_VERSION)'
|
||||
BINARY_SOURCES := $(sort $(wildcard src/bin/*.cpp src/bin/**/*.cpp))
|
||||
COMMON_SOURCES := $(filter-out $(BINARY_SOURCES),$(sort $(wildcard src/*.cpp src/**/*.cpp src/**/**/*.cpp src/**/**/**/*.cpp)))
|
||||
MANPAGE_HEADERS := $(sort $(wildcard man/*.h))
|
||||
@ -46,10 +46,6 @@ endif
|
||||
ifneq "$(findstring clang,$(shell $(CXX) --version))" ""
|
||||
# GCC doesn't have this granularity
|
||||
CXXFLAGS += -flto=full -pedantic -Wno-gnu-statement-expression -Wno-gnu-include-next -Wno-gnu-conditional-omitted-operand -Wno-c++20-designator
|
||||
ifeq "$(AR)" "ar"
|
||||
# Need this because -flto=full produces objects FSF ranlib (ar s) can't index
|
||||
override AR := llvm-ar
|
||||
endif
|
||||
else
|
||||
CXXFLAGS += -flto
|
||||
endif
|
||||
@ -57,7 +53,6 @@ endif
|
||||
|
||||
|
||||
.PHONY : all clean build shellcheck i-t dracut init.d-systemd manpages htmlpages
|
||||
.SECONDARY:
|
||||
|
||||
|
||||
all : build manpages htmlpages shellcheck i-t init.d-systemd dracut
|
||||
@ -104,7 +99,7 @@ $(OUTDIR)man/% : man/%.pp $(MANPAGE_HEADERS)
|
||||
|
||||
$(OUTDIR)man/%.html : $(OUTDIR)man/%
|
||||
@mkdir -p $(dir $@)
|
||||
( cd $(OUTDIR)man/ && $(MANDOC) -Thtml -Ostyle="style.css",man="%N.%S.html;https://manpages.debian.org/bullseye/%N.%S" ) < $< | \
|
||||
( cd $(OUTDIR)man/ && $(MANDOC) -Thtml -Ostyle="style.css",man="%N.%S.html;https://manpages.debian.org/bookworm/%N.%S" ) < $< | \
|
||||
$(AWK) '/^<h1/ {in_syn = $$0 ~ /id="SYNOPSIS"/} /^<br/ {if(in_syn) next} {print}' | \
|
||||
$(SED) -Ee 's/ title=".."//g' -e 's/<a class="permalink" href="#([^"]*)"><span class="No" id="([^"]*)">/<a><span class="No">/g' -e 's#manpages.debian.org/[^/]*/ESYS_CONTEXT.3#mankier.com/3/ESYS_CONTEXT#g' > $@
|
||||
|
||||
@ -112,11 +107,8 @@ $(OUTDIR)man/style.css : man/style.css
|
||||
@mkdir -p $(dir $@)
|
||||
cp $^ $@
|
||||
|
||||
$(BLDDIR)libtzpfms.a : $(subst src/,$(BLDDIR)obj/,$(subst .cpp,.o,$(COMMON_SOURCES)))
|
||||
$(AR) crs $@ $^
|
||||
|
||||
|
||||
$(OUTDIR)% : $(BLDDIR)obj/bin/%.o $(BLDDIR)libtzpfms.a
|
||||
$(OUTDIR)% : $(BLDDIR)obj/bin/%.o $(subst src/,$(BLDDIR)obj/,$(subst .cpp,.o,$(COMMON_SOURCES)))
|
||||
@mkdir -p $(dir $@)
|
||||
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
|
||||
|
||||
@ -128,3 +120,6 @@ $(OUTDIR)dracut/usr/lib/dracut/modules.d/91tzpfms/% : initrd/dracut/% $(INITRD_H
|
||||
@mkdir -p $(dir $@)
|
||||
$(AWK) -f pp.awk $< > $@
|
||||
chmod --reference $< $@
|
||||
|
||||
|
||||
include $(wildcard $(BLDDIR)*/*.d $(BLDDIR)*/*/*.d)
|
||||
|
Loading…
x
Reference in New Issue
Block a user