FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
node/tools/wafadmin/Tools/ar.py at https · reado/node · GitHub
reado
node
Repository navigation
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
node
/
tools
/
wafadmin
/
Tools
/
ar.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
36 lines (28 loc) · 861 Bytes
Breadcrumbs
node
/
tools
/
wafadmin
/
Tools
/
ar.py
Copy path
File metadata and controls
36 lines (28 loc) · 861 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env python
# encoding: utf-8
# Thomas Nagy, 2006-2008 (ita)
# Ralf Habacker, 2006 (rh)
"ar and ranlib"
import
os
,
sys
import
Task
,
Utils
from
Configure
import
conftest
ar_str
=
'${AR} ${ARFLAGS} ${AR_TGT_F}${TGT} ${AR_SRC_F}${SRC}'
cls
=
Task
.
simple_task_type
(
'static_link'
,
ar_str
,
color
=
'YELLOW'
,
ext_in
=
'.o'
,
ext_out
=
'.bin'
,
shell
=
False
)
cls
.
maxjobs
=
1
cls
.
install
=
Utils
.
nada
# remove the output in case it already exists
old
=
cls
.
run
def
wrap
(
self
):
try
:
os
.
remove
(
self
.
outputs
[
0
].
abspath
(
self
.
env
))
except
OSError
:
pass
return
old
(
self
)
setattr
(
cls
,
'run'
,
wrap
)
def
detect
(
conf
):
conf
.
find_program
(
'ar'
,
var
=
'AR'
)
conf
.
find_program
(
'ranlib'
,
var
=
'RANLIB'
)
conf
.
env
.
ARFLAGS
=
'rcs'
@
conftest
def
find_ar
(
conf
):
v
=
conf
.
env
conf
.
check_tool
(
'ar'
)
if
not
v
[
'AR'
]:
conf
.
fatal
(
'ar is required for static libraries - not found'
)
Back
|
FazBrowse Home
|
New Git URL