Commit 7d1b0f6c authored by Michael Hanus 's avatar Michael Hanus
Browse files

Absolute path names removed in installation of tools

parent ac817b4f
......@@ -23,7 +23,7 @@ currydoc/CurryDoc
currytest/CurryTest
cusage/CheckUsage
ertools/ERD2CDBI
ertools/erd2curry
ertools/ERD2Curry
importcalls/ImportCalls
optimize/bindingopt
optimize/binding_optimization/BindingOpt
......
......@@ -6,9 +6,10 @@ import AbstractCurry.Pretty
import Database.ERD
import Database.ERDGoodies
import Directory
import Distribution (curryCompiler)
import Distribution (curryCompiler, installDir)
import FilePath ((</>))
import List (isSuffixOf)
import System (exitWith, getArgs,system)
import System (exitWith, getArgs, system)
import Time
import XML
......@@ -19,17 +20,19 @@ import ERD2Graph
systemBanner :: String
systemBanner =
let bannerText = "ERD->Curry Compiler (Version of 12/11/16)"
let bannerText = "ERD->Curry Compiler (Version of 12/01/17)"
bannerLine = take (length bannerText) (repeat '-')
in bannerLine ++ "\n" ++ bannerText ++ "\n" ++ bannerLine
--- Main function for saved state. The argument is the directory containing
--- these sources.
main :: String -> IO ()
main erd2currydir = do
main :: IO ()
main = do
putStrLn systemBanner
args <- getArgs
configs <- parseArgs ("",False,SQLite ".",False,False) args
-- the directory containing the sources of this tool:
let erd2currydir = installDir </> "currytools" </> "ertools"
callStart erd2currydir configs
parseArgs :: (String,Bool,Storage,Bool,Bool) -> [String]
......@@ -129,10 +132,10 @@ start erd2currydir opt fromxml trerdt srcfile path = do
-- Copy auxiliary files ERDGeneric.curry and KeyDatabase.curry to target dir
copyAuxiliaryFiles = do
if isSQLite opt
then copyFile (erd2currydir++"/KeyDatabase.curry.sqlite")
then copyFile (erd2currydir </> "KeyDatabase.curry.sqlite")
(addPath path "KeyDatabase.curry")
else done
copyFile (erd2currydir++"/ERDGeneric.curry")
copyFile (erd2currydir </> "ERDGeneric.curry")
(addPath path "ERDGeneric.curry")
showOption _ (Files f,_) = "database files stored in directory '"++f++"'"
......
......@@ -23,11 +23,11 @@ DEPSERD2CDBI = ERD2CDBI.curry $(ROOT)/lib/Database/ERD*.curry \
all: install
compile: erd2curry ERD2CDBI
compile: ERD2Curry ERD2CDBI
install: compile
rm -f $(ERD2CURRY) $(ERD2CDBI) $(BINDIR)/erd2curry $(BINDIR)/erd2cdbi
cd $(BINDIR) && ln -s ../currytools/ertools/erd2curry $(notdir $(ERD2CURRY))
cd $(BINDIR) && ln -s ../currytools/ertools/ERD2Curry $(notdir $(ERD2CURRY))
cd $(BINDIR) && ln -s ../currytools/ertools/ERD2CDBI $(notdir $(ERD2CDBI))
clean:
......@@ -37,9 +37,8 @@ clean:
uninstall: clean
rm -f $(ERD2CURRY) $(ERD2CDBI)
erd2curry: $(DEPSERD2CURRY)
$(REPL) $(REPL_OPTS) :load ERD2Curry :save "main \"$(CURDIR)\"" :q
mv ERD2Curry $@
ERD2Curry: $(DEPSERD2CURRY)
$(REPL) $(REPL_OPTS) :load ERD2Curry :save :quit
ERD2CDBI: $(DEPSERD2CDBI)
$(REPL) $(REPL_OPTS) :load ERD2CDBI :save :quit
......@@ -10,7 +10,7 @@ import SpiceyScaffolding
systemBanner :: String
systemBanner =
let bannerText = "Spicey Web Framework (Version of 12/11/16)"
let bannerText = "Spicey Web Framework (Version of 12/01/17)"
bannerLine = take (length bannerText) (repeat '-')
in bannerLine ++ "\n" ++ bannerText ++ "\n" ++ bannerLine
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment