Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Firmware
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
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alberto Ruiz Garcia
Firmware
Commits
37ec1ec8
Commit
37ec1ec8
authored
10 years ago
by
Lorenz Meier
Browse files
Options
Downloads
Patches
Plain Diff
Improve submodule checking
parent
dc46736e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Makefile
+3
-4
3 additions, 4 deletions
Makefile
Tools/check_submodules.sh
+50
-9
50 additions, 9 deletions
Tools/check_submodules.sh
with
53 additions
and
13 deletions
Makefile
+
3
−
4
View file @
37ec1ec8
#
# Copyright (c) 2012
,
201
3
PX4 Development Team. All rights reserved.
# Copyright (c) 2012
-
201
5
PX4 Development Team. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
...
...
@@ -161,7 +161,7 @@ $(foreach config,$(FMU_CONFIGS),$(eval $(call FMU_DEP,$(config))))
#
NUTTX_ARCHIVES
=
$(
foreach board,
$(
BOARDS
)
,
$(
ARCHIVE_DIR
)$(
board
)
.export
)
.PHONY
:
archives
archives
:
$(NUTTX_ARCHIVES)
archives
:
checksubmodules
$(NUTTX_ARCHIVES)
# We cannot build these parallel; note that we also force -j1 for the
# sub-make invocations.
...
...
@@ -211,8 +211,7 @@ menuconfig:
@$(
ECHO
)
""
endif
$(NUTTX_SRC)
:
$(
Q
)
(
$(
PX4_BASE
)
/Tools/check_submodules.sh
)
$(NUTTX_SRC)
:
checksubmodules
$(UAVCAN_DIR)
:
$(
Q
)
(
./Tools/check_submodules.sh
)
...
...
This diff is collapsed.
Click to expand it.
Tools/check_submodules.sh
+
50
−
9
View file @
37ec1ec8
...
...
@@ -12,17 +12,16 @@ if [ -d NuttX/nuttx ];
if
[
-z
"
$STATUSRETVAL
"
]
;
then
echo
"Checked NuttX submodule, correct version found"
else
echo
""
echo
""
echo
"New commits required:"
echo
"
$(
git submodule summary
)
"
echo
""
echo
""
echo
" NuttX sub repo not at correct version. Try 'git submodule update'"
echo
" or follow instructions on http://pixhawk.org/dev/git/submodules"
echo
""
echo
" DO NOT FORGET TO RUN 'make distclean && make archives' AFTER EACH NUTTX UPDATE!"
echo
""
echo
""
echo
"New commits required:"
echo
"
$(
git submodule summary
)
"
echo
""
exit
1
fi
else
...
...
@@ -37,15 +36,14 @@ if [ -d mavlink/include/mavlink/v1.0 ];
if
[
-z
"
$STATUSRETVAL
"
]
;
then
echo
"Checked mavlink submodule, correct version found"
else
echo
""
echo
""
echo
"mavlink sub repo not at correct version. Try 'git submodule update'"
echo
"or follow instructions on http://pixhawk.org/dev/git/submodules"
echo
""
echo
""
echo
"New commits required:"
echo
"
$(
git submodule summary
)
"
echo
""
echo
""
echo
"mavlink sub repo not at correct version. Try 'git submodule update'"
echo
"or follow instructions on http://pixhawk.org/dev/git/submodules"
exit
1
fi
else
...
...
@@ -61,15 +59,58 @@ then
then
echo
"Checked uavcan submodule, correct version found"
else
echo
""
echo
""
echo
"New commits required:"
echo
"
$(
git submodule summary
)
"
echo
""
echo
""
echo
"uavcan sub repo not at correct version. Try 'git submodule update'"
echo
"or follow instructions on http://pixhawk.org/dev/git/submodules"
exit
1
fi
else
git submodule init
;
git submodule update
;
fi
if
[
-d
Tools/gencpp
]
then
STATUSRETVAL
=
$(
git submodule summary |
grep
-A20
-i
gencpp |
grep
"<"
)
if
[
-z
"
$STATUSRETVAL
"
]
then
echo
"Checked gencpp submodule, correct version found"
else
echo
""
echo
""
echo
"New commits required:"
echo
"
$(
git submodule summary
)
"
echo
""
echo
""
echo
"gencpp sub repo not at correct version. Try 'git submodule update'"
echo
"or follow instructions on http://pixhawk.org/dev/git/submodules"
exit
1
fi
else
git submodule init
;
git submodule update
;
fi
if
[
-d
Tools/genmsg
]
then
STATUSRETVAL
=
$(
git submodule summary |
grep
-A20
-i
genmsg |
grep
"<"
)
if
[
-z
"
$STATUSRETVAL
"
]
then
echo
"Checked genmsg submodule, correct version found"
else
echo
""
echo
""
echo
"New commits required:"
echo
"
$(
git submodule summary
)
"
echo
""
echo
""
echo
"genmsg sub repo not at correct version. Try 'git submodule update'"
echo
"or follow instructions on http://pixhawk.org/dev/git/submodules"
exit
1
fi
else
...
...
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