AtlatestRepositorysigil-ui

sigil-ui / tree / scriptstest-wayland-cursor-native.sgl

1#!/usr/bin/env sigil
2;;; Usage: sigil scripts/test-wayland-cursor-native.sgl HEADERS RUNTIME_ARCHIVE ALLOCATOR_OBJECT EVIDENCE_DIRECTORY [CURSOR_LIBRARY]
3;;; CC selects the C compiler (default cc); no compositor is required.
4(import (sigil shell prelude))
5(define compiler
6 (let ((configured (getenv "CC")))
7 (if configured
8 (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 evidence (arg 4))
12(ensure-directory evidence)
13(define executable (path evidence "cursor-native"))
14($ ,compiler -std=c11 -D_GNU_SOURCE -O1 -g -Wall -Wextra -Werror -Wno-unused-parameter
15 ,(str "-I" (arg 1)) ,(str "-I" (path root "native"))
16 ,(str "-I" (path root "native/wayland")) ,(str "-I" (path root "native/wayland/include"))
17 ,(path root "test/wayland/cursor-native.c") ,(arg 2) ,(arg 3)
18 -lm -ldl -lpthread -o ,executable timeout: 60)
19(define library (arg 5 default: #f))
20($ ,executable ,@(if library (list library) '()) timeout: 15)