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
d326d332
Commit
d326d332
authored
Feb 04, 2017
by
Kazushi (Jam) Marukawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change to add `-j` flag at only compile-time
parent
ab5491fd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
8 deletions
+12
-8
crew
crew
+2
-0
lib/package.rb
lib/package.rb
+10
-8
No files found.
crew
View file @
d326d332
...
...
@@ -218,7 +218,9 @@ end
def
build_and_preconfigure
(
target_dir
)
Dir
.
chdir
target_dir
do
puts
"Building from source, this may take a while..."
@pkg
.
in_build
=
true
@pkg
.
build
@pkg
.
in_build
=
false
system
"rm -rf"
,
CREW_DEST_DIR
+
"/*"
#wipe crew destdir
puts
"Preconfiguring package..."
@pkg
.
install
...
...
lib/package.rb
View file @
d326d332
...
...
@@ -5,7 +5,7 @@ class Package
class
<<
self
attr_reader
:dependencies
,
:is_fake
attr_accessor
:name
attr_accessor
:name
,
:in_build
end
def
self
.
depends_on
(
dependency
=
nil
)
@dependencies
=
[]
unless
@dependencies
...
...
@@ -28,13 +28,15 @@ class Package
end
def
self
.
system
(
*
args
)
# 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
}
"
)
# add "-j#{CREW_NPROC}" argument to "make" at only compile-time
if
@in_build
==
true
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
end
Kernel
.
system
(
*
args
)
exitstatus
=
$?
.
exitstatus
...
...
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