Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RIOT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cm-projects
RIOT
Commits
e4ae8eaa
Commit
e4ae8eaa
authored
10 years ago
by
René Kijewski
Browse files
Options
Downloads
Patches
Plain Diff
make: allow tagged RIOT_VERSION
parent
b4c3a06a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Makefile.buildtests
+0
-20
0 additions, 20 deletions
Makefile.buildtests
Makefile.include
+61
-5
61 additions, 5 deletions
Makefile.include
with
61 additions
and
25 deletions
Makefile.buildtests
+
0
−
20
View file @
e4ae8eaa
...
...
@@ -33,26 +33,6 @@ endif
OS
:=
$(
shell
uname
)
COLOR_GREEN
:=
COLOR_RED
:=
COLOR_PURPLE
:=
COLOR_RESET
:=
COLOR_ECHO
:=
/bin/echo
ifeq
(, ${JENKINS_URL})
ifeq
(0, $(shell tput colors 2>&1 > /dev/null; echo $$?))
COLOR_GREEN
:=
\0
33[1
;
32m
COLOR_RED
:=
\0
33[1
;
31m
COLOR_PURPLE
:=
\0
33[1
;
35m
COLOR_RESET
:=
\0
33[0m
ifeq
($(OS),Darwin)
COLOR_ECHO
:=
echo
-e
SHELL
=
bash
else
COLOR_ECHO
:=
/bin/echo
-e
endif
endif
endif
buildtest
:
@
\
BUILDTESTOK
=
true
;
\
...
...
This diff is collapsed.
Click to expand it.
Makefile.include
+
61
−
5
View file @
e4ae8eaa
# Provide a shallow sanity check. You cannot call `make` in a module directory.
export
__RIOTBUILD_FLAG
:=
RIOT
all
:
# set undefined variables
RIOTBASE
?=
$(
shell
dirname
"
$(
lastword
$(
MAKEFILE_LIST
))
"
)
...
...
@@ -12,7 +11,30 @@ RIOTBOARD ?= $(RIOTBASE)/boards
RIOTBOARD
:=
$(
abspath
$(
RIOTBOARD
))
BINDIRBASE
?=
$(
CURDIR
)
/bin
BINDIR
?=
$(
abspath
$(
BINDIRBASE
)
/
$(
BOARD
))
/
BINDIRBASE
:=
$(
abspath
$(
BINDIRBASE
))
BINDIR
?=
$(
BINDIRBASE
)
/
$(
BOARD
)
BINDIR
:=
$(
abspath
$(
BINDIR
))
/
COLOR_GREEN
:=
COLOR_RED
:=
COLOR_PURPLE
:=
COLOR_RESET
:=
COLOR_ECHO
:=
/bin/echo
ifeq
(, ${JENKINS_URL})
ifeq
(0, $(shell tput colors 2>&1 > /dev/null; echo $$?))
COLOR_GREEN
:=
\0
33[1
;
32m
COLOR_RED
:=
\0
33[1
;
31m
COLOR_PURPLE
:=
\0
33[1
;
35m
COLOR_RESET
:=
\0
33[0m
ifeq
($(OS),Darwin)
COLOR_ECHO
:=
echo
-e
SHELL
=
bash
else
COLOR_ECHO
:=
/bin/echo
-e
endif
endif
endif
ifeq
($(QUIET),1)
AD
=
@
...
...
@@ -21,6 +43,11 @@ else
AD
=
endif
ifneq
(10,$(if ${RIOT_VERSION},1,0)$(if ${__RIOTBUILD_FLAG},1,0))
# Provide a shallow sanity check. You cannot call `make` in a module directory.
export
__RIOTBUILD_FLAG
:=
RIOT
BOARD
:=
$(
strip
$(
BOARD
))
# provide common external programs for `Makefile.include`s
...
...
@@ -134,7 +161,8 @@ endif
endif
..build-message
:
@
echo
"Building application
$(
APPLICATION
)
for
$(
BOARD
)
w/ MCU
$(
MCU
)
."
@$(
COLOR_ECHO
)
'
${
COLOR_GREEN
}
Building application "
$(
APPLICATION
)
" for "
$(
BOARD
)
" with MCU "
$(
MCU
)
".
${
COLOR_RESET
}
'
@$(
COLOR_ECHO
)
# add extra include paths for packages in $(USEMODULE)
export
USEMODULE_INCLUDES
=
...
...
@@ -203,7 +231,6 @@ include $(RIOTBASE)/Makefile.vars
# Warn if the selected board and drivers don't provide all needed featues:
ifneq
(, $(filter all, $(if $(MAKECMDGOALS), $(MAKECMDGOALS), all)))
EXPECT_ERRORS
:=
# Test if there where dependencies against a module in DISABLE_MODULE.
...
...
@@ -240,3 +267,32 @@ ifneq (, $(filter all, $(if $(MAKECMDGOALS), $(MAKECMDGOALS), all)))
$(
shell
$(
COLOR_ECHO
)
"
\n\n
$(
COLOR_RED
)
EXPECT ERRORS!
$(
COLOR_RESET
)
\n\n
"
1>&2
)
endif
endif
else
# RIOT_VERSION
export
__RIOTBUILD_FLAG
:=
RIOT
NUM_RIOT_VERSION
:=
$(
shell
cd
$(
RIOTBASE
)
&&
git rev-parse
--verify
--short
"
$(
RIOT_VERSION
)
"
2>/dev/null
)
ifeq
(, ${NUM_RIOT_VERSION})
$(
error
The supplied
RIOT_VERSION
=
$(
RIOT_VERSION
)
is invalid!
)
endif
all $(filter-out clean, ${MAKECMDGOALS})
:
..delegate
ifneq
(, $(filter clean, $(MAKECMDGOALS)))
all $(filter-out clean, ${MAKECMDGOALS})
:
clean
endif
clean
:
-$(
AD
)
rm
-rf
$(
BINDIR
)
$(BINDIR)riot-version/$(NUM_RIOT_VERSION)/Makefile.include
:
$(
AD
)
rm
-rf
$(
@D
)
$(
AD
)
mkdir
-p
$(
@D
)
$(
AD
)
cd
$(
RIOTBASE
)
&&
git archive
--format
=
tar
$(
NUM_RIOT_VERSION
)
|
(
cd
$(
@D
)
&&
tar
x 1>&2
)
..delegate
:
$(BINDIR)riot-version/$(NUM_RIOT_VERSION)/Makefile.include
@$(
COLOR_ECHO
)
'
$(
COLOR_GREEN
)
Using RIOT_VERSION=
${
NUM_RIOT_VERSION
}$(
COLOR_RESET
)
'
1>&2
@$(
COLOR_ECHO
)
$(
MAKE
)
RIOTBASE
=
$(
<D
)
$(
filter-out clean,
${
MAKECMDGOALS
})
endif
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment