ankursaxena
Programmer
Hi, I have some corba idls and then a single java file which uses these files.
the idls are in some dir and the java main is another.
here is the makefile i have writen..
I have never written a makefile, only used what my managers have provided me with, but it is becoming more and more difficult to do this..so i wanted to take this into my hand.
I know it will have many errors, but i want someone to explian me what i am doing wrong.
I have ild files, i want to make a java out of that and then class file out of that, these files will be generated in some directories like CS, CSM etc..and then once this is available I can build the main java file and then finally jar it..
so my jar depends on the IDL converted class files and java main class
IDL converted class depends on IDL converted java which depends on the IDL files.
and the java main class depends on the main java file and also the idl converted classes.
thats it..ofcourse my solution must not be the correct or even close, but i have tried, can you please help me with this, if i am wrong can you please help me go through this a little.
Thanx a ton.
Ankur
the idls are in some dir and the java main is another.
here is the makefile i have writen..
Code:
IDL_SRC_LOC = /vob/acct/app/src/adsi/adsi_idl
VPATH = $IDL_SRC_LOC
IDL_SRC = $(wildcard $(IDL_LOC)/*.ild)
JAVA_BIN = /usr/vendor/jdk1.4.0/bin
IDL_JAVA_CMD = $(JAVA_BIN)/idlj
JAVA = $(JAVA_BIN)/javac
JAR = $(JAVA_BIN)/jar
IDL_GEN_JAVA_SRC = $(wildcard foreach(dir, $(IDL_JAVA_DIR), $dir)/*.java)
JAVA_SRC = $(wildcard *.java)
#$(IDL_GEN_JAVA_SRC)
JAVA_CLASS = (JAVA_SRC:.java=.class)
IDL_GEN_JAVA_CLASS = (IDL_GEN_JAVA_SRC:.java=.class)
TARGET = AdsiCwiComm.jar
DST_DIR =
IDL_FLAGS = -fall -i $(IDL_SRC_LOC)
JAVA_FLAGS =
JAR_FLAGS = cvmf
RESOURCES = MANIFEST.MF
all: $(TARGET)
TARGET: $(IDL_GEN_JAVA_CLASS) $(JAVA_CLASS)
$(JAR) $(JAR_FLAGS) $(RESOURCES) $@ $(JAVA_CLASS) $(IDL_GEN_JAVA_CLASS)
IDL_GEN_JAVA_CLASS: $(IDL_GEN_JAVA_SRC)
$(JAVA) $(JAVA_FLAGS) $?
#--Here it will compile only the java files which are newer than their class files.--
IDL_GEN_JAVA_SRC: $(IDL_SRC)
$(IDL_JAVA_CMD) $(IDL_FLAGS) $(IDLLOC)/$?
JAVA_CLASS: $(JAVA_SRC)
$(JAVA) ($JAVA_FLAGS) @?
I have never written a makefile, only used what my managers have provided me with, but it is becoming more and more difficult to do this..so i wanted to take this into my hand.
I know it will have many errors, but i want someone to explian me what i am doing wrong.
I have ild files, i want to make a java out of that and then class file out of that, these files will be generated in some directories like CS, CSM etc..and then once this is available I can build the main java file and then finally jar it..
so my jar depends on the IDL converted class files and java main class
IDL converted class depends on IDL converted java which depends on the IDL files.
and the java main class depends on the main java file and also the idl converted classes.
thats it..ofcourse my solution must not be the correct or even close, but i have tried, can you please help me with this, if i am wrong can you please help me go through this a little.
Thanx a ton.
Ankur