... |
... |
@@ -103,6 +103,22 @@ ifneq ($(findstring setup,$(MAKECMDGOALS)),) |
103
|
103
|
check_platform := 1
|
104
|
104
|
endif
|
105
|
105
|
|
|
106
|
+
|
|
107
|
+.PHONY: check_out_submodule copy_out_submodule
|
|
108
|
+
|
|
109
|
+check_out_submodule:
|
|
110
|
+ $(info Checking out submodule in `subprojects/dlg')
|
|
111
|
+ git submodule init
|
|
112
|
+ git submodule update
|
|
113
|
+
|
|
114
|
+copy_submodule:
|
|
115
|
+ $(info Copying files from `subprojects/dlg' to `src/dlg' and `include/dlg')
|
|
116
|
+ mkdir $(subst /,$(SEP),include/dlg) $(NO_OUTPUT)
|
|
117
|
+ $(COPY) $(subst /,$(SEP),subprojects/dlg/include/dlg/output.h include/dlg)
|
|
118
|
+ $(COPY) $(subst /,$(SEP),subprojects/dlg/include/dlg/dlg.h include/dlg)
|
|
119
|
+ $(COPY) $(subst /,$(SEP),subprojects/dlg/src/dlg/dlg.c src/dlg)
|
|
120
|
+
|
|
121
|
+
|
106
|
122
|
# Include the automatic host platform detection rules when we need to
|
107
|
123
|
# check the platform.
|
108
|
124
|
#
|
... |
... |
@@ -117,19 +133,10 @@ ifdef check_platform |
117
|
133
|
#
|
118
|
134
|
ifeq ($(wildcard src/dlg/dlg.*),)
|
119
|
135
|
ifeq ($(wildcard subprojects/dlg/*),)
|
120
|
|
- $(info Checking out submodule in `subprojects/dlg')
|
121
|
|
- dummy := $(shell git submodule init)
|
122
|
|
- dummy := $(shell git submodule update)
|
|
136
|
+ copy_submodule: check_out_submodule
|
123
|
137
|
endif
|
124
|
138
|
|
125
|
|
- $(info Copying files from `subprojects/dlg' to `src/dlg' and `include/dlg')
|
126
|
|
- dummy := $(shell mkdir $(subst /,$(SEP),include/dlg) $(NO_OUTPUT))
|
127
|
|
- dummy := $(shell $(COPY) \
|
128
|
|
- $(subst /,$(SEP),subprojects/dlg/include/dlg/output.h include/dlg))
|
129
|
|
- dummy := $(shell $(COPY) \
|
130
|
|
- $(subst /,$(SEP),subprojects/dlg/include/dlg/dlg.h include/dlg))
|
131
|
|
- dummy := $(shell $(COPY) \
|
132
|
|
- $(subst /,$(SEP),subprojects/dlg/src/dlg/dlg.c src/dlg))
|
|
139
|
+ setup: copy_submodule
|
133
|
140
|
endif
|
134
|
141
|
|
135
|
142
|
# This rule makes sense for Unix only to remove files created by a run of
|