Skip to content

Instantly share code, notes, and snippets.

@sshine

sshine/Makefile Secret

Created July 9, 2022 15:18
Show Gist options
  • Save sshine/d77eb50b4e6347da1a8dd3f2c9cd324d to your computer and use it in GitHub Desktop.
Save sshine/d77eb50b4e6347da1a8dd3f2c9cd324d to your computer and use it in GitHub Desktop.
$ make
javac -g -cp src @<(find src -name "*.java")
/bin/sh: 1: Syntax error: "(" unexpected
make: *** [Makefile:12: default] Error 2
# The Java compiler
COMPILER = javac
# Directories that contain .class files for inclusion
CLASSPATH = src
# -g: Generates all debugging information, including local variables. By
# default, only line number and source file information is generated.
FLAGS = -g -cp $(CLASSPATH)
default:
$(COMPILER) $(FLAGS) @<(find src -name "*.java")
clean:
find . -name "*.class" -exec rm -f {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment