I am trying to understand a simple command-line string that executes Javac and passes it some simple arguments. The complete command line is:
javac -d $(OUTPATH) -sourcepath $(SOURCEPATH) $<
Everything in this line is straightforward and understandable to me except for the final tokens: $<.
What do these tokens mean?
ADDENDUM: Indeed, the commenters are correct. This line occurs within a makefile. It is obvious to me now, but not when I wrote this question, that a makefile is passed to make and is not a shell script.
Please note: What do $< and $@ represent in a Makefile? also discusses this (I did not see it when I looked for previous questions about this).
This looks like something from a makefile, not a command line. In that case,
$<expands to the first prerequisite of the current target. That is, the.javafile that the.classtarget depends on.