0

I would like to compile all the .opa files in my src directory in a single command without having to specify each file manually, or having to specify them manually in a config file.

This is the parrallel issue in Java: Building Java package (javac to all files) And here: Compiling java files in all subfolders?

Do I need to do something with the makefile? Is there an Ant equivalent for Opa?

Community
  • 1
  • 1
Tails
  • 384
  • 3
  • 12

2 Answers2

1

opa src/*.opa should work ;)

Otherwise, it's just basic Makefile manipulation i guess.

Fred
  • 1,092
  • 5
  • 9
  • I tried this, but it results in the following: `Warning load-import File "src/bootstrap.opa", line 2, characters 0-19, (2:0-2:19 | 27-46) Cannot find any package that matches the import myproject.view. Hint: Perhaps you forgot to include some directories (-I option). Error Fatal warning: 'load-import' ` It can't find it's dependencies in this way. The `make run` command in conjunction with the config file works fine however. – Tails Jul 29 '12 at 12:51
1

Use opa create to generate example MVC application. It will contain basic Makefile and opa.conf files used to compile the whole project. Makefile contains commands to compile and run your project. Use command make see the result. File opa.conf describes dependencies between your *.opa files. Tool make allows to use filesystem wildcard and you should be able to change configuration files easily.

Take a look at the blog post introducing the opa create and the make manual (its long, because it has lots of features you probably wont need, but you may start with the examples)

Marcin Skórzewski
  • 2,784
  • 1
  • 13
  • 26
  • That is what I currently use. However, describing the dependencies in a single file is something I am not looking forward to. I would like to state the package and import requirements on a per-file basis. I will look into make's wildcard option. Thanks. – Tails Jul 29 '12 at 12:57