Skip to content

Commit

Permalink
chore(build): Remove example related build stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
alerque committed Sep 21, 2021
1 parent ac6b4d5 commit a5ec3fd
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 37 deletions.
1 change: 0 additions & 1 deletion .commitlintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ rules:
- debug
- docker
- deps
- examples
- fonts
- frames
- images
Expand Down
3 changes: 0 additions & 3 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,5 @@ lua-libraries/* linguist-vendored
m4/* linguist-vendored
node-pangocairo linguist-vendored

# Documentation not detected by Linguist
examples/* linguist-documentation

# Language overrides that Linguist doesn't know about
*.silejs linguist-language=Javascript
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Configure
run: |
./bootstrap.sh
./configure --with-manual --with-examples
./configure --with-manual
echo "VERSION=$(./build-aux/git-version-gen .tarball-version)" >> $GITHUB_ENV
echo "MAKEFLAGS=-j$(nproc) -Otarget" >> $GITHUB_ENV
- name: Make
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
- name: Configure
run: |
./bootstrap.sh
./configure --without-system-luarocks --with${{ startsWith(matrix.luaVersion[0], '5') && 'out' || '' }}-luajit --without-manual --without-examples
./configure --without-system-luarocks --with${{ startsWith(matrix.luaVersion[0], '5') && 'out' || '' }}-luajit --without-manual
- name: Make
run: |
make
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ tags
# Generated resources
Makefile-distfiles
documentation/*.pdf
examples/**/*.pdf
gource.webm
.fonts/*
.sources/*
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ if (WIN32)
GIT_REPOSITORY https://github.com/libexpat/libexpat
GIT_TAG R_2_2_6
SOURCE_SUBDIR expat
CMAKE_ARGS "-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>" -DBUILD_tools=OFF -DBUILD_examples=OFF -DBUILD_tests=OFF -DBUILD_shared=OFF -DBUILD_doc=OFF -DMSVC_USE_STATIC_CRT=OFF
CMAKE_ARGS "-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>" -DBUILD_tools=OFF -DBUILD_tests=OFF -DBUILD_shared=OFF -DBUILD_doc=OFF -DMSVC_USE_STATIC_CRT=OFF
INSTALL_DIR "${TMP_INSTALL_DIR}")

ExternalProject_Add(icu
GIT_REPOSITORY https://github.com/hunter-packages/icu
GIT_TAG v63.1-p5
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ WORKDIR /src
RUN build-aux/docker-bootstrap.sh

RUN ./bootstrap.sh
RUN ./configure --without-manual --without-examples
RUN ./configure --without-manual
RUN make
RUN make check
RUN make install DESTDIR=/pkgdir
Expand Down
26 changes: 7 additions & 19 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -32,29 +32,23 @@ include Makefile-fonts
include $(wildcard Makefile-distfiles)

MANUAL = documentation/sile.pdf
EXAMPLES = $(addsuffix .pdf,$(basename $(EXAMPLESSRCS)))

if MANUAL
_MANUAL = $(MANUAL)
endif

if EXAMPLES
_EXAMPLES = $(EXAMPLES)
endif

nobase_dist_pkgdata_DATA = $(SILEDATA) $(LUALIBRARIES)
nobase_nodist_pkgdata_DATA = $(LUAMODULES)
dist_man_MANS = sile.1
dist_doc_DATA = README.md CHANGELOG.md
dist_pdf_DATA = $(_MANUAL)
dist_license_DATA = LICENSE
nobase_dist_pdf_DATA = $(_EXAMPLES)
bin_SCRIPTS = sile
EXTRA_DIST = spec tests examples documentation sile-dev-1.rockspec fontconfig.conf
EXTRA_DIST = spec tests documentation sile-dev-1.rockspec fontconfig.conf
EXTRA_DIST += Makefile-distfiles
EXTRA_DIST += build-aux/action-updater.js build-aux/decore-automake.sh build-aux/git-version-gen build-aux/list-dist-files.sh
EXTRA_DIST += Dockerfile build-aux/docker-bootstrap.sh build-aux/docker-fontconfig.conf build-aux/docker-glibc-workaround.sh hooks/build
EXTRA_DIST += $(MANUAL) $(EXAMPLES)
EXTRA_DIST += $(MANUAL)

Makefile-distfiles: $(wildcard .version .tarball-version) | $(LUAMODLOCK)
build-aux/list-dist-files.sh > $@
Expand All @@ -67,7 +61,7 @@ BUILT_SOURCES = .version Makefile-distfiles
$(CMP) -s "$@" "$@-prev" || \
( autoreconf configure.ac --force && build-aux/decore-automake.sh )

dist-hook: $(MANUAL) $(EXAMPLES)
dist-hook: $(MANUAL)
cd $(distdir)
printf "$(VERSION)" > .tarball-version
$(SED) -i -e '/^LUAMODULES =/s/=.*/=/' Makefile-distfiles
Expand All @@ -87,7 +81,7 @@ tagrelease:
npm run release -- $(and $(RELTYPE),--release-as $(RELTYPE))

.PHONY: prerelease
prerelease: test examples docs update_libtexpdf
prerelease: test docs update_libtexpdf

.PHONY: release-preview
release-preview:
Expand Down Expand Up @@ -166,9 +160,6 @@ endif
.PHONY: docs
docs: $(MANUAL)

.PHONY: examples
examples: $(EXAMPLES)

# This is a monkey patch to figure out how many passes we have to to to
# garantee the TOC is up to date, simplify when #230 is fixed.
hastoc = [ -f $(subst .pdf,.toc,$@) ] && echo true || echo false
Expand All @@ -188,7 +179,6 @@ endef
_FORCED = $(and $(SILE_COVERAGE)$(CLEAN),force)
_TEST_DEPS = $(and $$(filter tests/%,$@),$(addprefix .fonts/,$(TESTFONTFILES)))
_DOCS_DEPS = $(and $$(filter documentation/%,$@),$(addprefix .fonts/,$(DOCSFONTFILES)))
_EXAM_DEPS = $(and $$(filter examples/%,$@),$(addprefix .fonts/,$(EXAMFONTFILES)))

# TODO: remove _BUILT_SUBDIRS hack and replace it with something sensible when
# these subdirs don't do crazy things like copying files outside of their own trees!
Expand All @@ -201,16 +191,14 @@ $(_SUBDIR_TELLS):
$(MAKE) $(AM_MAKEFLAGS) all-recursive
# $(error Running `make install`, `make dist`, or other end-game targets before `make all` unspported.)

patterndeps = $(_FORCED) $(_TEST_DEPS) $(_EXAM_DEPS) $(_DOCS_DEPS) | $(DEPDIRS) $(LUAMODLOCK) $(_BUILT_SUBDIRS)
patterndeps = $(_FORCED) $(_TEST_DEPS) $(_DOCS_DEPS) | $(DEPDIRS) $(LUAMODLOCK) $(_BUILT_SUBDIRS)

%.pdf: %.sil $$(patterndeps)
$(runsile)

%.pdf: %.xml $$(patterndeps)
$(runsile)

examples/docbook/article-template.pdf: SILEFLAGS += -I docbook.sil

.PHONY: coverage
coverage: export SILE_COVERAGE=1
coverage: regression_previews busted
Expand Down Expand Up @@ -333,7 +321,7 @@ tests/%.actual: tests/%.xml $$(patterndeps)
-$(if $(CLEAN),rm -f $@,:)
$(LOCALTESTFONTS) ./sile $(SILEFLAGS) -b debug $< -o $@

DEPFILES = $(addsuffix .d,$(addprefix $(DEPDIR)/,$(basename $(TESTSRCS) $(MANUAL) $(EXAMPLES))))
DEPFILES = $(addsuffix .d,$(addprefix $(DEPDIR)/,$(basename $(TESTSRCS) $(MANUAL))))
DEPDIRS = $(sort $(dir $(DEPFILES)))

$(DEPDIRS): | Makefile-distfiles
Expand Down Expand Up @@ -375,7 +363,7 @@ docker-build-push: docker

gource.webm:
mkdir -p /tmp/gravatars
convert examples/docbook/images/sile-logo.jpg -negate -resize 50% /tmp/sile-logo.jpg
magick documentation/sile-logo.pdf[0] -density 300 -colorspace RGB -negate -resize 50% /tmp/sile-logo.jpg
$(GIT) log --pretty=format:"%an—%ae" | \
sort -u | \
while IFS=— read name email; do \
Expand Down
4 changes: 0 additions & 4 deletions build-aux/list-dist-files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,3 @@ finder tests -maxdepth 1 -name '*.xml'

printf '\n%s' "TESTEXPECTS ?="
finder tests -maxdepth 1 -name '*.expected'

printf '\n%s' "EXAMPLESSRCS ="
finder examples -maxdepth 1 -name '*.sil'
finder examples/docbook -maxdepth 1 -name '*.xml'
4 changes: 0 additions & 4 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@ AC_ARG_WITH([manual],
AS_HELP_STRING([--with-manual], [Rebuild manual and install to system’s PDF documentation directory]))
AM_CONDITIONAL([MANUAL], [test "x$with_manual" = "xyes"])

AC_ARG_WITH([examples],
AS_HELP_STRING([--with-examples], [Rebuild examples and install to system’s PDF documentation directory]))
AM_CONDITIONAL([EXAMPLES], [test "x$with_examples" = "xyes"])

AM_COND_IF([SYSTEM_LIBTEXPDF],
[AC_CHECK_LIB([texpdf],[texpdf_doc_set_verbose],
[],
Expand Down

0 comments on commit a5ec3fd

Please sign in to comment.