mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-28 09:28:54 -06:00
copy copies everything from dist, not just specified modules
This was problematic when copying only a module and not its dependents.
This commit is contained in:
14
Make.hs
14
Make.hs
@@ -31,18 +31,18 @@ buildRGL args = do
|
||||
info <- mkInfo
|
||||
mapM_ (\cmd -> cmdAction cmd modes args info) cmds
|
||||
|
||||
-- | Copy from dist to install location
|
||||
-- | Copy everything from dist to install location
|
||||
copyRGL :: [String] -> IO ()
|
||||
copyRGL args = do
|
||||
let modes = getOptMode args
|
||||
info <- mkInfo
|
||||
gf_lib_dir <- maybe (die errLocation) return (infoInstallDir info)
|
||||
let files = getOptModules args
|
||||
if not (null files)
|
||||
then do
|
||||
-- Copy single files
|
||||
sequence_ [copyOne (flip addExtension "gfo" . dropExtension . takeFileName $ file) (getRGLBuildDir info mode) (gf_lib_dir </> getRGLBuildSubDir mode)|file<-files, mode<-modes]
|
||||
else do
|
||||
-- let files = getOptModules args
|
||||
-- if not (null files)
|
||||
-- then do
|
||||
-- -- Copy single files
|
||||
-- sequence_ [copyOne (flip addExtension "gfo" . dropExtension . takeFileName $ file) (getRGLBuildDir info mode) (gf_lib_dir </> getRGLBuildSubDir mode)|file<-files, mode<-modes]
|
||||
-- else do
|
||||
-- Copy everything
|
||||
copyAll "prelude" (infoBuildDir info </> "prelude") (gf_lib_dir </> "prelude")
|
||||
sequence_ [copyAll (show mode) (getRGLBuildDir info mode) (gf_lib_dir </> getRGLBuildSubDir mode)|mode<-modes]
|
||||
|
||||
@@ -51,7 +51,7 @@ runghc Make.hs ...
|
||||
Where `...` is one of:
|
||||
```
|
||||
build [CMDS] [MODE] [--langs=[+|-]LANG,LANG,...] [--gf=...]
|
||||
copy [FILES] [MODE] [--dest=...]
|
||||
copy [MODE] [--dest=...]
|
||||
install [CMDS] [MODE] [--langs=[+|-]LANG,LANG,...] [--gf=...] [--dest=...]
|
||||
clean
|
||||
```
|
||||
@@ -64,12 +64,11 @@ clean
|
||||
`compat`,
|
||||
<!-- `pgf`, -->
|
||||
`parse`,
|
||||
or an explicit module name (e.g. `ExtraEng.gf`).
|
||||
or an explicit module name (e.g. `ExtraEng.gf`. You don't need to specify to language subdirectory, but there is a restriction that the module must exist in a **direct** subdirectory of `src`).
|
||||
- `MODE` is one of:
|
||||
`present`,
|
||||
`alltenses`
|
||||
(default is both).
|
||||
- `FILES` is a space separated list of module names (e.g. `ExtraEng.gf DictGer.gf`)
|
||||
- You can _override_ the default language list with `--langs=...`
|
||||
- You can _add_ languages to the default list with `--langs=+...`
|
||||
- You can _remove_ languages from the default list with `langs=-...`
|
||||
|
||||
Reference in New Issue
Block a user