Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
chromebrew
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
chromebrew
Commits
26cd82da
Commit
26cd82da
authored
Jan 31, 2017
by
lyxell
Committed by
GitHub
Jan 31, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #430 from jam7/use-multicores
Change to use -j option in make to reduce the compile time
parents
c6035820
a3fcaa37
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
crew
crew
+7
-0
lib/package.rb
lib/package.rb
+8
-0
No files found.
crew
View file @
26cd82da
...
...
@@ -15,6 +15,13 @@ CREW_CONFIG_PATH = CREW_PREFIX + '/etc/crew/'
CREW_BREW_DIR
=
CREW_PREFIX
+
'/tmp/crew/'
CREW_DEST_DIR
=
CREW_BREW_DIR
+
'/dest'
# Set CREW_NPROC from environment variable or `nproc`
if
ENV
[
"CREW_NPROC"
].
to_s
==
''
CREW_NPROC
=
`nproc`
.
strip
else
CREW_NPROC
=
ENV
[
"CREW_NPROC"
]
end
ARCH
=
`uname -m`
.
strip
#SHORTARCH = `getconf LONG_BIT`.strip # will refactor this line in the future
case
ARCH
...
...
lib/package.rb
View file @
26cd82da
...
...
@@ -33,6 +33,14 @@ class Package
args
=
args
.
map
{
|
s
|
s
.
gsub
(
"-m32"
,
""
)}
args
=
args
.
map
{
|
s
|
s
.
gsub
(
"lib32"
,
"lib"
)}
end
# add "-j#{CREW_NPROC}" argument to "make"
if
args
[
0
]
==
"make"
# modify ["make", "args", ...] into ["make", "-j#{CREW_NPROC}", "args", ...]
args
.
insert
(
1
,
"-j
#{
CREW_NPROC
}
"
)
elsif
args
.
length
==
1
# modify ["make args..."] into ["make -j#{CREW_NPROC} args..."]
args
[
0
].
gsub!
(
/^make /
,
"make -j
#{
CREW_NPROC
}
"
)
end
Kernel
.
system
(
*
args
)
exitstatus
=
$?
.
exitstatus
raise
InstallError
.
new
(
"`
#{
args
.
join
(
" "
)
}
` exited with
#{
exitstatus
}
"
)
unless
exitstatus
==
0
...
...
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