-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makegen
120 lines (104 loc) · 3.84 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
######################################################################
##
## 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.
##
######################################################################
##
## 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 -rf config.cache autom4te.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_bootstrap) {
&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 -rf config.cache autom4te.cache');
push(@compile_commands, $recheck);
push(@compile_commands, '$(MAKE) clean');
push(@compile_commands, '$(MAKE)');
&message("Bootstrap complete. After installing, type 'make bootstrap_clean'");
&message("to perform a regular build.");
} else {
&compile_subdirs("d2c", "common", "tools");
&compile_subdirs("tests", "qa");
}
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 {} \\;');