-
Notifications
You must be signed in to change notification settings - Fork 6
/
recurse.mk
43 lines (40 loc) · 2.11 KB
/
recurse.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#
# This makefile include defines the standard target macros for recursion into
# subdirectories.
#
all: $(DIRS)
@set BLDERRFILE=$(PROJECT_SOURCE_ROOT)\release\_BLDERRORS
@if exist %BLDERRFILE% del /q %BLDERRFILE% >NUL
@for %a in ($**) do @( \
$(BUILD_MSG) [BUILD] Entering directory %a [$@] & \
pushd %a & \
$(MAKE) /NOLOGO $@ & \
call $(PROJECT_SOURCE_ROOT)\chkerr.cmd %a %ERRORLEVEL% & \
$(BUILD_MSG) [BUILD] Leaving directory %a [$@] & \
popd \
)
@if exist %BLDERRFILE% ( \
$(BUILD_MSG) [BUILD] Build failed due to build errors. & \
$(BUILD_MSG) [BUILD] Failing projects were: & \
$(BUILD_MSGFILE) %BLDERRFILE% & \
del /q %BLDERRFILE% >NUL & \
exit 1 \
)
clean: $(DIRS)
@set BLDERRFILE=$(PROJECT_SOURCE_ROOT)\release\_BLDERRORS
@if exist %BLDERRFILE% del /q %BLDERRFILE% >NUL
@for %a in ($**) do @( \
$(BUILD_MSG) [BUILD] Entering directory %a [$@] & \
pushd %a & \
$(MAKE) /NOLOGO $@ & \
call $(PROJECT_SOURCE_ROOT)\chkerr.cmd %a %ERRORLEVEL% & \
$(BUILD_MSG) [BUILD] Leaving directory %a [$@] & \
popd \
)
@if exist %BLDERRFILE% ( \
$(BUILD_MSG) [BUILD] Build failed due to build errors. & \
$(BUILD_MSG) [BUILD] Failing projects were: & \
$(BUILD_MSGFILE) %BLDERRFILE% & \
del /q %BLDERRFILE% >NUL & \
exit 1 \
)