# -----------------------------------------------------------------------------
-# $Id: Makefile,v 1.196 2001/11/03 01:44:04 sof Exp $
+# $Id: Makefile,v 1.197 2001/11/06 11:05:22 simonmar Exp $
TOP = ..
include $(TOP)/mk/boilerplate.mk
DIRS = \
utils basicTypes types hsSyn prelude rename typecheck deSugar coreSyn \
specialise simplCore stranal stgSyn simplStg codeGen absCSyn main \
- profiling parser usageSP cprAnalysis javaGen compMan
+ profiling parser usageSP cprAnalysis compMan
ifeq ($(GhcWithNativeCodeGen),YES)
DIRS += nativeGen
SRC_HC_OPTS += -DILX
endif
+ifeq ($(GhcWithJavaGen),YES)
+DIRS += javaGen
+SRC_HC_OPTS += -DJAVA
+endif
+
#
# Canonicalize the GHC version number - assume it is has the form x.yy.[z] or
# x.yy[.date] where date = yyyymmdd
import IlxGen ( ilxGen )
#endif
+#ifdef JAVA
import JavaGen ( javaGen )
import qualified PrintJava
+#endif
import DriverState ( v_HCHeader )
import TyCon ( TyCon )
>> return stub_names
HscC -> outputC dflags filenm flat_abstractC stub_names
>> return stub_names
- HscJava -> outputJava dflags filenm mod_name tycons core_binds
+ HscJava ->
+#ifdef JAVA
+ outputJava dflags filenm mod_name tycons core_binds
>> return stub_names
+#else
+ panic "Java support not compiled into this ghc"
+#endif
HscILX ->
#ifdef ILX
outputIlx dflags filenm mod_name tycons stg_binds
%************************************************************************
\begin{code}
+#ifdef JAVA
outputJava dflags filenm mod tycons core_binds
= doOutput filenm (\ f -> printForUser f alwaysQualify pp_java)
-- User style printing for now to keep indentation
-- Make sure we have up to date dead-var information
java_code = javaGen mod [{- Should be imports-}] tycons occ_anal_binds
pp_java = PrintJava.compilationUnit java_code
+#endif
\end{code}