Skip to content
Merged
Show file tree
Hide file tree
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
51 changes: 7 additions & 44 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ all: subtitleoctopus

subtitleoctopus: dist

include functions.mk

# Fribidi
build/lib/fribidi/configure: lib/fribidi $(wildcard $(BASE_DIR)build/patches/fribidi/*.patch)
rm -rf build/lib/fribidi
Expand Down Expand Up @@ -368,49 +370,10 @@ git-checkout:
git submodule sync --recursive && \
git submodule update --init --recursive

SUBMODULES := brotli expat fontconfig freetype fribidi harfbuzz libass
git-smreset: $(addprefix git-, $(SUBMODULES))

$(foreach subm, $(SUBMODULES), $(eval $(call TR_GIT_SM_RESET,$(subm))))

server: # Node http server npm i -g http-server
http-server

git-update: git-freetype git-fribidi git-fontconfig git-expat git-harfbuzz git-libass git-brotli

git-brotli:
cd lib/brotli && \
git reset --hard && \
git clean -dfx && \
git pull origin master

git-freetype:
cd lib/freetype && \
git reset --hard && \
git clean -dfx && \
git pull origin master

git-fribidi:
cd lib/fribidi && \
git reset --hard && \
git clean -dfx && \
git pull origin master

git-fontconfig:
cd lib/fontconfig && \
git reset --hard && \
git clean -dfx && \
git pull origin master

git-expat:
cd lib/expat && \
git reset --hard && \
git clean -dfx && \
git pull origin master

git-harfbuzz:
cd lib/harfbuzz && \
git reset --hard && \
git clean -dfx && \
git pull origin master

git-libass:
cd lib/libass && \
git reset --hard && \
git clean -dfx && \
git pull origin master
20 changes: 20 additions & 0 deletions functions.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# For inclusion in toplevel Makefile
# Defines some useful macros and variables for building etc
# If arguments are expected (macro) it needs to be invoked with $(call ...),
# if no arguments are supported the definition is aregular avariable and can be used as such.
# Special macros of the name TR_... create targets (and always take arguments)
# and thus also need to be $(eval ...)'ed


## Clean and git related

# @arg1: submodule name
define TR_GIT_SM_RESET
git-$(1):
cd lib/$(1) && \
git reset --hard && \
git clean -dfx
git submodule update --force lib/$(1)

.PHONY: git-$(1)
endef