(index ("include-relative" 0))
(def (sig (syntax "(include-relative filename)" (id include-relative))) (p "This includes " (tt "filename") " just like " (tt "include") " would, but if you use " (tt "include-relative") " inside " (i "that") " file, it will include files relative to the directory in which " (tt "filename") " is located (include would instead just try to find the file relative to the topmost file you're compiling).") (p "This macro must be used to include Scheme 48 module/package files which use " (tt "files") " declarations to load external files.") (p "For example, this code:") (highlight scheme ";; file: /rootpath/foo.scm\n(include \"bar/qux.scm\")") (highlight scheme ";; file: /rootpath/bar/qux.scm\n(include \"mooh/blah.scm\")") (p "Would fail to load " (tt "/rootpath/bar/mooh/blah.scm") ". Instead, it gives an error because it is trying to load " (tt "/rootpath/mooh/blah.scm") ".") (p "Whereas this would work:") (highlight scheme ";; file: /rootpath/foo.scm\n(use s48-modules)\n(include-relative \"bar/qux.scm\")") (highlight scheme ";; file: /rootpath/bar/qux.scm\n(include-relative \"mooh/blah.scm\")"))
