-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile.ck.in
48 lines (44 loc) · 1.18 KB
/
Makefile.ck.in
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
43
44
45
46
47
#
# Tools-check sub-Makefile
#
# Copyright (C) 2020-2024 Gabriele Galeotti
#
# This work is licensed under the terms of the MIT License.
# Please consult the LICENSE.txt file located in the top-level directory.
#
#
# Environment variables:
# OSTYPE
# ECHO
# PATH
# SED
# GCC_WRAPPER
# GNAT_WRAPPER
#
ifeq ($(OSTYPE),cmd)
ifeq ($(shell SET "PATH=$(PATH)" && $(SED) --version 2>nul),)
$(error Error: no $(SED) executable found)
endif
ifeq ($(shell SET "PATH=$(PATH)" && $(GCC_WRAPPER) -v 2>nul),)
$(error Error: no $(GCC_WRAPPER) executable found)
endif
ifeq ($(shell SET "PATH=$(PATH)" && $(GNAT_WRAPPER) -v 2>nul),)
$(error Error: no $(GNAT_WRAPPER) executable found)
endif
else
ifeq ($(OSTYPE),darwin)
ifneq ($(shell PATH="$(PATH)" $(ECHO) "version" | $(SED) 2> /dev/null),version)
$(error Error: no $(SED) executable found)
endif
else
ifeq ($(shell PATH="$(PATH)" $(SED) --version 2> /dev/null),)
$(error Error: no $(SED) executable found)
endif
endif
ifeq ($(shell PATH="$(PATH)" $(GCC_WRAPPER) -v 2> /dev/null),)
$(error Error: no $(GCC_WRAPPER) executable found)
endif
ifeq ($(shell PATH="$(PATH)" $(GNAT_WRAPPER) -v 2> /dev/null),)
$(error Error: no $(GNAT_WRAPPER) executable found)
endif
endif