summaryrefslogtreecommitdiff
path: root/web/glasgow/lit2x-0.16/grasp-utils/Makefile.BOOT
blob: 16179c7df1d2bf7aad648b88efcaeab17c983fe7 (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
# hand-hacked Makefile to boot the "make world" process
#---------------------------------------------------------------------

# Platform-specific configuration stuff was read from: sun.cf

SHELL = /bin/sh
PATHSEP = /

TOP = ..
CURRENT_DIR = ./grasp-utils

RM=rm -f
MV=mv -f
BOOTSTRAPCFLAGS =

# Project identification -- name, version, and stuff

PROJECTNAME      = Booting the Make World System
PROJECTVERSION   = none
PROJECTLABEL     = none
SETUPLABEL       = std

PROJECTCONFIGDIR =

###########################################################################
# Configuration stuff (jmake, its friends and templates)

JMKMF         = jmkmf_used_only_with_installed_utils
JRESTOREDEPS  = $(JMAKESRC)/jrestoredeps
JMAKE         = $(JMAKESRC)/jmake
JMAKE_DEFINES =

JMAKESRC = $(TOP)/mkworld

JMAKE_CMD = $(NEWTOP)$(JMAKE) -I$(NEWTOP)$(JMAKESRC) $(BOOTSTRAPCFLAGS) -DTopDir=$(TOP) -DCurDir=$(CURRENT_DIR) $(BOOT_DEFINES)

###########################################################################

Makefile:: $(JMAKE)

$(JMAKE):
	@(cd $(JMAKESRC); if [ -f Makefile ]; then \
	echo "checking $@ in $(JMAKESRC) first..."; $(MAKE) all; else \
	echo "bootstrapping $@ from Makefile.BOOT in $(JMAKESRC) first..."; \
	$(MAKE) -f Makefile.BOOT BOOTSTRAPCFLAGS=$(BOOTSTRAPCFLAGS); fi; \
	echo "okay, continuing in $(CURRENT_DIR)")

Makefile::
	-@if [ -f Makefile ]; then \
	echo "	$(RM) Makefile.bak; $(MV) Makefile Makefile.bak"; \
	$(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \
	else exit 0; fi
	$(JMAKE_CMD)
	$(JRESTOREDEPS)
	@if cmp -s Makefile Makefile.bak; then $(RM) Makefile.bak ; fi
	@chmod 444 Makefile
	@echo ==== The new Makefile is for\: ====
	@$(MAKE) whoami