From bfbe531f3341c59a92741d223b3194236b5433dd Mon Sep 17 00:00:00 2001 From: uz Date: Thu, 3 Jun 2010 12:02:26 +0000 Subject: [PATCH] New install script from Stefan Haubenthal that (among other things) sets CC65_HOME. git-svn-id: svn://svn.cc65.org/cc65/trunk@4681 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- packages/amiga/Install_cc65 | 44 +++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/packages/amiga/Install_cc65 b/packages/amiga/Install_cc65 index ff677d91d..bf7390701 100644 --- a/packages/amiga/Install_cc65 +++ b/packages/amiga/Install_cc65 @@ -1,42 +1,54 @@ -; $VER: Install_cc65 0.9 (Jul 9 2007) © Stefan Haubenthal +; $VER: Install_cc65 1.0 (2.6.2010) © Stefan Haubenthal -(set #help-bin "Choose location of archiver, assembler, compiler, compiler driver, disassembler, resource compiler, linker and object dumper.") -(set #help-inc "Choose location of ANSI and target platform headers. The new directory is called 'include'.") -(set #help-lib "Choose location of runtime objects and target platform libraries. The new directory is called 'lib'.") +(set #help-bin "Choose location of archiver, assembler, compiler, compiler driver, disassembler, resource compiler, linker, object dumper and character converter.") +(set #help-inc "Choose location of ANSI and target platform headers. The new directory is called 'include' resp. 'asminc'.") +(set #help-lib "Choose location of runtime objects and target platform libraries. The new directory is called 'lib'. If necessary CC65_LIB will be set.") + +(if (run "which sh") + (message "The compiler driver (cl65) is missing a Unix shell (sh).")) (copyfiles (source "//src/") (dest (set #dir-bin (askdir (prompt "Copy binaries (should be part of execution path)") (help #help-bin) (default @default-dest))) - (choices "ar65/ar65" "ca65/ca65" "cc65/cc65" "cl65/cl65" "da65/da65" "grc/grc" "ld65/ld65" "od65/od65") ) + (choices "ar65/ar65" "ca65/ca65" "cc65/cc65" "cl65/cl65" "da65/da65" "grc/grc" "ld65/ld65" "od65/od65" "co65/co65" "chrcvt/chrcvt") ) (complete 25) (copyfiles (source "//include/") (dest - (set #dir-inc (tackon (set #dir-inc0 (askdir (prompt "Copy headers (directory will be created)") (help #help-inc) (default @default-dest))) "include")) - (all) + (set #dir-inc (tackon (set #dir-home (askdir (prompt "Copy C headers (directory will be created)") (help #help-inc) (default @default-dest))) "include")) ) + (all) ) (complete 50) (copyfiles - (source "//libsrc/") + (source "//asminc/") (dest - (set #dir-lib (tackon (askdir (prompt "Copy libraries (directory will be created)") (help #help-lib) (default #dir-inc0)) "lib")) - (pattern "#?.(lib|o)") + (set #dir-inc (tackon (askdir (prompt "Copy assembler headers (directory will be created)") (help #help-inc) (default #dir-home)) "asminc")) ) + (all) ) (complete 75) -(run "setenv CC65_INC SAVE" #dir-inc (confirm) (prompt "Set environment variable for headers?") (help "CC65_INC will be saved in 'ENVARC:'.")) +(copyfiles + (source "//libsrc/") + (dest + (set #dir-lib (tackon (askdir (prompt "Copy libraries (directory will be created)") (help #help-lib) (default #dir-home)) "lib")) + ) + (pattern "#?.(lib|o)") +) + (complete 90) -(run "setenv CC65_LIB SAVE" #dir-lib (confirm) (prompt "Set environment variable for libraries?") (help "CC65_LIB will be saved in 'ENVARC:'".)) -(run "setenv CC65_INC" #dir-inc) -(run "setenv CC65_LIB" #dir-lib) -(run "resident cc" (tackon #dir-bin "cl65")) +(run "setenv CC65_HOME SAVE" #dir-home (confirm) (prompt "Set environment variable for compiler home?") (help "CC65_HOME will be saved in 'ENVARC:'.")) +;(if (not (= (tackon #dir-home "include") #dir-inc)) +; (run "setenv CC65_INC SAVE" #dir-inc) +(if (not (= (tackon #dir-home "lib") #dir-lib)) + (run "setenv CC65_LIB SAVE" #dir-lib)) +;(run "resident cc" (tackon #dir-bin "cl65")) (complete 100) -(message "The cross-compiler is now ready, just type 'cc -h' in a shell.") +(message "The cross-compiler is now ready, just type 'cl65 --help' in a shell.")