File tree Expand file tree Collapse file tree 2 files changed +25
-43
lines changed Expand file tree Collapse file tree 2 files changed +25
-43
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ all: subtitleoctopus
1212
1313subtitleoctopus : dist
1414
15+ include functions.mk
16+
1517# Fribidi
1618build/lib/fribidi/configure : lib/fribidi $(wildcard $(BASE_DIR ) build/patches/fribidi/* .patch)
1719 rm -rf build/lib/fribidi
@@ -361,46 +363,8 @@ git-checkout:
361363server : # Node http server npm i -g http-server
362364 http-server
363365
364- git-update : git-freetype git-fribidi git-fontconfig git-expat git-harfbuzz git-libass git-brotli
365-
366- git-brotli :
367- cd lib/brotli && \
368- git reset --hard && \
369- git clean -dfx && \
370- git pull origin master
371-
372- git-freetype :
373- cd lib/freetype && \
374- git reset --hard && \
375- git clean -dfx && \
376- git pull origin master
377-
378- git-fribidi :
379- cd lib/fribidi && \
380- git reset --hard && \
381- git clean -dfx && \
382- git pull origin master
383-
384- git-fontconfig :
385- cd lib/fontconfig && \
386- git reset --hard && \
387- git clean -dfx && \
388- git pull origin master
389-
390- git-expat :
391- cd lib/expat && \
392- git reset --hard && \
393- git clean -dfx && \
394- git pull origin master
395-
396- git-harfbuzz :
397- cd lib/harfbuzz && \
398- git reset --hard && \
399- git clean -dfx && \
400- git pull origin master
401-
402- git-libass :
403- cd lib/libass && \
404- git reset --hard && \
405- git clean -dfx && \
406- git pull origin master
366+
367+ SUBMODULES := brotli expat fontconfig freetype fribidi harfbuzz libass
368+ git-update : $(addprefix git-, $(SUBMODULES ) )
369+
370+ $(foreach subm, $(SUBMODULES), $(eval $(call TR_GIT_SM_UPDATE,$(subm))))
Original file line number Diff line number Diff line change 1+ # For inclusion in toplevel Makefile
2+ # Defines some useful macros and variables for building etc
3+ # If arguments are expected (macro) it needs to be invoked with $(call ...),
4+ # if no arguments are supported the definition is aregular avariable and can be used as such.
5+ # Special macros of the name TR_... create targets (and always take arguments)
6+ # and thus also need to be $(eval ...)'ed
7+
8+
9+ # # Clean and git related
10+
11+ # @arg1: submodule name
12+ define TR_GIT_SM_UPDATE
13+ git-$(1 ) :
14+ cd lib/$(1 ) && \
15+ git reset --hard && \
16+ git clean -dfx && \
17+ git pull origin master
18+ endef
You can’t perform that action at this time.
0 commit comments