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
Timo Koch
dune-common
Commits
3a2f9b29
Commit
3a2f9b29
authored
16 years ago
by
Christian Engwer
Browse files
Options
Downloads
Patches
Plain Diff
redirect error messages to &2 and not to /dev/stderr
[[Imported from SVN: r5177]]
parent
46d68554
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
bin/dunecontrol
+22
-23
22 additions, 23 deletions
bin/dunecontrol
bin/dunemodules.inc
+21
-21
21 additions, 21 deletions
bin/dunemodules.inc
bin/duneproject
+16
-16
16 additions, 16 deletions
bin/duneproject
bin/mpi-config
+4
-5
4 additions, 5 deletions
bin/mpi-config
with
63 additions
and
65 deletions
bin/dunecontrol
+
22
−
23
View file @
3a2f9b29
...
...
@@ -18,13 +18,13 @@ fi
canonicalname
(){
if
test
$#
-ne
1
;
then
echo
Usage: canonicalname path
>
/dev/stderr
echo
Usage: canonicalname path
>
&2
return
1
fi
name
=
"
$1
"
while
test
-L
"
$name
"
;
do
if
!
test
-e
"
$name
"
;
then
echo
$name
: file not found
>
/dev/stderr
echo
$name
: file not found
>
&2
return
1
fi
if
newname
=
"
`
readlink
$name
`
"
;
then
...
...
@@ -38,7 +38,7 @@ canonicalname(){
canonicalpath
(){
if
test
$#
-ne
1
;
then
echo
Usage: canonicalpath path
>
/dev/stderr
echo
Usage: canonicalpath path
>
&2
return
1
fi
(
cd
$(
dirname
$(
canonicalname
$1
))
&&
pwd
)
...
...
@@ -240,9 +240,8 @@ run_default_autogen () {
fi
done
if
test
-f
autogen.sh
;
then
eval echo
"WARNING:
\$
NAME_
$module
contains obsolete autogen.sh,"
\
>
/dev/stderr
echo
" dune-autogen is used instead."
>
/dev/stderr
eval echo
"WARNING:
\$
NAME_
$module
contains obsolete autogen.sh,"
>
&2
echo
" dune-autogen is used instead."
>
&2
fi
# eval ./autogen.sh "$M4_PATH" "$PARAMS" || exit 1
eval
"
$COMMAND_DIR
/dune-autogen"
"
$M4_PATH
"
"
$PARAMS
"
||
exit
1
...
...
@@ -277,8 +276,8 @@ run_default_configure () {
eval
./configure
"
$PARAMS
"
||
exit
1
else
if
test
-f
configure.in
||
test
-f
configure.ac
;
then
echo
"ERROR: configure.[in|ac] found, but configure missing"
>
/dev/stderr
echo
"did you forget to run autoconf?"
>
/dev/stderr
echo
"ERROR: configure.[in|ac] found, but configure missing"
>
&2
echo
"did you forget to run autoconf?"
>
&2
exit
1
fi
fi
...
...
@@ -312,7 +311,7 @@ run_default_svn () {
###
onfailure
()
{
echo
"Execution of
$(
basename
$0
)
terminated due to errors!"
>
/dev/stderr
echo
"Execution of
$(
basename
$0
)
terminated due to errors!"
>
&2
exit
1
}
...
...
@@ -345,7 +344,7 @@ usage () {
printf
"
\`
export'
\t
run eval
\`
dunecontrol export
\`
to save the list of
\n
"
printf
"
\t\t
dune.module files to the DUNE_CONTROL_PATH variable
\n
"
echo
)
>
/dev/stderr
)
>
&2
}
# create the module list
...
...
@@ -408,15 +407,15 @@ while test $# -gt 0; do
--opts
=
*
)
if
test
"x
$arg
"
=
"x"
;
then
usage
echo
"ERROR: Parameter for --opts is missing"
>
/dev/stderr
echo
>
/dev/stderr
echo
"ERROR: Parameter for --opts is missing"
>
&2
echo
>
&2
exit
1
;
fi
DUNE_OPTS_FILE
=
$(
canonicalpath
$arg
)
/
$(
basename
$arg
)
if
!
test
-r
"
$DUNE_OPTS_FILE
"
;
then
usage
echo
"ERROR: could not read opts file
\"
$DUNE_OPTS_FILE
\"
"
>
/dev/stderr
echo
>
/dev/stderr
echo
"ERROR: could not read opts file
\"
$DUNE_OPTS_FILE
\"
"
>
&2
echo
>
&2
exit
1
;
fi
;;
...
...
@@ -427,7 +426,7 @@ while test $# -gt 0; do
export
${
COMMAND
}
_FLAGS
=
"
$arg
"
else
usage
echo
"ERROR: unknown option
\"
$option
\"
"
>
/dev/stderr
echo
"ERROR: unknown option
\"
$option
\"
"
>
&2
exit
1
fi
;;
...
...
@@ -442,8 +441,8 @@ while test $# -gt 0; do
--module
=
*
)
if
test
"x
$arg
"
=
"x"
;
then
usage
echo
"ERROR: Parameter for --module is missing"
>
/dev/stderr
echo
>
/dev/stderr
echo
"ERROR: Parameter for --module is missing"
>
&2
echo
>
&2
exit
1
;
fi
for
a
in
`
echo
$arg
|
tr
','
' '
`
;
do
...
...
@@ -455,8 +454,8 @@ while test $# -gt 0; do
--only
=
*
)
if
test
"x
$arg
"
=
"x"
;
then
usage
echo
"ERROR: Parameter for --only is missing"
>
/dev/stderr
echo
>
/dev/stderr
echo
"ERROR: Parameter for --only is missing"
>
&2
echo
>
&2
exit
1
;
fi
for
a
in
`
echo
$arg
|
tr
','
' '
`
;
do
...
...
@@ -469,8 +468,8 @@ while test $# -gt 0; do
--debug
)
true
;;
--
*
)
usage
echo
"ERROR: Unknown option
\`
$option
'"
>
/dev/stderr
echo
>
/dev/stderr
echo
"ERROR: Unknown option
\`
$option
'"
>
&2
echo
>
&2
exit
1
;;
*
)
...
...
@@ -498,7 +497,7 @@ case "$command" in
print
)
create_module_list
eval
"print_module_list ' '
$MODULES
"
echo
>
/dev/stderr
echo
>
&2
;;
m4depends
)
find_modules_in_path
...
...
@@ -618,7 +617,7 @@ EOF
echo
"--- done ---"
else
usage
echo
"ERROR: unknown command
\"
$command
\"
"
>
/dev/stderr
echo
"ERROR: unknown command
\"
$command
\"
"
>
&2
exit
1
fi
;;
...
...
This diff is collapsed.
Click to expand it.
bin/dunemodules.inc
+
21
−
21
View file @
3a2f9b29
...
...
@@ -31,13 +31,13 @@ fi
parse_control() {
# check file existence
if
!
test
-
f
"$1"
;
then
echo
"ERROR: could not read file $1"
>
/
dev
/
stderr
echo
"ERROR: could not read file $1"
>
&
2
exit
1
fi
# read parameters from control file
local
name
=
"$(echo $(
$GREP
Module: "
$
1
" | cut -d ':' -f2))"
if
test
"x
$name
"
=
"x"
;
then
echo
"ERROR:
$CONTROL
files $1 does not contain a Module entry"
>
/
dev
/
stderr
echo
"ERROR:
$CONTROL
files $1 does not contain a Module entry"
>
&
2
exit
1
fi
local
deps
=
"$(echo $(
$GREP
Depends: "
$
1
" | cut -d ':' -f2))"
...
...
@@ -48,16 +48,16 @@ parse_control() {
# create and check variable name from module name
export
module
=
$
(
fix_variable_name
$name
)
if
!
check_modname
"
$module
"
;
then
echo
"ERROR:
$CONTROL
files $1 contains an invalid Module entry"
>
/
dev
/
stderr
echo
"ERROR:
$CONTROL
files $1 contains an invalid Module entry"
>
&
2
exit
1
fi
# avoid multiple definition of the same module
if
test
"x$(eval echo
\$
HAVE_
$module
)"
!=
"x"
;
then
echo
"ERROR: multiple definition of module
$name
"
>
/
dev
/
stderr
echo
"previous defined in:"
>
/
dev
/
stderr
echo
" $(eval echo
\$
PATH_
$module
)/
$CONTROL
"
>
/
dev
/
stderr
echo
"redefined in:"
>
/
dev
/
stderr
echo
"
$path
/
$CONTROL
"
>
/
dev
/
stderr
echo
"ERROR: multiple definition of module
$name
"
>
&
2
echo
"previous defined in:"
>
&
2
echo
" $(eval echo
\$
PATH_
$module
)/
$CONTROL
"
>
&
2
echo
"redefined in:"
>
&
2
echo
"
$path
/
$CONTROL
"
>
&
2
exit
1
fi
# set status variables
...
...
@@ -118,7 +118,7 @@ EOF
parse_control
"$1"
export
MODULES
=
"
$MODULES
$module
"
else
echo
"ERROR: '$1' is neither a directory nor a
$CONTROL
file"
>
/
dev
/
stderr
echo
"ERROR: '$1' is neither a directory nor a
$CONTROL
file"
>
&
2
false
fi
fi
...
...
@@ -136,7 +136,7 @@ sort_modules() {
if
test
"x$(eval echo
\$
HAVE_
$m
)"
!=
"x"
;
then
_sort_module
$m
else
echo
"ERROR: could not find module $(eval echo
\$
NAME_
$m
)"
>
/
dev
/
stderr
echo
"ERROR: could not find module $(eval echo
\$
NAME_
$m
)"
>
&
2
exit
1
fi
done
...
...
@@ -166,7 +166,7 @@ sort_dependencies() {
done
fi
else
echo
"ERROR: could not find module $(eval echo
\$
NAME_
$m
)"
>
/
dev
/
stderr
echo
"ERROR: could not find module $(eval echo
\$
NAME_
$m
)"
>
&
2
exit
1
fi
done
...
...
@@ -201,7 +201,7 @@ sort_suggestions() {
done
fi
else
echo
"ERROR: could not find module $(eval echo
\$
NAME_
$m
)"
>
/
dev
/
stderr
echo
"ERROR: could not find module $(eval echo
\$
NAME_
$m
)"
>
&
2
exit
1
fi
done
...
...
@@ -236,7 +236,7 @@ _sort_module() {
local
module
=
"$1"
shift
1
if
!
check_modname
$module
;
then
echo
"ERROR: invalid module name
$module
"
>
/
dev
/
stderr
echo
"ERROR: invalid module name
$module
"
>
&
2
exit
1
fi
if
test
"x$(eval echo
\$
SORT_DONE_${module})"
!=
"xyes"
;
then
...
...
@@ -244,7 +244,7 @@ _sort_module() {
for
name
in
$
(
eval
"echo
\$
DEPS_
$module
"
);
do
dep
=
$
(
fix_variable_name
$name
)
if
!
check_modname
$dep
;
then
echo
"ERROR: invalid module name
$name
"
>
/
dev
/
stderr
echo
"ERROR: invalid module name
$name
"
>
&
2
exit
1
fi
if
test
"x$(eval echo
\$
HAVE_
$dep
)"
!=
"x"
;
then
...
...
@@ -253,10 +253,10 @@ _sort_module() {
# perhaps this module is installed,
# then it should be handled via pkg-config
if
!
pkg
-
config
$name
;
then
echo
"ERROR: could not find module $(eval echo
\$
NAME_
$dep
)"
>
/
dev
/
stderr
echo
" module is also unknown to pkg-config"
>
/
dev
/
stderr
echo
" Maybe you need to adjust PKG_CONFIG_PATH!"
>
/
dev
/
stderr
echo
" $(eval echo
\$
NAME_
$dep
) is required by $(eval echo
\$
NAME_
$module
)"
>
/
dev
/
stderr
echo
"ERROR: could not find module $(eval echo
\$
NAME_
$dep
)"
>
&
2
echo
" module is also unknown to pkg-config"
>
&
2
echo
" Maybe you need to adjust PKG_CONFIG_PATH!"
>
&
2
echo
" $(eval echo
\$
NAME_
$dep
) is required by $(eval echo
\$
NAME_
$module
)"
>
&
2
exit
1
fi
fi
...
...
@@ -265,7 +265,7 @@ _sort_module() {
for
name
in
$
(
eval
"echo
\$
SUGS_
$module
"
);
do
dep
=
$
(
fix_variable_name
$name
)
if
!
check_modname
$dep
;
then
echo
"ERROR: invalid module name
$name
"
>
/
dev
/
stderr
echo
"ERROR: invalid module name
$name
"
>
&
2
exit
1
fi
if
test
"x$(eval echo
\$
HAVE_
$dep
)"
!=
"x"
;
then
...
...
@@ -302,7 +302,7 @@ eval_control() {
$command
)
||
false
else
echo
"ERROR: could not find
$file
"
>
/
dev
/
stderr
echo
"ERROR: could not find
$file
"
>
&
2
exit
1
fi
}
...
...
@@ -321,7 +321,7 @@ fix_variable_name() {
fix_and_assign
()
{
local
name
=
"$1"
if
!
check_modname
$name
;
then
echo
"ERROR: error in assignment.
$name
is not a valid variabel name."
>
/
dev
/
stderr
echo
"ERROR: error in assignment.
$name
is not a valid variabel name."
>
&
2
fi
shift
1
export
$name
=
$
(
fix_variable_name
$
@
)
...
...
This diff is collapsed.
Click to expand it.
bin/duneproject
+
16
−
16
View file @
3a2f9b29
...
...
@@ -11,13 +11,13 @@ set -e
canonicalname
(){
if
test
$#
-ne
1
;
then
echo
Usage: canonicalname path
>
/dev/stderr
echo
Usage: canonicalname path
>
&2
return
1
fi
name
=
"
$1
"
while
test
-L
"
$name
"
;
do
if
!
test
-e
"
$name
"
;
then
echo
$name
: file not found
>
/dev/stderr
echo
$name
: file not found
>
&2
return
1
fi
if
newname
=
"
`
readlink
$name
`
"
;
then
...
...
@@ -31,7 +31,7 @@ canonicalname(){
canonicalpath
(){
if
test
$#
-ne
1
;
then
echo
Usage: canonicalpath path
>
/dev/stderr
echo
Usage: canonicalpath path
>
&2
return
1
fi
(
cd
$(
dirname
$(
canonicalname
$1
))
&&
pwd
)
...
...
@@ -39,7 +39,7 @@ canonicalpath(){
pkg_config_dependencies
(){
if
test
$#
-ne
1
;
then
echo
Usage: pkg_config_dependencies name
>
/dev/stderr
echo
Usage: pkg_config_dependencies name
>
&2
return
1
fi
name
=
"
$1
"
...
...
@@ -62,11 +62,11 @@ modulesexist(){
fi
done
if
[
"
$found
"
=
"0"
]
;
then
echo
"ERROR:"
>
/dev/stderr
echo
"Module with name
$dep
was not found"
>
/dev/stderr
echo
"Did you forget to specify it's location"
>
/dev/stderr
echo
"in the DUNE_CONTROL_PATH variable?"
>
/dev/stderr
echo
>
/dev/stderr
echo
"ERROR:"
>
&2
echo
"Module with name
$dep
was not found"
>
&2
echo
"Did you forget to specify it's location"
>
&2
echo
"in the DUNE_CONTROL_PATH variable?"
>
&2
echo
>
&2
allfound
=
1
fi
done
...
...
@@ -147,13 +147,13 @@ ALL_MODULES="`echo $SRC_MODULES $PKG_MODULES | tr ' ' '\n' | sort | uniq`"
if
[
"
$ALL_MODULES
"
=
""
]
;
then
echo
"ERROR"
>
/dev/stderr
echo
"No dune modules were found!"
>
/dev/stderr
echo
"Did you forget to specify the places where "
>
/dev/stderr
echo
"you installed your modules in the "
>
/dev/stderr
echo
"DUNE_CONTROL_PATH environment variable"
>
/dev/stderr
echo
"and adjusted the PKG_CONFIG_PATH environment"
>
/dev/stderr
echo
"accordingly?"
>
/dev/stderr
echo
"ERROR"
>
&2
echo
"No dune modules were found!"
>
&2
echo
"Did you forget to specify the places where "
>
&2
echo
"you installed your modules in the "
>
&2
echo
"DUNE_CONTROL_PATH environment variable"
>
&2
echo
"and adjusted the PKG_CONFIG_PATH environment"
>
&2
echo
"accordingly?"
>
&2
exit
1
;
fi
...
...
This diff is collapsed.
Click to expand it.
bin/mpi-config
+
4
−
5
View file @
3a2f9b29
...
...
@@ -4,13 +4,13 @@ set -e
canonicalname
(){
if
test
$#
-ne
1
;
then
echo
Usage: canonicalname path
>
/dev/stderr
echo
Usage: canonicalname path
>
&2
return
1
fi
name
=
"
$1
"
while
test
-L
"
$name
"
;
do
if
!
test
-e
"
$name
"
;
then
echo
$name
: file not found
>
/dev/stderr
echo
$name
: file not found
>
&2
return
1
fi
if
newname
=
"
`
readlink
$name
`
"
;
then
...
...
@@ -24,7 +24,7 @@ canonicalname(){
canonicalpath
(){
if
test
$#
-ne
1
;
then
echo
Usage: canonicalpath path
>
/dev/stderr
echo
Usage: canonicalpath path
>
&2
return
1
fi
(
cd
$(
dirname
$(
canonicalname
$1
))
&&
pwd
)
...
...
@@ -50,8 +50,7 @@ findm4dir() {
echo
"
$M4DIR
"
return
fi
echo
"ERROR: could not find mpi-config.m4! Incomplete installation?"
\
>
/dev/stderr
echo
"ERROR: could not find mpi-config.m4! Incomplete installation?"
>
&2
exit
1
}
...
...
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