diff options
author | Werner Lemberg <wl@gnu.org> | 2021-02-16 17:04:51 +0100 |
---|---|---|
committer | Werner Lemberg <wl@gnu.org> | 2021-02-16 17:04:51 +0100 |
commit | c3a0b43ec62fcee6914c84911e87e043e199a500 (patch) | |
tree | 85fc5bfe98e9e72ba7d6f646db95d331dbe470bd /builds | |
parent | dfa7cca5f3b4f494aae785891ab4a42e66db77ef (diff) | |
download | freetype2-c3a0b43ec62fcee6914c84911e87e043e199a500.tar.gz |
* builds/toplevel.mk: Use rules for handling 'dlg'.
Suggested by Alexei.
(check_out_submodule, copy_submodule): New targets.
<top-level>: Replace calls to `shell` with rules.
Diffstat (limited to 'builds')
-rw-r--r-- | builds/toplevel.mk | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/builds/toplevel.mk b/builds/toplevel.mk index e9cb62d35..d9de4145a 100644 --- a/builds/toplevel.mk +++ b/builds/toplevel.mk @@ -103,6 +103,22 @@ ifneq ($(findstring setup,$(MAKECMDGOALS)),) check_platform := 1 endif + +.PHONY: check_out_submodule copy_out_submodule + +check_out_submodule: + $(info Checking out submodule in `subprojects/dlg') + git submodule init + git submodule update + +copy_submodule: + $(info Copying files from `subprojects/dlg' to `src/dlg' and `include/dlg') + mkdir $(subst /,$(SEP),include/dlg) $(NO_OUTPUT) + $(COPY) $(subst /,$(SEP),subprojects/dlg/include/dlg/output.h include/dlg) + $(COPY) $(subst /,$(SEP),subprojects/dlg/include/dlg/dlg.h include/dlg) + $(COPY) $(subst /,$(SEP),subprojects/dlg/src/dlg/dlg.c src/dlg) + + # Include the automatic host platform detection rules when we need to # check the platform. # @@ -117,19 +133,10 @@ ifdef check_platform # ifeq ($(wildcard src/dlg/dlg.*),) ifeq ($(wildcard subprojects/dlg/*),) - $(info Checking out submodule in `subprojects/dlg') - dummy := $(shell git submodule init) - dummy := $(shell git submodule update) + copy_submodule: check_out_submodule endif - $(info Copying files from `subprojects/dlg' to `src/dlg' and `include/dlg') - dummy := $(shell mkdir $(subst /,$(SEP),include/dlg) $(NO_OUTPUT)) - dummy := $(shell $(COPY) \ - $(subst /,$(SEP),subprojects/dlg/include/dlg/output.h include/dlg)) - dummy := $(shell $(COPY) \ - $(subst /,$(SEP),subprojects/dlg/include/dlg/dlg.h include/dlg)) - dummy := $(shell $(COPY) \ - $(subst /,$(SEP),subprojects/dlg/src/dlg/dlg.c src/dlg)) + setup: copy_submodule endif # This rule makes sense for Unix only to remove files created by a run of |