Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
inox
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LARA
inox
Commits
135ab347
Commit
135ab347
authored
14 years ago
by
Philippe Suter
Browse files
Options
Downloads
Patches
Plain Diff
finally, clean works :)
parent
efbca75c
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
project/build/funcheck.scala
+37
-24
37 additions, 24 deletions
project/build/funcheck.scala
with
37 additions
and
24 deletions
project/build/funcheck.scala
+
37
−
24
View file @
135ab347
import
sbt._
class
FunCheckProject
(
info
:
ProjectInfo
)
extends
Paren
tProject
(
info
)
with
FileTasks
{
class
FunCheckProject
(
info
:
ProjectInfo
)
extends
Defaul
tProject
(
info
)
with
FileTasks
{
override
def
outputDirectoryName
=
"bin"
override
def
dependencyPath
=
"lib"
override
def
shouldCheckOutputDirectories
=
false
...
...
@@ -11,35 +11,50 @@ class FunCheckProject(info: ProjectInfo) extends ParentProject(info) with FileTa
val
scriptPath
:
Path
=
"."
/
"scalac-funcheck"
lazy
val
all
=
fileTask
(
scriptPath
::
Nil
)(
allActions
)
dependsOn
(
plugin
.
`package`
)
describedAs
(
"Compile everything and produce a script file."
)
def
allActions
:
Option
[
String
]
=
{
val
nl
=
System
.
getProperty
(
"line.separator"
)
val
f
=
scriptPath
.
asFile
val
fw
=
new
java
.
io
.
FileWriter
(
f
)
fw
.
write
(
"#!/bin/sh"
+
nl
)
fw
.
write
(
"LD_LIBRARY_PATH="
+
(
"."
/
"lib-bin"
).
absolutePath
+
" \\"
+
nl
)
fw
.
write
(
"java \\"
+
nl
)
val
libStr
=
(
buildLibraryJar
.
absolutePath
).
toString
fw
.
write
(
" -Dscala.home="
+
libStr
.
substring
(
0
,
libStr
.
length
-
21
)
+
" \\"
+
nl
)
fw
.
write
(
" -classpath \\"
+
nl
)
fw
.
write
(
" "
+
buildLibraryJar
.
absolutePath
+
":"
)
fw
.
write
(
buildCompilerJar
.
absolutePath
+
":"
)
fw
.
write
(
purescala
.
jarPath
.
absolutePath
+
":"
)
fw
.
write
(
plugin
.
jarPath
.
absolutePath
+
":"
)
fw
.
write
((
"lib"
/
"z3.jar"
).
absolutePath
+
" \\"
+
nl
)
fw
.
write
(
" scala.tools.nsc.Main -Xplugin:"
+
plugin
.
jarPath
.
absolutePath
+
" $@"
+
nl
)
fw
.
close
f
.
setExecutable
(
true
)
lazy
val
all
=
fileTask
(
scriptPath
::
Nil
)(
generateScript
)
dependsOn
(
purescala
.
`package`
,
plugin
.
`package`
)
describedAs
(
"Compile everything and produce a script file."
)
override
def
cleanAction
=
super
.
cleanAction
dependsOn
(
deleteScript
)
lazy
val
deletescr
=
deleteScript
def
deleteScript
=
task
{
scriptPath
.
asFile
.
delete
None
}
def
generateScript
:
Option
[
String
]
=
{
try
{
val
nl
=
System
.
getProperty
(
"line.separator"
)
val
f
=
scriptPath
.
asFile
val
fw
=
new
java
.
io
.
FileWriter
(
f
)
fw
.
write
(
"#!/bin/sh"
+
nl
)
fw
.
write
(
"LD_LIBRARY_PATH="
+
(
"."
/
"lib-bin"
).
absolutePath
+
" \\"
+
nl
)
fw
.
write
(
"java \\"
+
nl
)
// This is a hack :(
val
libStr
=
(
buildLibraryJar
.
absolutePath
).
toString
fw
.
write
(
" -Dscala.home="
+
libStr
.
substring
(
0
,
libStr
.
length
-
21
)
+
" \\"
+
nl
)
fw
.
write
(
" -classpath \\"
+
nl
)
fw
.
write
(
" "
+
buildLibraryJar
.
absolutePath
+
":"
)
fw
.
write
(
buildCompilerJar
.
absolutePath
+
":"
)
fw
.
write
(
purescala
.
jarPath
.
absolutePath
+
":"
)
fw
.
write
(
plugin
.
jarPath
.
absolutePath
+
":"
)
fw
.
write
((
"lib"
/
"z3.jar"
).
absolutePath
+
" \\"
+
nl
)
fw
.
write
(
" scala.tools.nsc.Main -Xplugin:"
+
plugin
.
jarPath
.
absolutePath
+
" $@"
+
nl
)
fw
.
close
f
.
setExecutable
(
true
)
None
}
catch
{
case
e
=>
Some
(
"There was an error while generating the script file: "
+
e
.
getLocalizedMessage
)
}
}
sealed
abstract
class
PersonalizedProject
(
info
:
ProjectInfo
)
extends
DefaultProject
(
info
)
{
override
def
dependencyPath
=
"lib"
override
def
outputDirectoryName
=
"bin"
override
def
compileOptions
=
super
.
compileOptions
++
Seq
(
Unchecked
)
}
class
PureScalaProject
(
info
:
ProjectInfo
)
extends
PersonalizedProject
(
info
)
{
override
def
outputPath
=
"bin"
/
"purescala"
override
def
mainScalaSourcePath
=
"src"
/
"purescala"
...
...
@@ -50,8 +65,6 @@ class FunCheckProject(info: ProjectInfo) extends ParentProject(info) with FileTa
override
def
mainScalaSourcePath
=
"src"
/
"funcheck"
override
def
unmanagedClasspath
=
super
.
unmanagedClasspath
+++
purescala
.
jarPath
override
def
mainResourcesPath
=
"resources"
/
"funcheck"
}
class
MultisetsProject
(
info
:
ProjectInfo
)
extends
PersonalizedProject
(
info
)
{
override
def
outputPath
=
"bin"
/
"multisets"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment