# This Makefile is used when building with gcj. It is separate from # the ordinary Makefile as it does special GNU-make-specific things, # and this avoids making other builds unnecessarily ugly. # A .list file is made by split-for-gcj.sh. # It lists all the files in a given package. all_list_files := $(shell echo lists/*.list) # The corresponding stamp files. # Each .class file depends on its package's stamp file. # Each list file depends on the java files in its package. # Each stamp file depends on the corresponding list file. # This way touching a single java source will cause the minimum # number of rebuilds. all_stamp_files := $(all_list_files:.list=.stamp) # The dependency file generated by gcj. all_deps_files := $(all_list_files:.list=.deps) all: $(all_stamp_files) -include Makefile.deps $(all_deps_files) ## Like GCJ but include some common flags. GCJF = $(GCJ) -Wno-deprecated --encoding=UTF-8 \ --bootclasspath '' --classpath $(compile_classpath) \ -C -d . # Rule to rebuild a stamp file and update the deps file. %.stamp: %.list $(GCJF) -MD -MF ${@:.stamp=.deps} @$< echo timestamp > $@