Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Jun 2000 13:59:52 +0100
From:      Cliff Rowley <cliff@olive.co.uk>
To:        freebsd-java@freebsd.org
Subject:   Odd request
Message-ID:  <394A24C8.24697B1B@olive.co.uk>

next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------664245258A9DF47374932055
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Perhaps an odd request, but could someone help me with a Makefile for
compiling a java project?  As it stands, I'm using a shell script to do
it for me, but it means we have to clean every time to ensure
dependencies are built.  I'm not too hot with makefiles (yet), and this
one isn't that straight forward, since 2 of the classes auto generate
some of the other classes.

I've attached the current script.

Basically this is the chain of events that needs to happen:

1.  The 2 code generation classes need to be compiled
(WopFileCreate.java and WopFileData.java).

2.  'java WopFileCreate > .p42i.properties' must be run to produce the
output files and the properties file.

3.  The rest of the .java files need to be compiled.

Seems quite simple I guess, but I cant get it going at all.

Many thanks.
-- 
Cliff Rowley
Software Engineer
Olive Systems LTD
http://www.olive.co.uk
--------------664245258A9DF47374932055
Content-Type: text/plain; charset=us-ascii;
 name="make"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="make"

#!/bin/sh
#
# Modified make utility
#
# Arguments:
#    ./make                [ clean then make everything ]
#    ./make clean          [ clean ]
#    ./make runv           [ run system against Vax ]
#    ./make runt           [ run system against transact ]

if [ "x$1" = "xclean" ]; then
  echo Cleaning...
  rm *.class
  rm WopCcpdoc.java WopCcpdocSql.java WopCcpdocVax.java WopEvrEvent.java WopEvrEventSql.java WopEvrEventVax.java WopMemdoc.java WopMemdocSql.java WopMemdocVax.java WopMemfmy.java WopMemfmySql.java WopMemfmyVax.java WopMemmst.java WopMemmstSql.java WopMemmstVax.java
elif [ "x$1" = "xrunv" ]; then
  echo Running against Vax
  java -Djava.compiler=none WopMain Vax
elif [ "x$1" = "xrunt" ]; then
  echo Running against Transact
  java -Djava.compiler=none WopMain Transact
elif [ "x$1" = "x" ]; then
  echo Building...
  START=`date`

  `$0 clean`

  echo Compiling exception classes...
  javac *Exception*.java

  echo Compiling code generation classes...
  javac WopFileCreate.java
  javac WopFileData.java

  echo Auto generating classes...
  java WopFileCreate > .p42i.properties

  echo Compiling auto generated classes...
  javac *.java

  END=`date`

  echo
  echo Build started  $START
  echo Build finished $END
  echo
else
  echo Invalid argument: $1
  exit 1;
fi

--------------664245258A9DF47374932055--



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?394A24C8.24697B1B>