Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
clean-and-itasks
clean-ide
Commits
cf856b46
Commit
cf856b46
authored
Apr 11, 2019
by
Mart Lubbers
Browse files
rework to match the style and be more os independent
parent
e6518ebe
Pipeline
#20994
passed with stage
in 56 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Pm/PmDriver.icl
View file @
cf856b46
...
@@ -833,18 +833,18 @@ step intr (DLink ds=:{ok, newpaths, fileinfo, libsinfo, modpaths, abccache, proj
...
@@ -833,18 +833,18 @@ step intr (DLink ds=:{ok, newpaths, fileinfo, libsinfo, modpaths, abccache, proj
// runtime objects and dynamic libs
// runtime objects and dynamic libs
#
stdl
=
Concat
sys_libs
(
standardStaticLibraries
tp
lo
.
method
)
#
stdl
=
Concat
sys_libs
(
standardStaticLibraries
tp
lo
.
method
)
#
stdo
=
Concat
sys_objs
(
standardObjectFiles
ao
.
stack_traces
ao
.
profiling
tp
use_64_bit_processor
)
#
stdo
=
Concat
sys_objs
(
standardObjectFiles
ao
.
stack_traces
ao
.
profiling
tp
use_64_bit_processor
)
#
(
(
stdoOk
,
ofiles
,
abcPathsCache
)
,
ps
)
#
(
stdoOk
,
ofiles
,
abcPathsCache
,
ps
)
=
case
ao
.
standard_rte
of
=
case
ao
.
standard_rte
of
True
->
accFiles
(
AccTuple4
(
GetPathNames
(
Map
(\
x
->(
""
,
x
))
stdo
)
Nil
srcpaths
abcPathsCache
))
ps
True
->
GetPathNames
(
Map
(\
x
->(
""
,
x
))
stdo
)
Nil
srcpaths
abcPathsCache
ps
False
->
(
(
True
,
Nil
,
abcPathsCache
)
,
ps
)
False
->
(
True
,
Nil
,
abcPathsCache
,
ps
)
|
not
stdoOk
|
not
stdoOk
#
line
=
Level3
[
"Link error: File: '"
+++
(
Head
ofiles
)
+++
"' not found."
]
#
line
=
Level3
[
"Link error: File: '"
+++
(
Head
ofiles
)
+++
"' not found."
]
#
ps
=
showInfo
line
ps
#
ps
=
showInfo
line
ps
=
continue
False
newpaths
False
fileinfo
libsinfo
modpaths
project
intr
(
abccache
,
ps
)
=
continue
False
newpaths
False
fileinfo
libsinfo
modpaths
project
intr
(
abccache
,
ps
)
#
(
(
stdlOk
,
lfiles
,
abcPathsCache
)
,
ps
)
#
(
stdlOk
,
lfiles
,
abcPathsCache
,
ps
)
=
case
ao
.
standard_rte
of
=
case
ao
.
standard_rte
of
True
->
accFiles
(
AccTuple4
(
GetPathNames
(
Map
(\
x
->(
""
,
x
))
stdl
)
Nil
srcpaths
abcPathsCache
))
ps
True
->
GetPathNames
(
Map
(\
x
->(
""
,
x
))
stdl
)
Nil
srcpaths
abcPathsCache
ps
False
->
(
(
True
,
Nil
,
abcPathsCache
)
,
ps
)
False
->
(
True
,
Nil
,
abcPathsCache
,
ps
)
|
not
stdlOk
|
not
stdlOk
#
line
=
Level3
[
"Link error: File: '"
+++
(
Head
lfiles
)
+++
"' not found."
]
#
line
=
Level3
[
"Link error: File: '"
+++
(
Head
lfiles
)
+++
"' not found."
]
#
ps
=
showInfo
line
ps
#
ps
=
showInfo
line
ps
...
@@ -870,12 +870,12 @@ step intr (DLink ds=:{ok, newpaths, fileinfo, libsinfo, modpaths, abccache, proj
...
@@ -870,12 +870,12 @@ step intr (DLink ds=:{ok, newpaths, fileinfo, libsinfo, modpaths, abccache, proj
// module imported objects and dynamic libs
// module imported objects and dynamic libs
#
(
objs
,
libs
)
=
PR_GetABCLinkInfo
project
#
(
objs
,
libs
)
=
PR_GetABCLinkInfo
project
#
linkObjFileNames
=
Map
(\(
d
,
a
)->(
d
,
append_object_file_extension_if_dot_at_end
tp
use_64_bit_processor
a
))
objs
#
linkObjFileNames
=
Map
(\(
d
,
a
)->(
d
,
append_object_file_extension_if_dot_at_end
tp
use_64_bit_processor
a
))
objs
#
(
(
objPathsOk
,
ofiles
,
abcPathsCache
)
,
ps
)
#
(
objPathsOk
,
ofiles
,
abcPathsCache
,
ps
)
=
accFiles
(
AccTuple4
(
GetPathNames
linkObjFileNames
ofiles
srcpaths
abcPathsCache
))
ps
=
GetPathNames
linkObjFileNames
ofiles
srcpaths
abcPathsCache
ps
#
(
(_,
ofiles`
,
abcPathsCache
)
,
ps
)
#
(_,
ofiles`
,
abcPathsCache
,
ps
)
=
accFiles
(
AccTuple4
(
GetPathNames
/*abcLinkInfo.*/
linkObjFileNames
ofiles`
srcpaths
abcPathsCache
))
ps
=
GetPathNames
/*abcLinkInfo.*/
linkObjFileNames
ofiles`
srcpaths
abcPathsCache
ps
#
(
(
libPathsOk
,
lfiles
,
abcPathsCache
)
,
ps
)
#
(
libPathsOk
,
lfiles
,
abcPathsCache
,
ps
)
=
accFiles
(
AccTuple4
(
GetPathNames
libs
lfiles
srcpaths
abcPathsCache
))
ps
=
GetPathNames
libs
lfiles
srcpaths
abcPathsCache
ps
|
not
objPathsOk
|
not
objPathsOk
#
line
=
Level3
[
"Link error: File: '"
+++
(
Head
ofiles
)
+++
"' not found."
]
#
line
=
Level3
[
"Link error: File: '"
+++
(
Head
ofiles
)
+++
"' not found."
]
#
ps
=
showInfo
line
ps
#
ps
=
showInfo
line
ps
...
@@ -1598,23 +1598,17 @@ CheckExecOutOfDate gen execpath fileinfo project ps
...
@@ -1598,23 +1598,17 @@ CheckExecOutOfDate gen execpath fileinfo project ps
=
(
False
,
ps
)
=
(
False
,
ps
)
//-- dircache functions
//-- dircache functions
GetPathNames
::
!(
List
(
String
,
String
))
!(
List
String
)
!(
List
String
)
!*
DirCache
!*
Files
->
(.
Bool
,
List
String
,!*
DirCache
,
!*
Files
)
GetPathNames
::
!(
List
(
String
,
String
))
!(
List
String
)
!(
List
String
)
!*
DirCache
!*
GeneralSt
->
(.
Bool
,
List
String
,!*
DirCache
,
!*
GeneralSt
)
GetPathNames
Nil
acc
srcpaths
cache
file
s
GetPathNames
Nil
acc
srcpaths
cache
p
s
=
(
True
,
acc
,
cache
,
file
s
)
=
(
True
,
acc
,
cache
,
p
s
)
GetPathNames
((
mod
,
fn
):!
fns
)
acc
srcpaths
cache
file
s
GetPathNames
((
mod
,
fn
):!
fns
)
acc
srcpaths
cache
p
s
#
(
ok
,
pn
,_,
cache
)
=
DC_Search
fn
cache
#
(
ok
,
pn
,_,
cache
)
=
DC_Search
fn
cache
|
ok
|
ok
=
GetPathNames
fns
(
pn
+++
DirSeparatorString
+++
fn
:!
acc
)
srcpaths
cache
file
s
=
GetPathNames
fns
(
pn
+++
DirSeparatorString
+++
fn
:!
acc
)
srcpaths
cache
p
s
#
((
ok
,
pn
),
files
)
=
FindHModule
(
dropLastComponent
mod
(
size
mod
-
2
))
(
"/Clean System Files/"
+++
fn
)
srcpaths
file
s
#
((
ok
,
pn
),
ps
)
=
accFiles
(
FindHModule
mod
(
DirSeparatorString
+++
SystemDir
+++
DirSeparatorString
+++
fn
)
srcpaths
)
p
s
|
ok
|
ok
=
GetPathNames
fns
(
pn
:!
acc
)
srcpaths
cache
files
=
GetPathNames
fns
(
pn
:!
acc
)
srcpaths
cache
ps
=
(
False
,
(
fn
:!
Nil
),
cache
,
files
)
=
(
False
,
(
fn
:!
Nil
),
cache
,
ps
)
where
dropLastComponent
::
!
String
!
Int
->
!
String
dropLastComponent
s
0
=
s
dropLastComponent
s
i
|
s
.[
i
]
==
'.'
=
s
%
(
0
,
i
-1
)
=
dropLastComponent
s
(
i
-
1
)
// Lookup Module Paths in Directory Cache
// Lookup Module Paths in Directory Cache
LookupModulePaths
::
!(
List
.
String
)
!*
DirCache
!*
Files
->
(
Bool
,.[!
ModuleDirAndName
],*
DirCache
,!*
Files
);
LookupModulePaths
::
!(
List
.
String
)
!*
DirCache
!*
Files
->
(
Bool
,.[!
ModuleDirAndName
],*
DirCache
,!*
Files
);
...
...
Pm/PmProject.icl
View file @
cf856b46
...
@@ -750,7 +750,17 @@ PR_GetABCLinkInfo project=:{inflist}
...
@@ -750,7 +750,17 @@ PR_GetABCLinkInfo project=:{inflist}
#
allLinkInfoRecords
=
map
toRecord
(
StrictListToList
inflist
);
#
allLinkInfoRecords
=
map
toRecord
(
StrictListToList
inflist
);
=
foldl
mergeTwoRecords
emptyRecord
allLinkInfoRecords
;
=
foldl
mergeTwoRecords
emptyRecord
allLinkInfoRecords
;
where
where
toRecord
{
InfListItem
|
mn
,
info
={
abcLinkInfo
}}
=
(
Map
(\
x
->(
mn
,
x
))
abcLinkInfo
.
linkObjFileNames
,
Map
(\
x
->(
mn
,
x
))
abcLinkInfo
.
linkLibraryNames
)
toRecord
{
InfListItem
|
mn
,
info
={
abcLinkInfo
}}
=
(
Map
mkHierarchical
abcLinkInfo
.
linkObjFileNames
,
Map
mkHierarchical
abcLinkInfo
.
linkLibraryNames
)
where
mkHierarchical
file
=
(
removeLastComponent
mn
(
size
mn
-
2
),
file
)
removeLastComponent
s
0
=
""
removeLastComponent
s
i
|
s
.[
i
]
==
'.'
=
s
%
(
0
,
i
-1
)
=
removeLastComponent
s
(
i
-1
)
mergeTwoRecords
(
objs
,
libs
)
(
cobjs
,
clibs
)
=
(
UnionList
objs
cobjs
,
UnionList
libs
clibs
)
mergeTwoRecords
(
objs
,
libs
)
(
cobjs
,
clibs
)
=
(
UnionList
objs
cobjs
,
UnionList
libs
clibs
)
emptyRecord
=
(
Nil
,
Nil
);
emptyRecord
=
(
Nil
,
Nil
);
...
...
Write
Preview
Supports
Markdown
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