-
Notifications
You must be signed in to change notification settings - Fork 1
/
makefile.ext
31 lines (25 loc) · 940 Bytes
/
makefile.ext
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
# -*- makefile -*-
# yaal makefile is now yaamake
# https://github.com/raphendyr/yaamake
# This file is here mainly for backward compatibility
# You should replace include statement from project Makefile with this
# YAAL := path/to/yaal
# include $(shell yaamake --include-path)
# # or
# include vendor/yaamake/makefile.ext
# Get yaal path from directory this file was included from
YAAL := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST))))
# Try using program
ifeq ($(YAAMAKE),)
YAAMAKE := $(dir $(shell yaamake --include-path 2>/dev/null))
endif
# Try using yaal, but change last part
ifeq ($(YAAMAKE),)
YAAMAKE := $(if $(findstring $(YAAL),$(patsubst %yaal,%yaamake,$(YAAL))),,$(patsubst %yaal,%yaamake,$(YAAL)))
endif
# Fail if not found
ifeq ($(YAAMAKE),)
$(error Could not find yaamake. Please specify YAAMAKE as path to folder containing yaamake in Makefile)
endif
# include if found
include $(YAAMAKE)/makefile.ext