AtlatestRepositorysigil-ui
1
#!/usr/bin/env sigil2
;;; Usage: sigil scripts/test-wayland-scroll-native.sgl HEADERS RUNTIME_ARCHIVE ALLOCATOR_OBJECT EVIDENCE_DIRECTORY3
;;; CC selects the C compiler (default cc); no compositor is required.4
(import (sigil shell prelude))5
(define compiler6
(let ((configured (getenv "CC")))7
(if configured8
(if (command-exists? configured) configured (error "CC is not executable" configured))9
(begin (requires (tools cc)) (tool-path 'cc)))))10
(define root (realpath (path (script-dir) "..")))11
(define headers (arg 1))12
(define archive (arg 2))13
(define allocator (arg 3))14
(define evidence (arg 4))15
(ensure-directory evidence)16
(define executable (path evidence "scroll-native"))17
($ ,compiler -std=c11 -D_GNU_SOURCE -O1 -g -Wall -Wextra -Werror -Wno-unused-parameter18
,(str "-I" headers) ,(str "-I" (path root "native"))19
,(str "-I" (path root "native/wayland")) ,(str "-I" (path root "native/wayland/include"))20
,(path root "test/wayland/scroll-native.c") ,archive ,allocator21
-lm -ldl -lpthread -o ,executable timeout: 60)22
($ ,executable timeout: 15)