[project @ 1996-01-08 20:28:12 by partain]
[ghc-hetmet.git] / ghc / Makefile.BOOT
1 # hand-hacked Makefile to boot the "make world" process
2 #---------------------------------------------------------------------
3
4 # Platform-specific configuration stuff was read from: sun.cf
5
6 SHELL = /bin/sh
7 PATHSEP = /
8
9 #******** NB: TOP setting
10 TOP = ..
11 CURRENT_DIR = ./ghc
12
13 RM=rm -f
14 MV=mv -f
15 BOOTSTRAPCFLAGS =
16
17 # Project identification -- name, version, and stuff
18
19 PROJECTNAME      = Booting the Make World System
20 PROJECTVERSION   = none
21 PROJECTLABEL     = generic
22 SETUPLABEL       = std
23
24 PROJECTCONFIGDIR =
25
26 ###########################################################################
27 # Configuration stuff (jmake, its friends and templates)
28
29 JMKMF         = jmkmf_used_only_with_installed_utils
30 JRESTOREDEPS  = $(JMAKESRC)/jrestoredeps
31 JMAKE         = $(JMAKESRC)/jmake
32 JMAKE_DEFINES =
33
34 JMAKESRC = $(TOP)/mkworld
35
36 JMAKE_CMD = $(NEWTOP)$(JMAKE) -I$(NEWTOP)$(JMAKESRC) $(BOOTSTRAPCFLAGS) -DTopDir=$(TOP) -DCurDir=$(CURRENT_DIR) $(BOOT_DEFINES)
37
38 ###########################################################################
39
40 Makefile:: $(JMAKE)
41
42 $(JMAKE):
43         @(cd $(JMAKESRC); if [ -f Makefile ]; then \
44         echo "checking $@ in $(JMAKESRC) first..."; $(MAKE) all; else \
45         echo "bootstrapping $@ from Makefile.BOOT in $(JMAKESRC) first..."; \
46         $(MAKE) -f Makefile.BOOT BOOTSTRAPCFLAGS=$(BOOTSTRAPCFLAGS); fi; \
47         echo "okay, continuing in $(CURRENT_DIR)")
48
49 Makefile::
50         -@if [ -f Makefile ]; then \
51         echo "  $(RM) Makefile.bak; $(MV) Makefile Makefile.bak"; \
52         $(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \
53         else exit 0; fi
54         $(JMAKE_CMD)
55         $(JRESTOREDEPS)
56         @if cmp -s Makefile Makefile.bak; then $(RM) Makefile.bak ; else exit 0 ; fi
57         @chmod 444 Makefile
58         @echo ==== The new Makefile is for\: ====
59         @$(MAKE) whoami