Insert @generated marker into generated Scheme files

* `@generated` is a marked used by Phabricator to mark generated files,
  any other marker would do
* it's easier to explore source tree when it's clear which files are sources
  and which are generated
This commit is contained in:
Stiopa Koltsov 2020-06-21 19:32:49 +01:00
parent dcf4c88e8c
commit ac329c337c
3 changed files with 4 additions and 1 deletions

View File

@ -71,6 +71,7 @@ escapeString s = pack $ foldr escape [] $ unpack s
schHeader : String -> List String -> String schHeader : String -> List String -> String
schHeader chez libs schHeader chez libs
= (if os /= "windows" then "#!" ++ chez ++ " --script\n\n" else "") ++ = (if os /= "windows" then "#!" ++ chez ++ " --script\n\n" else "") ++
"; @generated\n" ++
"(import (chezscheme))\n" ++ "(import (chezscheme))\n" ++
"(case (machine-type)\n" ++ "(case (machine-type)\n" ++
" [(i3le ti3le a6le ta6le) (load-shared-object \"libc.so.6\")]\n" ++ " [(i3le ti3le a6le ta6le) (load-shared-object \"libc.so.6\")]\n" ++

View File

@ -39,7 +39,8 @@ findGSC =
pure $ fromMaybe "/usr/bin/env gsc" env pure $ fromMaybe "/usr/bin/env gsc" env
schHeader : String schHeader : String
schHeader = "(declare (block) schHeader = "; @generated\n
(declare (block)
(inlining-limit 450) (inlining-limit 450)
(standard-bindings) (standard-bindings)
(extended-bindings) (extended-bindings)

View File

@ -40,6 +40,7 @@ findRacoExe =
schHeader : String -> String schHeader : String -> String
schHeader libs schHeader libs
= "#lang racket/base\n" ++ = "#lang racket/base\n" ++
"; @generated\n" ++
"(require racket/math)\n" ++ -- for math ops "(require racket/math)\n" ++ -- for math ops
"(require racket/system)\n" ++ -- for system "(require racket/system)\n" ++ -- for system
"(require rnrs/bytevectors-6)\n" ++ -- for buffers "(require rnrs/bytevectors-6)\n" ++ -- for buffers