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
0ff41e72
Commit
0ff41e72
authored
Nov 14, 2015
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make ccache optional
parent
f7d2bcfc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
15 deletions
+25
-15
jmake
bin/jmake
+1
-3
rpmbb
bin/rpmbb
+1
-4
common
share/eterbuild/functions/common
+23
-8
No files found.
bin/jmake
View file @
0ff41e72
...
...
@@ -8,9 +8,7 @@ if [ "$1" = "-h" ] || [ "$1" = "--help" ] ; then
exit
0
fi
if
[
-z
"
$CCACHE_DISABLE
"
]
;
then
enable_ccache
fi
try_enable_ccache
"
$@
"
# get number of available processors
[
-n
"
$NPROCS
"
]
||
NPROCS
=
`
/usr/bin/getconf _NPROCESSORS_ONLN
`
...
...
bin/rpmbb
View file @
0ff41e72
...
...
@@ -79,10 +79,7 @@ prepare_rpmdir
test
-z
"
$LISTNAMES
"
&&
fatal
"Please run with spec(s) name"
test
-n
"
$LISTRPMARGS
"
&&
echog
"Run
$RPMBUILD
with options: '
$LISTRPMARGS
'"
# enable ccache using
if
[
-n
"
$CCACHE_ENABLE
"
]
;
then
enable_ccache
fi
try_enable_ccache
# instead cbuild req
if
[
-n
"
$BUILDREQ
"
]
;
then
...
...
share/eterbuild/functions/common
View file @
0ff41e72
...
...
@@ -484,20 +484,35 @@ is_ssh_target()
rhas
"
$1
"
":"
}
enable_ccache
()
try_
enable_ccache
()
{
which ccache
>
/dev/null
||
fatal
"Install ccache package before using"
if
[
-n
"
$CCACHE_DISABLE
"
]
;
then
info
"ccache disabled by CCACHE_DISABLE var"
return
fi
if
!
which ccache
>
/dev/null
;
then
info
"No ccache (from ccache package)"
return
fi
# TODO: add support for clang
# TODO: check for work with scan-build (clang-analizer)
# handled in gcc-common
export
GCC_USE_CCACHE
=
1
# step to gcc-common
export
CC
=
gcc
CXX
=
g++
#export CC="ccache gcc"
#export CPP="ccache gcc -E"
#export CXX="ccache g++"
#export CXXCPP="ccache g++ -E"
if
[
-n
"
$CXX$CC
"
]
;
then
info
"CXX=
$CXX
CC=
$CC
already exists, skip setting"
return
fi
if
rhas
"
$*
"
"C[CX].?="
;
then
info
"ran with CXX= or CC= in args '
$*
', skip setting"
return
fi
# step to gcc-common
export
CC
=
gcc
CXX
=
g++
}
...
...
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