forked from dylan-hackers/gwydion-2.4
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makegen
145 lines (129 loc) · 4.48 KB
/
Makegen
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
######################################################################
##
## Copyright (c) 1994 Carnegie Mellon University
## Copyright (c) 1998, 1999, 2000 Gwydion Dylan Maintainers
## All rights reserved.
##
## Use and copying of this software and preparation of derivative
## works based on this software are permitted, including commercial
## use, provided that the following conditions are observed:
##
## 1. This copyright notice must be retained in full on any copies
## and on appropriate parts of any derivative works.
## 2. Documentation (paper or online) accompanying any system that
## incorporates this software, or any part of it, must acknowledge
## the contribution of the Gwydion Project at Carnegie Mellon
## University, and the Gwydion Dylan Maintainers.
##
## This software is made available "as is". Neither the authors nor
## Carnegie Mellon University make any warranty about the software,
## its performance, or its conformity to any specification.
##
## Bug reports should be sent to <[email protected]>; questions,
## comments and suggestions are welcome at <[email protected]>.
## Also, see http://www.gwydiondylan.org/ for updates and documentation.
##
######################################################################
##
## $Header: /scm/cvs/src/Makegen,v 1.26.4.2 2004/10/17 23:14:45 andreas Exp $
##
## This is the makegen file for the entire Dylan tree.
##
## When bootstrapping stuff is compiled in a different order because the
## dependencies are different. Also, when bootstrapping, we suppress actually
## running d2c. See the d2c-compile target to actually bootstrap.
## Make force.timestamp if not there yet.
push(@compile_commands, "\$(MAKE) force.timestamp");
print <<'EOF';
force.timestamp:
touch force.timestamp
EOF
## Always emit a post-bootstrap cleanup rule, just in case we need one.
print <<EOF;
.PHONY: bootstrap_clean
bootstrap_clean: clean
rm -rf bootstrap_compiler
rm -f config.cache
\@echo
\@echo "Now run $recheck to prepare for normal builds."
EOF
sub message {
push(@compile_commands, "\@echo \"$_[0]\"");
}
if ($features{'compiled_for_unix'}) {
&compile_subdirs('doc');
}
if ($enable_mindy) {
&compile_subdirs("mindy");
}
if ($enable_bootstrap) {
if ($bootstrap_compiler eq "mindy") {
print "export BYTES_CONSED_BETWEEN_GCS=40000000\n";
push(@compile_commands,
sprintf($host_platform{'recursive_make_command'},
"common", "dbc_only"));
&compile_subdirs("d2c", "common");
push(@compile_commands,
sprintf($host_platform{'recursive_make_command'},
"d2c", "d2c-compile"));
&message("");
&message("BOOTSTRAP COMPLETE");
&message("Now install d2c, remove autom4te.cache,");
&message("re-run configure, and make again.");
} else {
&compile_subdirs("d2c");
# XXX - this directory name is confusing
push(@compile_commands, 'mkdir bootstrap_compiler');
push(@compile_commands, 'cp d2c/compiler/main/d2c' . $dot_exe . ' bootstrap_compiler');
push(@compile_commands, 'rm -f config.cache');
push(@compile_commands, $recheck);
push(@compile_commands, '$(MAKE) clean');
push(@compile_commands, '$(MAKE)');
&message("");
&message("BOOTSTRAP COMPLETE");
}
}
else {
if ($enable_d2c) {
&compile_subdirs("d2c");
}
&compile_subdirs("common", "tools");
if($enable_duim ne 'no') {
&compile_subdirs("duim");
}
&compile_subdirs("platform");
&compile_subdirs("tests");
}
push(@install_dependencies, "installdirs");
push(@uninstall_commands, "rm -rf ${DESTDIR}$libdir/elisp");
push(@uninstall_commands, "rm -rf ${DESTDIR}$libdir");
push(@uninstall_commands, "rm -rf ${DESTDIR}$sitelibdir");
push(@uninstall_commands, "rm -rf ${DESTDIR}$datadir/dylan");
if ($features{'compiled_for_unix'}) {
print <<"EOF"
installdirs:
$srcdir/mkinstalldirs \${DESTDIR}$bindir \\
\${DESTDIR}$sitelibdir \\
\${DESTDIR}$libdir \${DESTDIR}$libdir/elisp \\
\${DESTDIR}$includedir \${DESTDIR}$datadir/dylan \\
\${DESTDIR}$mandir/man1 \${DESTDIR}$mandir/man4 \\
\${DESTDIR}$mandir/man7
EOF
;
} elsif ($features{'compiled_for_win32'}) {
print <<"EOF"
installdirs:
-mkdir \$(DESTDIR)$bindir
-mkdir \$(DESTDIR)$libdir
-mkdir \$(DESTDIR)$libdir\\elisp
-mkdir \$(DESTDIR)$includedir
-mkdir \$(DESTDIR)$sysconfdir
EOF
;
} else {
&unknown_platform_error();
}
# Blow away our dep files whenever we make clean.
# XXX - it might be better to do this when we re-run configure.
push(@clean_commands,
'find . -name \\*.dep -exec rm {} \\; -exec touch {} \\;');