my dog learned polymorphism*
The moose likes Ant, Maven and Other Build Tools and the fly likes Makefile Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Makefile" Watch "Makefile" New topic
Author

Makefile

Jiafan Zhou
Ranch Hand

Joined: Sep 28, 2005
Posts: 192

I know that Ant has big advantage over a normal build process like Makefile.

Whereas still a lot of project use Makefile as their building tool..and I am not familiar with the Makfile and I appreciate any explanation on the Makefile..

for example:
if I have the following Makefile:


How does this Makefile work?

Kind regards,
Jiafan


SCJP, SCJD, SCWCD, SCBCD, SCEA
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

I'm in the minority, I know, but I don't feel that Ant does have any advantages over make except for the portability issue: Ant will work on a stock Windows distribution, whereas make would need a whole set of supporting tools like the Cygwin environment to be useful. But if your development platform is not Windows (and I honestly feel sorry for people stuck developing on Windows) then Make can do a lot more things, a lot more easily, than Ant can. Sadly, most Java developers are on Windows.

In any case, as far as this file goes, it really doesn't do anything except include some other (presumably much larger) Makefile that does do something.
[ September 21, 2006: Message edited by: Ernest Friedman-Hill ]

[Jess in Action][AskingGoodQuestions]
Jiafan Zhou
Ranch Hand

Joined: Sep 28, 2005
Posts: 192

Hi,

A nice introduction for MakeFile, Ernest. I dont believe that you have posted over 10 thousand threads in the Javaranch..

You can write a book for that amount.

Could you or anybody else introduce me a book on Makefile..because I need to be more familiar with this building tool.

Thanks,
Jiafan
Anand Hariharan
Rancher

Joined: Aug 22, 2006
Posts: 257

Originally posted by Ernest Friedman-Hill:
I'm in the minority, I know, but I don't feel that Ant does have any advantages over make except for the portability issue: Ant will work on a stock Windows distribution, whereas make would need a whole set of supporting tools like the Cygwin environment to be useful. But if your development platform is not Windows (and I honestly feel sorry for people in that position) then Make can do a lot more things, a lot more easily, than Ant can. Sadly, most Java developers are on Windows.


Very insightful. Thank you.

I have spent several years wrestling with Makefiles, but have not a clue on Ant. A certain individual found me to be "immature" -- saying that I dabble with needlessly low level stuff and find happiness in doing so, only in knowing that I am in the minority (i.e., that I can solve problems with Make that few other people can, and (his contention was that) my knowing this is what gives me happiness).

Also, people find me old-fashioned for using MinGW/MSYS and Vim whenever I work on a Windows box.

sincerely,
- Anand Hariharan


"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- Antoine de Saint-Exupery
Jiafan Zhou
Ranch Hand

Joined: Sep 28, 2005
Posts: 192

Can you makefile expert guys introduce me some tutorial to get start with makefile please?

Regards,
Jiafan
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Makefile
 
Similar Threads
makefile for java
Error with the makefile in eclipse
ANT for windows?
makefile
Need help getting a java app compiling