Determining dependencies of an ATS file?

31 views
Skip to first unread message

Shea Levy

unread,
Apr 26, 2015, 7:59:12 AM4/26/15
to ats-lan...@googlegroups.com
Hi all,

I'm working on a nix library for building ATS projects, and I was wondering if
there's a good way to determine what other files a given file depends on (i.e.
via staload, dynload, #inlcude). Currently I'm just grepping for those keywords
and doing some sed magic, but it would be nice if I could get that info from the
compiler somehow.

Thanks,
Shea

gmhwxi

unread,
Apr 26, 2015, 10:15:21 AM4/26/15
to ats-lan...@googlegroups.com
You can get the dependency information by using the -dep or --depgen
flag. For instance,

patsopt --depgen -d foo.dats

The detailed usage of 'patsopt' is described in the following file:

http://ats-lang.sourceforge.net/RESOURCE/utils/atsoptman.html

Shea Levy

unread,
Apr 26, 2015, 11:40:14 AM4/26/15
to ats-lan...@googlegroups.com
Thanks!

This doesn't seem to work for sats files:

$ patsopt --depgen -s include/elvysh/filedes.sats
include/elvysh/filedes_sats.o :

$ grep staload include/elvysh/filedes.sats
staload "elvysh/errno.sats"
staload "elvysh/partially-initialized-array.sats"

Thanks,
Shea
> --
> You received this message because you are subscribed to the Google Groups "ats-lang-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to ats-lang-user...@googlegroups.com.
> To post to this group, send email to ats-lan...@googlegroups.com.
> Visit this group at http://groups.google.com/group/ats-lang-users.
> To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/6c2104d0-a883-43fb-b3e9-c181a292bbb3%40googlegroups.com.

gmhwxi

unread,
Apr 26, 2015, 12:46:44 PM4/26/15
to ats-lan...@googlegroups.com
Try:

cd include/elvysh
patsopt --depgen -s filedes.sats

Only dependency on local files will be generated.
Library files will be skpped.

Shea Levy

unread,
Apr 26, 2015, 6:01:10 PM4/26/15
to ats-lan...@googlegroups.com
Ah ha, adding -IATSinclude did it. Thanks!
> To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/310c427f-1292-4194-a052-d5104329edc5%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages