aboutsummaryrefslogtreecommitdiff
path: root/clpm.icl
diff options
context:
space:
mode:
authorCamil Staps2017-02-07 10:10:26 +0100
committerCamil Staps2017-02-07 10:10:26 +0100
commit78dcf0bcbf0abeb922f32e57a1763f2a2ea43fff (patch)
treeb6887e981e4759d3f97381de7acf724a873be954 /clpm.icl
parentAdd very basic installation task (diff)
Make main module optional
Diffstat (limited to 'clpm.icl')
-rw-r--r--clpm.icl4
1 files changed, 3 insertions, 1 deletions
diff --git a/clpm.icl b/clpm.icl
index a3382d1..b2fa764 100644
--- a/clpm.icl
+++ b/clpm.icl
@@ -103,13 +103,15 @@ where
cmd_make :: [String] Package *File *World -> *(*File, *World)
cmd_make opts pkg io w
+| isNothing pkg.main
+ = (io <<< "This package does not have a main module.\r\n", w)
# (ps,w) = getRecursivePaths pkg w
| isError ps
= (io <<< fromError ps <<< "\r\n", w)
# ps = fromOk ps
# (r,w) = syscall (foldl (+) "clm" [" -I " + p \\ p <- ps] +
foldl (+) "" [" " + f \\ f <- optionsToFlags pkg.options ++ opts] +
- " " + pkg.main + " -o " + pkg.main) w
+ " " + fromJust pkg.main + " -o " + fromJust pkg.main) w
= (io,w)
parseArgs :: (Arguments [String] -> ([String], Arguments))