Automatically compile all files of a project

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Automatically compile all files of a project

Norbert Melzer
Hi!

After long trying and studiing of foreign code I managed to compile multiple files (one class per file) with only one build.hxml. What I am searching now is a possibility to compile all files in one directory automatically. Actually I have to add everyone manually to my build.hxml AND debug.hxml. This way it is very easy to forget to add one file to one oft he hxml...

Besides... There should be an better description of using the hxml-files in the wiki. I dont think I have understood enough o fit of creating the article by my own.

TIA
Norbert


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Automatically compile all files of a project

edA-qa mort-ora-y
Norbert Melzer wrote:
> directory automatically. Actually I have to add everyone manually to
> my build.hxml AND debug.hxml. This way it is very easy to forget to
> add one file to one oft he hxml...

Consider using "make". It was built for such project management.

I use it for DHLIB and BigTPoker to manage many projects and related
resources.  The entirety of the website can be rebuilt with a single
command.

--
edA-qa mort-ora-y
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

BigTPoker uses haXe and DHLIB
        http://BigTPoker.com/?source=haxe-list

The dis-Emi-A haXe Library
        http://wiki.disemia.com/HaXe
       
A full set of tools, classes, and support facilities aimed at
simplifying and expediting game creation in Flash 9.

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Sign: Please digitally sign your emails.
Encrypt: I'm also happy to receive encrypted mail.


--
haXe - an open source web programming language
http://haxe.org

signature.asc (260 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: Automatically compile all files of a project

Norbert Melzer
> Norbert Melzer wrote:
> > directory automatically. Actually I have to add everyone manually to
> > my build.hxml AND debug.hxml. This way it is very easy to forget to
> > add one file to one oft he hxml...
>
> Consider using "make". It was built for such project management.

I read many times the documentation about make, but I dont get it :-) Same with ant and others...

But I will give it (another try)

> I use it for DHLIB and BigTPoker to manage many projects and related
> resources.  The entirety of the website can be rebuilt with a single
> command.
>
> --
> edA-qa mort-ora-y
> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>
> BigTPoker uses haXe and DHLIB
> http://BigTPoker.com/?source=haxe-list
>
> The dis-Emi-A haXe Library
> http://wiki.disemia.com/HaXe
>
> A full set of tools, classes, and support facilities aimed at
> simplifying and expediting game creation in Flash 9.
>
> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> Sign: Please digitally sign your emails.
> Encrypt: I'm also happy to receive encrypted mail.



--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Automatically compile all files of a project

Armén
The thing with haXe, it automatically compiles all classes that are
referenced. If your class A references B which references C which
references D, all four will be compiled.

Are you asking a way to have haXe compile UN-referenced classes? If
you don't want to bother with make and build.hxml, try the "import"
keyword in your main application class. You would have to manually
list them one by one though, which is the whole downside of dealing
with classes that are not referenced from anywhere.

As a last resort, if you did not make use of make (pun intended), use
the Unix shell if you are on one:

find . -name "*| sed -e 's/\.\/\(.*\)\.hx/\1/' -e 's/\//\./g' | tr '\n' ' '

This will find all .hx files in current directory, and filter the list
of these files through a stream editor to produce a list of properly
formatted class names (and their paths, dot-delimited), then replace
newline with spaces, so that classpaths are listed on one line, just
like haXe likes it. You must run this script in the directory where
your classpath is rooted at, otherwise you will get wrong class paths.
Also, I am not sure if this is smart with regards to command line
length, an alternative would be to generate a .hxml file with the list
of classes.

On Fri, Jul 31, 2009 at 09:44, Norbert Melzer<[hidden email]> wrote:

>> Norbert Melzer wrote:
>> > directory automatically. Actually I have to add everyone manually to
>> > my build.hxml AND debug.hxml. This way it is very easy to forget to
>> > add one file to one oft he hxml...
>>
>> Consider using "make". It was built for such project management.
>
> I read many times the documentation about make, but I dont get it :-) Same with ant and others...
>
> But I will give it (another try)
>
>> I use it for DHLIB and BigTPoker to manage many projects and related
>> resources.  The entirety of the website can be rebuilt with a single
>> command.
>>
>> --
>> edA-qa mort-ora-y
>> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>>
>> BigTPoker uses haXe and DHLIB
>>       http://BigTPoker.com/?source=haxe-list
>>
>> The dis-Emi-A haXe Library
>>       http://wiki.disemia.com/HaXe
>>
>> A full set of tools, classes, and support facilities aimed at
>> simplifying and expediting game creation in Flash 9.
>>
>> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>> Sign: Please digitally sign your emails.
>> Encrypt: I'm also happy to receive encrypted mail.
>
>
>
> --
> haXe - an open source web programming language
> http://haxe.org
>

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Automatically compile all files of a project

Armén
Sorry, mangled script, should be:

find . -name "*.hx" | sed -e 's/\.\/\(.*\)\.hx/\1/' -e 's/\//\./g' | tr '\n' ' '

On Fri, Jul 31, 2009 at 12:22, [hidden email]<[hidden email]> wrote:

> The thing with haXe, it automatically compiles all classes that are
> referenced. If your class A references B which references C which
> references D, all four will be compiled.
>
> Are you asking a way to have haXe compile UN-referenced classes? If
> you don't want to bother with make and build.hxml, try the "import"
> keyword in your main application class. You would have to manually
> list them one by one though, which is the whole downside of dealing
> with classes that are not referenced from anywhere.
>
> As a last resort, if you did not make use of make (pun intended), use
> the Unix shell if you are on one:
>
> find . -name "*| sed -e 's/\.\/\(.*\)\.hx/\1/' -e 's/\//\./g' | tr '\n' ' '
>
> This will find all .hx files in current directory, and filter the list
> of these files through a stream editor to produce a list of properly
> formatted class names (and their paths, dot-delimited), then replace
> newline with spaces, so that classpaths are listed on one line, just
> like haXe likes it. You must run this script in the directory where
> your classpath is rooted at, otherwise you will get wrong class paths.
> Also, I am not sure if this is smart with regards to command line
> length, an alternative would be to generate a .hxml file with the list
> of classes.
>
> On Fri, Jul 31, 2009 at 09:44, Norbert Melzer<[hidden email]> wrote:
>>> Norbert Melzer wrote:
>>> > directory automatically. Actually I have to add everyone manually to
>>> > my build.hxml AND debug.hxml. This way it is very easy to forget to
>>> > add one file to one oft he hxml...
>>>
>>> Consider using "make". It was built for such project management.
>>
>> I read many times the documentation about make, but I dont get it :-) Same with ant and others...
>>
>> But I will give it (another try)
>>
>>> I use it for DHLIB and BigTPoker to manage many projects and related
>>> resources.  The entirety of the website can be rebuilt with a single
>>> command.
>>>
>>> --
>>> edA-qa mort-ora-y
>>> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>>>
>>> BigTPoker uses haXe and DHLIB
>>>       http://BigTPoker.com/?source=haxe-list
>>>
>>> The dis-Emi-A haXe Library
>>>       http://wiki.disemia.com/HaXe
>>>
>>> A full set of tools, classes, and support facilities aimed at
>>> simplifying and expediting game creation in Flash 9.
>>>
>>> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>>> Sign: Please digitally sign your emails.
>>> Encrypt: I'm also happy to receive encrypted mail.
>>
>>
>>
>> --
>> haXe - an open source web programming language
>> http://haxe.org
>>
>

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

RE: Automatically compile all files of a project

Norbert Melzer
In reply to this post by Armén
> The thing with haXe, it automatically compiles all classes that are
> referenced. If your class A references B which references C which
> references D, all four will be compiled.
>
> Are you asking a way to have haXe compile UN-referenced classes? If
> you don't want to bother with make and build.hxml, try the "import"
> keyword in your main application class. You would have to manually
> list them one by one though, which is the whole downside of dealing
> with classes that are not referenced from anywhere.

Since I am coding a kind of a framework for my website many of the other
Classes are referenced thrue reflection, so haxe can't know what classes
will be referenced. Thats the same cause why I cant import them.

> As a last resort, if you did not make use of make (pun intended), use
> the Unix shell if you are on one:
>
> find . -name "*| sed -e 's/\.\/\(.*\)\.hx/\1/' -e 's/\//\./g' | tr '\n'
> ' '

I have to use cygwin for that, but I give it a try!


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Automatically compile all files of a project

Ron Wheeler
Norbert Melzer wrote:

>> The thing with haXe, it automatically compiles all classes that are
>> referenced. If your class A references B which references C which
>> references D, all four will be compiled.
>>
>> Are you asking a way to have haXe compile UN-referenced classes? If
>> you don't want to bother with make and build.hxml, try the "import"
>> keyword in your main application class. You would have to manually
>> list them one by one though, which is the whole downside of dealing
>> with classes that are not referenced from anywhere.
>>    
>
> Since I am coding a kind of a framework for my website many of the other
> Classes are referenced thrue reflection, so haxe can't know what classes
> will be referenced. Thats the same cause why I cant import them.
>
>  
>> As a last resort, if you did not make use of make (pun intended), use
>> the Unix shell if you are on one:
>>
>> find . -name "*| sed -e 's/\.\/\(.*\)\.hx/\1/' -e 's/\//\./g' | tr '\n'
>> ' '
>>    
>
> I have to use cygwin for that, but I give it a try!
>
>
>  
http://wildwinter.blogspot.com/2008/07/anthx-haxe-tasks-for-ant.html
Ant is a pretty neat tool. I am not sure if this help but it might give
you a start.
You can extend Ant to make your own tasks that process your own arguments.

Ron


--
haXe - an open source web programming language
http://haxe.org