summaryrefslogtreecommitdiff
path: root/ghc/driver/Jmakefile
blob: 97e91005c0eae5229ff8ae2e15f40caf26efea93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/* stuff to have before we get going */
MsubNeededHere(ghc)
#if BuildDataParallelHaskell == YES
MsubNeededHere(dphc)
#endif
LitStuffNeededHere(depend)
InfoStuffNeededHere(docs)

DYN_LOADABLE_BITS = \
	ghc-asm-sparc.prl \
	ghc-asm-solaris.prl \
	ghc-asm-m68k.prl \
	ghc-asm.prl \
	ghc-asm-alpha.prl \
	ghc-asm-hppa.prl \
	ghc-asm-mips.prl \
	ghc-consist.prl \
	ghc-split.prl

/* Literate-pgmming suffix rules used herein */
LitSuffixRule(.lprl,.prl)

MsubMakefileDependentProgramScriptTarget(PerlCmd,ghc,ghc.prl,/*no flags*/,/*Makefile*/)
#if BuildDataParallelHaskell == YES
MsubMakefileDependentProgramScriptTarget(PerlCmd,dphc,dphc.prl,,/*Makefile*/)
#endif
AllTarget( $(DYN_LOADABLE_BITS) )

/* installation is hackish: because we may want to install w/ a diff name */
#if DoInstallGHCSystem == YES
MakeDirectories(install, $(INSTBINDIR_GHC) $(INSTLIBDIR_GHC))

InstallMsubbedScriptTarget(PerlCmd,ghc-v-temp-name,ghc.prl,$(INSTBINDIR_GHC))
/* and continuing ... */
install::
	$(MV) $(INSTBINDIR_GHC)/ghc-v-temp-name $(INSTBINDIR_GHC)/$(GHC_DRIVER_INST_NAME)
	$(RM) $(INSTBINDIR_GHC)/ghc-v-temp-name

#if BuildDataParallelHaskell == YES
InstallMsubbedScriptTarget(PerlCmd,dphc-v-temp-name,dphc.prl,$(INSTBINDIR_GHC))
install::
	$(MV) $(INSTBINDIR_GHC)/dphc-v-temp-name $(INSTBINDIR_GHC)/dphc
	$(RM) $(INSTBINDIR_GHC)/dphc-v-temp-name
#endif /* DPH */

dyn_loadable_bits : $(DYN_LOADABLE_BITS)

InstallMultNonExecTargets(dyn_loadable_bits, $(DYN_LOADABLE_BITS), $(INSTLIBDIR_GHC))

install :: install_dyn_loadable_bits

#endif /* DoInstallGHCSystem */

depend::
	@echo make depend done in $(CURRENT_DIR)

ExtraStuffToClean( ghc.prl $(DYN_LOADABLE_BITS) )

ClearTagsFile()

DYN_LOADABLE_LPRLS = $(DYN_LOADABLE_BITS:.prl=.lprl)
PerlTagsTarget( ghc.lprl $(DYN_LOADABLE_LPRLS) )

LitDocRootTargetWithNamedOutput(driver,lit,driver-standalone)