make not needed

T

tom fredriksen

Thomas said:
I was waiting for that comment about make.

On one side we have make, which at a certain point insists on using a
tab instead of single spaces. On the other side we have ant with XML.
Which insists on proper nesting, proper closing of elements, a boatload
of '<' and '>', a boatload of different elements with a boatload of
different attributes in some deep nesting.

Now, I rather know which side I prefer. I have no problems with putting
up with an innocent tab.


I dont think there are any build tools for java out there that are close
to perfect. I think a build tool that contains elements from both make
and maven would be the best solution. I dont know about Ant, but I cant
see it introducing anything of value than what Make/Maven already has.

Here is a list of features a merged Make/Maven should have, IMHO...

- Maven has a predefined directory structure so it can find the
info/code where it expects it to be.
- Mavens has an intelligent compile system, by only specifying the
directories where source code is contained.
- Maven has predefined maven modules which can perform a vast array of
tasks, due to the directory structure. You dont have to script or
program anything for most uses.
- Maven automagically knows how to run tests, create jars, wars, perform
deployment etc as long as the info it needs it located where it expects it.
- Maven has one property file for the entire host:( it should be a
property file for entire project.
- Maven/Ant uses XML; NO USE OF XML should be allowed(XML is intended
for machines, not for humans)
- Make is too oriented around mundane details, This slows down the
project because you have to reinvent the wheel for many of the same
tasks for each new project. It also has some quirky syntax which should
be removed.
- Make is fast (native program), maven is slow (java program). Just
performing a dead-end compilation in maven takes 2 seconds on a single
file, in make its done in 0.1 second.
- maven has a slow compilation cycle. For creating a jar it needs to
perform seven or eight steps. When doing active developement, waiting
for all those steps to complete can typically take 30-60 seconds. With
make this can be done in 5-10 seconds (For this specific project). This
is because, see next item...
- Make allows one to control an action in detail, maven does not. I
usually want an target called "compile" which performs all tasks of the
jar target without running tests, this is for developement and a fast
build turn-around. In maven this is not very possible. With make it is.
- Maven requires a lot of network interaction to handle dependencies and
to handle internal dependencies and deployment. This is handled
efficiently and without any network interaction in make.

So in essence maven works almost automagically, but with almost no
ability to adapt to the project or users specific needs. While make
gives you the adaptability, but at the cost of thousands of hours of
make scripting for each new project.

At the moment I dont know what I will be doing in the end, but I am
seriously considering joining the maven project to do something about it.

regards

tom
 
W

Wibble

Roedy said:
I would say ant is UGLY, not evil.

To its credit, its scripts will run circles around anything you cook
up with BAT files in terms of speed.. I used to do mine with a STOMP
program that composed bat scripts for 4NT. It now generates ANT
scripts.

Further, the scripts run on all platforms.

On the other paw it takes about ten times as much code to
conditionally copy a file.

For every I do anything in ant my first task is to find some time I or
someone else has done it before to glean the magic incantations.

It is limited to XML-like syntax which is very clumsy. see
http://mindprod.com/jgloss/ant.html
We use gnumake and ant on my project. Ant tends
to be better for the java parts, and make for everything
else. Make has simple targets to call ant.
Platform independance is not an issue.
 
W

Wibble

if A calls B and C (directly or indirectly)

Indirectly including reflection? like so (not compiled):

import java.util.ArrayList;
public class A {
public static void main(String args[]) throws Exception {
ArrayList l = new ArrayList();
l.add( Class.forName("B"));
l.add( Class.forName("C"));
l.add( Class.forName(args[0]));
}
}

Then no.

Opalinski
(e-mail address removed)
http://www.geocities.com/opalpaweb/
Theres no easy magic way.

just 'javac A.java B.java C.java'
or 'javac $(find . -name *.java)'

Ant is good at allowing you to include and
exclude files in the build, so you can enumerate
them there easily too.
 
D

Daniel Dyer

I dont think there are any build tools for java out there that are close
to perfect. I think a build tool that contains elements from both make
and maven would be the best solution. I dont know about Ant, but I cant
see it introducing anything of value than what Make/Maven already has.

Whatever happened to Ant 2? They were talking about it years ago but it
seems to have disappeared off the radar.

Dan.
 
N

Nigel Wade

Timbo said:
My editor is fine, and it does the same. I specifically configure
it to insert spaces when I hit the tab key, as do many other
people. That's why so many editors have that option.

Just because you have broken it, rather than it being broken by design, doesn't
mean it isn't broken.

Besides, a proper editor would realize you were editing a Makefile and take
action accordingly.
 
T

Timbo

Gordon said:
My editor normally inserts spaces when I press tab, but if I edit a
Makefile it recognizes it as such, and inserts tab characters instead.
It also warns me if a line is indented with spaces when it shouldn't
be, and marks those spaces in a colour that stands out from the
background.
I'm sure I *could* set up my editor to do the same, or, I could
just use ant/maven, which has many other benefits, such as
portability. For the amount of time I spend editing Makefiles, it
doesn't seem worth it to figure out how to set it up like this.
 
T

Timbo

Nigel said:
Timbo wrote:




Just because you have broken it, rather than it being broken by design, doesn't
mean it isn't broken.
It's far from broken. I like having spaces instead of tabs, and
Make is the only unix tool I can recall using that treats tabs are
special syntax separate from spaces.
Besides, a proper editor would realize you were editing a Makefile and take
action accordingly.
Sure, but I can use the same argument against Make, and say that a
proper build tool should be able to detect indenting etc, and take
action accordingly. But it doesn't.
 
G

Gordon Beaton

I'm sure I *could* set up my editor to do the same, or, I could just
use ant/maven, which has many other benefits, such as portability.

I'll go out on a limb here och suggest that Gnu Make likely runs on
more platforms than Java does.
For the amount of time I spend editing Makefiles, it doesn't seem
worth it to figure out how to set it up like this.

I don't spend a lot of time editing Makefiles either, but my editor
recognizes them "out of the box". Setup time: 0.

/gordon
 
C

Chris Uppal

Gordon said:
I don't spend a lot of time editing Makefiles either, but my editor
recognizes them "out of the box". Setup time: 0.

Which editor is that ?

Since we seem to be in the middle of yet another Make-is-Good vs.
Make-is-Bad -fest, let's up the ante and get into an editor war too ;-)

(Only joking. But the question is genuine.)

-- chris
 
D

Daniel Dyer

Which editor is that ?

Since we seem to be in the middle of yet another Make-is-Good vs.
Make-is-Bad -fest, let's up the ante and get into an editor war too ;-)

(Only joking. But the question is genuine.)

-- chris

We've touched on spaces versus tabs too. Perhaps we should also move the
Perl vs. Java discussion on to this thread?

Dan.

P.S. Should my opening curly braces be placed at the end of the line or on
a line by themselves?
 
T

Timbo

Gordon said:
I'll go out on a limb here och suggest that Gnu Make likely runs on
more platforms than Java does.
I'd say you're right, but I'd say that Java runs on more systems
that Gnu Make does. How do I specify that the build should tar and
gzip a file and then copy it somewhere using Gnu Make for both
windows and unix?
I don't spend a lot of time editing Makefiles either, but my editor
recognizes them "out of the box". Setup time: 0.
So does mine... just checked it out. That still doesn't mean that
using tab in a Makefile is not crap syntax. Make even gives you a
warning when you use 8 spaces instead of a tab!
 
C

Chris Uppal

Daniel said:
P.S. Should my opening curly braces be placed at the end of the line or on
a line by themselves?

Shhh...!

The Elder Threads are not dead, they do but sleep. They shall awaken in the
dark hour of Abion's greatest need, and when they arise their wrath shall be
very terrible.

-- chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,269
Messages
2,571,100
Members
48,773
Latest member
Kaybee

Latest Threads

Top