Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etersoft-build-utils
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
korinf
etersoft-build-utils
Commits
5ec21645
Commit
5ec21645
authored
Jul 29, 2011
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmake: add support for pump mode by default
parent
af565d32
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
14 deletions
+52
-14
dmake
bin/dmake
+49
-11
jmake
bin/jmake
+1
-1
config
etc/config
+2
-2
No files found.
bin/dmake
View file @
5ec21645
...
@@ -3,28 +3,66 @@
...
@@ -3,28 +3,66 @@
# load common functions, compatible with local and installed script
# load common functions, compatible with local and installed script
.
`
dirname
$0
`
/../share/eterbuild/functions/common
.
`
dirname
$0
`
/../share/eterbuild/functions/common
if
[
"
$1
"
=
=
"-h"
]
||
[
"
$1
"
=
=
"--help"
]
;
then
if
[
"
$1
"
=
"-h"
]
||
[
"
$1
"
=
"--help"
]
;
then
echo
"dmake - make with distcc using (distributed build)"
echo
"dmake - make with distcc using (distributed build)"
exit
0
exit
0
fi
fi
if
[
"
$1
"
=
"-p"
]
;
then
shift
PLAIN_DISTCC
=
distcc
fi
extra_to_pump_mode
()
{
local
LIST
=
if
[
-n
"
$PLAIN_DISTCC
"
]
;
then
echo
"
$@
"
return
fi
for
i
in
$@
;
do
LIST
=
"
$LIST
$i
,cpp,lzo"
done
echo
"
$LIST
"
}
DISTCC
=
$(
which distcc 2>/dev/null
)
DISTCC
=
$(
which distcc 2>/dev/null
)
[
-n
"
$DISTCC
"
]
||
fatal
"Install distcc for run distributed make via dmake"
[
-n
"
$DISTCC
"
]
||
fatal
"Install distcc package for run distributed make via dmake"
if
[
-n
"
$PLAIN_DISTCC
"
]
;
then
PUMP
=
else
PUMP
=
$(
which pump 2>/dev/null
)
[
-n
"
$PUMP
"
]
||
fatal
"Install distcc-pump package for run distributed make via dmake"
fi
DISTCXX
=
"
$DISTCC
"
if
[
"
$DEFAULTARCH
"
=
"x86_64"
]
;
then
if
[
"
$DEFAULTARCH
"
=
"x86_64"
]
;
then
export
DISTCC_HOSTS
=
"
$
DISTCC_64_HOSTS
"
export
DISTCC_HOSTS
=
"
$
(
extra_to_pump_mode
$DISTCC_64_HOSTS
)
"
DISTCC_
HOSTS_NUM
=
$DISTCC_64_HOSTS_NUM
DISTCC_
THREADS
=
$DISTCC_64_THREADS
else
else
export
DISTCC_HOSTS
=
"
$DISTCC_32_HOSTS
$DISTCC_64_HOSTS
"
export
DISTCC_HOSTS
=
"
$(
extra_to_pump_mode
$DISTCC_32_HOSTS
$DISTCC_64_HOSTS
)
"
DISTCC_HOSTS_NUM
=
$((
$DISTCC_32_HOSTS_NUM
+
$DISTCC_64_HOSTS_NUM
))
DISTCC_THREADS
=
$((
$DISTCC_32_THREADS
+
$DISTCC_64_THREADS
))
DISTCC
=
"
$DISTCC
-m32"
DISTCC
=
"
$DISTCC
gcc -m32"
DISTCXX
=
"
$DISTCXX
g++ -m32"
fi
fi
echo
"Build on '
$DISTCC_HOSTS
' hosts (
$DEFAULTARCH
arch)"
echo
"Build on '
$DISTCC_HOSTS
' hosts (
$DEFAULTARCH
arch)"
if
[
-z
"
$DISTCC_HOSTS
"
]
||
[
-z
"
$DISTCC_HOSTS_NUM
"
]
;
then
if
[
-z
"
$DISTCC_HOSTS
"
]
||
[
-z
"
$DISTCC_THREADS
"
]
;
then
fatal
"Set DISTCC_HOSTS and DISTCC_HOSTS_NUM var in config"
fatal
"Set DISTCC_??_HOSTS and DISTCC_??_THREADS var in config"
fi
# Do not use all threads in plain mode
if
[
-n
"
$PLAIN_DISTCC
"
]
;
then
DISTCC_THREADS
=
$((
$DISTCC_THREADS
/
2
))
# FIXME: see lsdistcc also
#else
# export DISTCC_POTENTIAL_HOSTS="$DISTCC_HOSTS"
# unset DISTCC_HOSTS
fi
fi
showcmd
time
-p
make
-j
$DISTCC_HOSTS_NUM
CC
=
"
$DISTCC
"
CXX
=
"
$DISTCC
"
$@
showcmd
time
-p
$PUMP
make
-j
$DISTCC_THREADS
CC
=
"
$DISTCC
"
CXX
=
"
$DISTCXX
"
$@
time
-p
make
-j
$DISTCC_HOSTS_NUM
CC
=
"
$DISTCC
"
CXX
=
"
$DISTCC
"
$@
time
-p
$PUMP
make
-j
$DISTCC_THREADS
CC
=
"
$DISTCC
"
CXX
=
"
$DISTCXX
"
$@
bin/jmake
View file @
5ec21645
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
# load common functions, compatible with local and installed script
# load common functions, compatible with local and installed script
.
`
dirname
$0
`
/../share/eterbuild/functions/common
.
`
dirname
$0
`
/../share/eterbuild/functions/common
if
[
"
$1
"
=
=
"-h"
]
||
[
"
$1
"
=
=
"--help"
]
;
then
if
[
"
$1
"
=
"-h"
]
||
[
"
$1
"
=
"--help"
]
;
then
echo
"jmake - make with ccache using and parallel build enabled"
echo
"jmake - make with ccache using and parallel build enabled"
exit
0
exit
0
fi
fi
...
...
etc/config
View file @
5ec21645
...
@@ -85,8 +85,8 @@
...
@@ -85,8 +85,8 @@
# https://wiki.office.etersoft.ru/devel/distrubutedcompilation
# https://wiki.office.etersoft.ru/devel/distrubutedcompilation
# i586 only systems
# i586 only systems
# DISTCC_32_HOSTS="euclid atlant"
# DISTCC_32_HOSTS="euclid atlant"
# DISTCC_32_
HOSTS_NUM
=12
# DISTCC_32_
THREADS
=12
# x86_64 (gcc -m32 supports too)
# x86_64 (gcc -m32 supports too)
# DISTCC_64_HOSTS="builder64"
# DISTCC_64_HOSTS="builder64"
# DISTCC_64_
HOSTS_NUM
=12
# DISTCC_64_
THREADS
=12
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment