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
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
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
Lasse Hinrichsen-Bischoff
dune-common
Commits
9ff73a22
Commit
9ff73a22
authored
18 years ago
by
Markus Blatt
Browse files
Options
Downloads
Patches
Plain Diff
Fixed duplicate dependencies. Fixes Flyspray 198 [[Imported from SVN: r4788]]
parent
93a5102d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bin/duneproject
+44
-2
44 additions, 2 deletions
bin/duneproject
with
44 additions
and
2 deletions
bin/duneproject
+
44
−
2
View file @
9ff73a22
...
...
@@ -48,6 +48,45 @@ modulesexist(){
return
$allfound
}
make_unique
(){
if
[
"$#"
=
"1"
]
;
then
# take first word
for
exclude_word
in
$1
;
do
break
;
done
make_unique
$exclude_word
"
$1
"
0
else
local
exclude_word
=
"
$1
"
local
words
=
"
$2
"
local
pos
=
"
$3
"
local
length
=
0
local
i
=
0
local
new_words
=
""
local
cur
=
0
for
word
in
$words
;
do
if
[
$i
-le
$pos
]
;
then
i
=
$((
i+1
))
length
=
$((
length+1
))
new_words
=
"
$new_words
$word
"
continue
fi
if
[
"
$word
"
!=
"
$exclude_word
"
]
;
then
new_words
=
"
$new_words
$word
"
if
[
"
$((
length-1
))
"
=
"
$pos
"
]
;
then
next_word
=
"
$word
"
fi
length
=
$((
length+1
))
fi
done
if
[
"
$pos
"
-lt
"
$length
"
]
;
then
# process next word
make_unique
"
$next_word
"
"
$new_words
"
$((
pos+1
))
else
export
UNIQUE_WORDS
=
"
$new_words
"
fi
fi
}
echo
echo
==
Dune project/module generator
==
echo
...
...
@@ -190,11 +229,14 @@ for name in $DEPENDENCIES; do
CHECK
=
"[
$dep
]"
j
=
1
else
CHECK
=
"
$CHECK
,
[
$dep
]"
CHECK
=
"
$CHECK
[
$dep
]"
fi
done
done
make_unique
"
$CHECK
"
CHECK
=
`
echo
$UNIQUE_WORDS
|
sed
-e
's/\] \[/\], \[/g'
`
# we need the module with _ instead of - to not confuse automake
fix_and_assign CMODULE
$MODULE
...
...
@@ -208,7 +250,7 @@ AC_CONFIG_SRCDIR([$CMODULE.cc])
AM_CONFIG_HEADER([config.h])
# we need no more than the standard D
UN
E-stuff
# we need no more than the standard DE-stuff
# this module depends on
$DEPENDENCIES
# this implies checking for
$CHECK
DUNE_CHECK_ALL(
$CHECK
)
...
...
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