Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-common
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
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
Core Modules
dune-common
Commits
40ee2d32
Commit
40ee2d32
authored
17 years ago
by
Christian Engwer
Browse files
Options
Downloads
Patches
Plain Diff
add m4suggests
[[Imported from SVN: r5155]]
parent
37a070c8
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bin/dunecontrol
+8
-3
8 additions, 3 deletions
bin/dunecontrol
bin/dunemodules.inc
+48
-1
48 additions, 1 deletion
bin/dunemodules.inc
with
56 additions
and
4 deletions
bin/dunecontrol
+
8
−
3
View file @
40ee2d32
...
...
@@ -493,10 +493,15 @@ case "$command" in
if
test
"x
$SEARCH_MODULES
"
!=
"x"
;
then
MODULES
=
$SEARCH_MODULES
fi
if
test
"x
$ONLY
"
!=
x
;
then
MODULES
=
$ONLY
sort_dependencies
$MODULES
eval
"print_module_list ','
$MODULES
"
;;
m4suggests
)
find_modules_in_path
if
test
"x
$SEARCH_MODULES
"
!=
"x"
;
then
MODULES
=
$SEARCH_MODULES
fi
sort_
dependecie
s
$MODULES
sort_
suggestion
s
$MODULES
eval
"print_module_list ','
$MODULES
"
;;
export
)
...
...
This diff is collapsed.
Click to expand it.
bin/dunemodules.inc
+
48
−
1
View file @
40ee2d32
...
...
@@ -148,7 +148,7 @@ sort_modules() {
# sort $MODULES's dependencies according to the dependencies
# don't include $MODULE itself
#
sort_dependecies() {
sort_depende
n
cies() {
# reset list
export
SORTEDMODULES
=
""
# handle each modules passed as parameter
...
...
@@ -174,6 +174,53 @@ sort_dependecies() {
done
}
#
# sort $MODULES's dependencies according to the dependencies
# don't include $MODULE itself
#
sort_suggestions() {
# get dependencies
sort_dependencies
$
@
export
DEPENDENCIES
=
"
$SORTEDMODULES
"
# reset list
export
SORTEDMODULES
=
""
# handle each modules passed as parameter
for
m
in
"$@"
;
do
# did we find a module file for this mopdule?
if
test
"x$(eval echo
\$
HAVE_
$m
)"
!=
"x"
;
then
if
test
"x$(eval echo
\$
SUGS_
$m
)"
!=
"x"
;
then
for
name
in
$
(
eval
echo
\
$SUGS_$m
);
do
dep
=
$
(
fix_variable_name
$name
)
if
test
"x$(eval echo
\$
HAVE_
$dep
)"
!=
"x"
;
then
_sort_module
$dep
fi
done
fi
else
echo
"ERROR: could not find module $(eval echo
\$
NAME_
$m
)"
>
/
dev
/
stderr
exit
1
fi
done
# save result
local
FOUND
=
no
export
MODULES
=
""
for
m
in
$SORTEDMODULES
;
do
FOUND
=
no
for
d
in
$DEPENDENCIES
;
do
if
test
"x
$m
"
=
"x
$d
"
;
then
FOUND
=
yes
fi
done
if
test
"x
$FOUND
"
=
"xno"
;
then
export
MODULES
=
"
$MODULES
$m
"
fi
done
# clean up temporary variables
for
m
in
$MODULES
;
do
export
SORT_DONE_
$
{
m
}
=
""
done
}
#
# recursive part of sort_modules
# evaluate dependencies of one module
...
...
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