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
e1890641
Commit
e1890641
authored
10 years ago
by
René Kijewski
Browse files
Options
Downloads
Patches
Plain Diff
make: print error if make was executed in the root
Fixes #1104, alternative to #1178.
parent
7acc6500
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Makefile
+22
-6
22 additions, 6 deletions
Makefile
Makefile.base
+4
-0
4 additions, 0 deletions
Makefile.base
Makefile.include
+3
-0
3 additions, 0 deletions
Makefile.include
with
29 additions
and
6 deletions
Makefile
+
22
−
6
View file @
e1890641
ifeq
(, $(__RIOTBUILD_FLAG))
all
:
welcome
@
echo
""
@
exit
1
else
all
:
mkdir
-p
$(
BINDIR
)
@
for
i
in
$(
DIRS
)
;
do
"
$(
MAKE
)
"
-C
$$
i
||
exit
1
;
done
;
endif
DIRS
=
$(
RIOTCPU
)
/
$(
CPU
)
core drivers sys
ifneq
(,$(filter embunit,$(USEMODULE)))
...
...
@@ -8,12 +18,7 @@ ifneq (,$(filter embunit_textui,$(USEMODULE)))
DIRS
+=
tests/unittests/embunit/textui
endif
.PHONY
:
all clean doc
all
:
mkdir
-p
$(
BINDIR
)
@
for
i
in
$(
DIRS
)
;
do
"
$(
MAKE
)
"
-C
$$
i
||
exit
1
;
done
;
.PHONY
:
all clean doc docclean welcome
clean
:
@
for
i
in
$(
DIRS
)
;
do
"
$(
MAKE
)
"
-C
$$
i clean
||
exit
1
;
done
;
...
...
@@ -26,3 +31,14 @@ doc:
docclean
:
"
$(
MAKE
)
"
-BC
doc/doxygen clean
welcome
:
@
echo
"Welcome to RIOT - The friendly OS for IoT!"
@
echo
""
@
echo
"You executed 'make' from the base directory."
@
echo
"You should run 'make' in your application's directory instead."
@
echo
""
@
echo
"Please see our Quick Start Guide at:"
@
echo
" https://github.com/RIOT-OS/RIOT/wiki/Quick-Start-Guide"
@
echo
"Or ask questions on our mailing list:"
@
echo
" users@riot-os.org (http://lists.riot-os.org/mailman/listinfo/users)"
This diff is collapsed.
Click to expand it.
Makefile.base
+
4
−
0
View file @
e1890641
ifeq
(, $(__RIOTBUILD_FLAG))
$(
error
You cannot build a module on its own. Use
"make"
in
your application
's directory instead.
)
endif
ASMSRC
=
$(
wildcard *.s
)
ASSMSRC
=
$(
wildcard *.S
)
ASMOBJ
=
$(
ASMSRC:%.s=
$(
BINDIR
)$(
MODULE
)
/%.o
)
...
...
This diff is collapsed.
Click to expand it.
Makefile.include
+
3
−
0
View file @
e1890641
# Provide a shallow sanity check. You cannot call `make` in the root directory.
export
__RIOTBUILD_FLAG
:=
RIOT
# set undefined variables
RIOTBASE
?=
$(
shell
dirname
"
$(
lastword
$(
MAKEFILE_LIST
))
"
)
export
RIOTBASE
:=
$(
abspath
$(
RIOTBASE
))
...
...
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