Makefile question

agnitrate

Diamond Member
Jul 2, 2001
3,761
1
0
I know some of you guys are linux buffs, so I was hoping somebody might know more about makefiles than I do.

I have a makefile in a root directory with two subdirectories, 'Parse' and 'Absyn'. Both of thse directories have files that need to be compiled inside of them. My problem is that I'm not sure how to execute a command in make that will compile ALL the *.java files in a single directory. I've tried :

Absyn :
$(JAVAC) *.java

but since it has no dependencies, it never runs it. I can't find anything on google handling this specifically. My professor gave me a script that specific commands on the directory Parse, but it compiles and makes all the files inside the root directory instead of inside the Parse directory. I tried putting cd Parse inside the makefile but it intereprets it as text instead of as a command.

Is there a simple way for make to accept commands like this so I can do it all very quickly?

-silver