97e91005c0eae5229ff8ae2e15f40caf26efea93
[ghc.git] / ghc / driver / Jmakefile
1 /* stuff to have before we get going */
2 MsubNeededHere(ghc)
3 #if BuildDataParallelHaskell == YES
4 MsubNeededHere(dphc)
5 #endif
6 LitStuffNeededHere(depend)
7 InfoStuffNeededHere(docs)
8
9 DYN_LOADABLE_BITS = \
10         ghc-asm-sparc.prl \
11         ghc-asm-solaris.prl \
12         ghc-asm-m68k.prl \
13         ghc-asm.prl \
14         ghc-asm-alpha.prl \
15         ghc-asm-hppa.prl \
16         ghc-asm-mips.prl \
17         ghc-consist.prl \
18         ghc-split.prl
19
20 /* Literate-pgmming suffix rules used herein */
21 LitSuffixRule(.lprl,.prl)
22
23 MsubMakefileDependentProgramScriptTarget(PerlCmd,ghc,ghc.prl,/*no flags*/,/*Makefile*/)
24 #if BuildDataParallelHaskell == YES
25 MsubMakefileDependentProgramScriptTarget(PerlCmd,dphc,dphc.prl,,/*Makefile*/)
26 #endif
27 AllTarget( $(DYN_LOADABLE_BITS) )
28
29 /* installation is hackish: because we may want to install w/ a diff name */
30 #if DoInstallGHCSystem == YES
31 MakeDirectories(install, $(INSTBINDIR_GHC) $(INSTLIBDIR_GHC))
32
33 InstallMsubbedScriptTarget(PerlCmd,ghc-v-temp-name,ghc.prl,$(INSTBINDIR_GHC))
34 /* and continuing ... */
35 install::
36         $(MV) $(INSTBINDIR_GHC)/ghc-v-temp-name $(INSTBINDIR_GHC)/$(GHC_DRIVER_INST_NAME)
37         $(RM) $(INSTBINDIR_GHC)/ghc-v-temp-name
38
39 #if BuildDataParallelHaskell == YES
40 InstallMsubbedScriptTarget(PerlCmd,dphc-v-temp-name,dphc.prl,$(INSTBINDIR_GHC))
41 install::
42         $(MV) $(INSTBINDIR_GHC)/dphc-v-temp-name $(INSTBINDIR_GHC)/dphc
43         $(RM) $(INSTBINDIR_GHC)/dphc-v-temp-name
44 #endif /* DPH */
45
46 dyn_loadable_bits : $(DYN_LOADABLE_BITS)
47
48 InstallMultNonExecTargets(dyn_loadable_bits, $(DYN_LOADABLE_BITS), $(INSTLIBDIR_GHC))
49
50 install :: install_dyn_loadable_bits
51
52 #endif /* DoInstallGHCSystem */
53
54 depend::
55         @echo make depend done in $(CURRENT_DIR)
56
57 ExtraStuffToClean( ghc.prl $(DYN_LOADABLE_BITS) )
58
59 ClearTagsFile()
60
61 DYN_LOADABLE_LPRLS = $(DYN_LOADABLE_BITS:.prl=.lprl)
62 PerlTagsTarget( ghc.lprl $(DYN_LOADABLE_LPRLS) )
63
64 LitDocRootTargetWithNamedOutput(driver,lit,driver-standalone)