This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: using make on big Java projects


%% oneself <oneself@usa.net> writes:

  o> I have just recently started writing makefiles and using make.  and
  o> I want to it on an already existing, very big Java project that
  o> contains something like 500 files in an elaborate tree structure.
  o> from the brief but decisive acquaintance I had with make there was
  o> one thing that became obvious to me, and that is that I had to
  o> actually put in every file name in the make file. and,if I was
  o> bored enough, their dependencies.

Typically build environments use some sort of automated dependency
detection method.  No one ever bothers to write header dependencies by
hand anymore.

There are many solutions for C.  I'm not familiar with Java so I can't
advise you on that aspect of it.

  o> my first question is, am I right or wrong. if I'm wrong then how
  o> can I make make make my whole project with out putting in every
  o> file name in the makefile.  if I'm write, are there any tools out
  o> there that make this task easier to manage.

If you want to find every *.java filename for example, look at
$(wildcard ...).  If you need something more flexible (every filename in
a deep directory structure maybe), try $(shell ...)

  FILES := $(shell find . -name \*.java -print)

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <psmith@baynetworks.com>         Network Management Development
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
-------------------------------------------------------------------------------
   These are my opinions---Nortel Networks takes no responsibility for them.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]