From: Richard W.M. Jones Date: Fri, 3 Jan 2020 19:19:01 +0000 (+0000) Subject: build: Fix ocamldep invocation. X-Git-Tag: v'0.2'~91 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=eaa22cca2ae85beff5b6f981e084fc9d9b57f202;p=goals.git build: Fix ocamldep invocation. --- diff --git a/Goalfile.in b/Goalfile.in index 07fd682..0990d6a 100644 --- a/Goalfile.in +++ b/Goalfile.in @@ -74,15 +74,14 @@ goal maintainer-clean = : clean { # XXX Goalfile itself depends on this and we should probably have a # way to reevaluate it. # XXX Atomic output. -# XXX GNU sed: https://unix.stackexchange.com/a/13704 "src/.depend" : { rm -f %@ %@-t # Like many existing tools, ocamldep produces make-compatible # output which doesn't work directly in goals. - %OCAMLDEP src/*.ml src/*.mli | - sed ':x; /\\$/ { N; s/\\\n//; tx }' | - sed 's,[./[:alnum:]]\+,"&",g' | - sed 's,.*,& ;,' > %@-t + %OCAMLDEP -all -one-line src/*.ml src/*.mli | + sed 's|[./[:alnum:]]\+|"&"|g' | + sed 's|" "|", "|g' | + sed 's|.*|& ;|' > %@-t mv %@-t %@ }