Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makefile: Remove the separate "build" target #357

Merged
merged 1 commit into from
Nov 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@ DESTDIR =
# Nonzero value disables external assets for offline browsing.
OFFLINE = 0

all: prereq validate build documents.js
ifeq ($(OFFLINE),0)
JS_BUILD = documents.js
else
JS_BUILD =
endif

all: prereq $(HTMLS) $(IMAGES) $(JS_BUILD)

prereq:
@type rsvg-convert >/dev/null 2>&1 || \
Expand All @@ -27,15 +33,10 @@ prereq:
@type xsltproc >/dev/null 2>&1 || \
{ echo "dev-libs/libxslt is with python required" >&2;\
exit 1; }
@type xmllint >/dev/null 2>&1 || \
{ echo "dev-libs/libxml2 is required" >&2;\
exit 1; }
@fc-list -q "Open Sans" || \
{ echo "media-fonts/open-sans is required" >&2;\
exit 1; }

build: $(HTMLS) $(IMAGES)

# We need to parse all the XMLs every time, not just the ones
# that are newer than the target. This is because each search
# document in devmanual gets a unique ID, which is used to
Expand Down Expand Up @@ -78,7 +79,7 @@ appendices/todo-list/index.html: $(XMLS)
.depend: $(XMLS) eclass-reference/text.xml depend.xsl devbook.xsl
@xsltproc depend.xsl $(XMLS) > $@

install: build documents.js
install: all
set -e; \
for file in $(HTMLS) $(ECLASS_HTMLS) $(IMAGES); do \
install -d "$(DESTDIR)$(htmldir)"/$${file%/*}; \
Expand Down Expand Up @@ -133,6 +134,6 @@ distclean: clean
@rm -f .depend
@rm -rf eclass-reference

.PHONY: all prereq build install check validate tidy dist clean distclean
.PHONY: all prereq install check validate tidy dist clean distclean

-include .depend