To clarify, I'd like a rule, where there is only a single input file (the swig file) and many output files (say, the generated Java source files).  In particular, I'd like the rule executed if any of the generated files are deleted.


On Mon, Feb 8, 2016 at 12:00 PM, <boost-build-request@lists.boost.org> wrote:


Message: 1
Date: Mon, 8 Feb 2016 10:36:16 -0500
From: Phillip Seaver <phil@apago.com>
To: steven@providere-consulting.com,    "Boost.Build developer's and
        user's list" <boost-build@lists.boost.org>
Subject: Re: [Boost-build] Target containing many files
Message-ID: <56B8B5F0.7080909@apago.com>
Content-Type: text/plain; charset=windows-1252

On 2/6/16 2:00 PM, Steven Watanabe wrote:
> AMDG
>
> On 02/06/2016 10:24 AM, Deane Yang wrote:
>> Although I'm slowly learning how the guts of Boost Build works, I still
>> find a lot of it fairly opaque. Is it possible to have a target that
>> consists of more than one file? For example, I'd like to take the Java
>> files generated by SWIG and feed them into javac. Is there a way to do
>> this? I apologize if this is already explained in the documentation.
>> Perhaps either an explicit example or a pointer to one in the documentation
>> would be very helpful.
>>
> This should work automatically.  This is not
> essentially different from .cpp -> .o -> .exe.
>

javac will generate a .class file for each class in the source, so it's
not necessarily a 1:1 correspondence, and you would have to parse the
.class file in order to determine what files will be generated.  That's
the problem I ran into when trying to create a generator.

"Inner class definitions produce additional class files." --
http://docs.oracle.com/javase/7/docs/technotes/tools/windows/javac.html

Phillip


------------------------------

Subject: Digest Footer

_______________________________________________
Boost-build mailing list
Boost-build@lists.boost.org
Unsubscribe and other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build


------------------------------

End of Boost-build Digest, Vol 126, Issue 7
*******************************************