[project @ 1996-01-08 20:28:12 by partain]
[ghc-hetmet.git] / glafp-utils / 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 TOP = ..
10 CURRENT_DIR = ./glafp-utils
11
12 RM=rm -f
13 MV=mv -f
14 BOOTSTRAPCFLAGS =
15
16 # Project identification -- name, version, and stuff
17
18 PROJECTNAME      = Booting the Make World System
19 PROJECTVERSION   = none
20 PROJECTLABEL     = none
21 SETUPLABEL       = std
22
23 PROJECTCONFIGDIR =
24
25 ###########################################################################
26 # Configuration stuff (jmake, its friends and templates)
27
28 JMKMF         = jmkmf_used_only_with_installed_utils
29 JRESTOREDEPS  = $(JMAKESRC)/jrestoredeps
30 JMAKE         = $(JMAKESRC)/jmake
31 JMAKE_DEFINES =
32
33 JMAKESRC = $(TOP)/mkworld
34
35 JMAKE_CMD = $(NEWTOP)$(JMAKE) -I$(NEWTOP)$(JMAKESRC) $(BOOTSTRAPCFLAGS) -DTopDir=$(TOP) -DCurDir=$(CURRENT_DIR) $(BOOT_DEFINES)
36
37 ###########################################################################
38
39 Makefile:: $(JMAKE)
40
41 $(JMAKE):
42         @(cd $(JMAKESRC); if [ -f Makefile ]; then \
43         echo "checking $@ in $(JMAKESRC) first..."; $(MAKE) all; else \
44         echo "bootstrapping $@ from Makefile.BOOT in $(JMAKESRC) first..."; \
45         $(MAKE) -f Makefile.BOOT BOOTSTRAPCFLAGS=$(BOOTSTRAPCFLAGS); fi; \
46         echo "okay, continuing in $(CURRENT_DIR)")
47
48 Makefile::
49         -@if [ -f Makefile ]; then \
50         echo "  $(RM) Makefile.bak; $(MV) Makefile Makefile.bak"; \
51         $(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \
52         else exit 0; fi
53         $(JMAKE_CMD)
54         $(JRESTOREDEPS)
55         @if cmp -s Makefile Makefile.bak; then $(RM) Makefile.bak ; else exit 0 ; fi
56         @chmod 444 Makefile
57         @echo ==== The new Makefile is for\: ====
58         @$(MAKE) whoami