Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
9a26e0a9
Unverified
Commit
9a26e0a9
authored
Jan 06, 2021
by
M.K
Committed by
GitHub
Jan 06, 2021
Browse files
Makefiles: Validate LUA selection or refer to the other Makefile. (#3269)
parent
9e08be7b
Changes
5
Hide whitespace changes
Inline
Side-by-side
app/Makefile
View file @
9a26e0a9
...
...
@@ -16,10 +16,15 @@ TARGET = eagle
FLAVOR
=
debug
# Handle Lua Directory selector
ifeq
("$(LUA)","53")
ifeq
("$(LUA)","")
LUA_DIR
:=
lua
else
ifeq
("$(LUA)","51")
LUA_DIR
:=
lua
else
ifeq
("$(LUA)","53")
LUA_DIR
:=
lua53
else
LUA_DIR
:=
lua
$(error
Unsupported
value
"$(LUA)"
for
variable
"LUA"
,
\
expected
"51"
,
"53"
or
unset/empty)
endif
ifndef
PDIR
# {
...
...
@@ -158,7 +163,7 @@ DDEFINES += \
# Required for each makefile to inherit from the parent
#
INCLUDES
:=
-I
$(PDIR)
libc
-I
$(PDIR)$(LUA_DIR)
-I
$(PDIR)
platform
\
$(INCLUDES)
-I
$(PDIR)
-I
$(PDIR)
include
$(INCLUDES)
-I
$(PDIR)
-I
$(PDIR)
include
PDIR
:=
../
$(PDIR)
sinclude
$(PDIR)Makefile
...
...
app/lua/Makefile
View file @
9a26e0a9
...
...
@@ -18,6 +18,20 @@ endif
STD_CFLAGS
=
-std
=
gnu11
-Wimplicit
-Wall
# Validate LUA setting
ifeq
("$(LUA)","")
else
ifeq
("$(LUA)","51")
# ok
else
ifeq
("$(LUA)","53")
$(error
Your
variable
LUA
=
"
$(LUA)
"
looks like you probably want
\
app/lua53/Makefile instead
)
else
$(error
Unsupported
value
"$(LUA)"
for
variable
"LUA"
,
\
expected
empty/unset
(recommended)
or
"51"
)
endif
#############################################################
# Configuration i.e. compile options etc.
# Target specific stuff (defines etc.) goes in here!
...
...
app/lua/luac_cross/Makefile
View file @
9a26e0a9
...
...
@@ -15,6 +15,20 @@ CCFLAGS += -Wall
TARGET
=
host
# Validate LUA setting
ifeq
("$(LUA)","")
else
ifeq
("$(LUA)","51")
# ok
else
ifeq
("$(LUA)","53")
$(error
Your
variable
LUA
=
"
$(LUA)
"
looks like you probably want
\
app/lua53/host/Makefile instead
)
else
$(error
Unsupported
value
"$(LUA)"
for
variable
"LUA"
,
\
expected
empty/unset
(recommended)
or
"51"
)
endif
VERBOSE
?=
V
?=
$(VERBOSE)
ifeq
("$(V)","1")
...
...
app/lua53/Makefile
View file @
9a26e0a9
...
...
@@ -18,6 +18,18 @@ endif
STD_CFLAGS
=
-std
=
gnu11
-Wimplicit
-Wall
# Validate LUA setting
ifeq
("$(LUA)","53")
# ok
else
ifeq
("$(LUA)","51")
$(error
Your
variable
LUA
=
"
$(LUA)
"
looks like you probably want
\
app/lua/Makefile instead
)
else
$(error
Expected
environment
variable
"LUA"
to
be
"53"
,
not
"$(LUA)"
)
endif
#############################################################
# Configuration i.e. compile options etc.
# Target specific stuff (defines etc.) goes in here!
...
...
app/lua53/host/Makefile
View file @
9a26e0a9
...
...
@@ -23,6 +23,18 @@ else
# MAKEFLAGS += --silent -w
endif
# $(V)==1
# Validate LUA setting
ifeq
("$(LUA)","53")
# ok
else
ifeq
("$(LUA)","51")
$(error
Your
variable
LUA
=
"
$(LUA)
"
looks like you probably want
\
app/lua/luac_cross/Makefile instead
)
else
$(error
Expected
environment
variable
"LUA"
to
be
"53"
,
not
"$(LUA)"
)
endif
DEBUG
?=
ifeq
("$(DEBUG)","1")
FLAVOR
=
debug
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment