File:
[gforth] /
gforth /
Makefile.in
Revision
1.24:
download - view:
text,
annotated -
select for diffs
Fri Apr 14 18:56:52 1995 UTC (29 years ago) by
anton
Branches:
MAIN
CVS tags:
HEAD
Put pow10 in a separate file (it is used by ecvt and engine) and
adjusted configure accordingly.
script? is now also set during processing --evaluate arguments. This
avoids getting a newline from "gforth -e bye".
1: #Copyright 1992 by the ANSI figForth Development Group
2: # To change the values of `make' variables: instead of editing Makefiles,
3: # (1) if the variable is set in `config.status', edit `config.status'
4: # (which will cause the Makefiles to be regenerated when you run `make');
5: # (2) otherwise, pass the desired values on the `make' command line.
6:
7: #To do:
8: #use $(srcdir) to make compilation in a non-srcdir possible
9:
10: VERSION =0.1alpha#gforth version
11: SHELL = /bin/sh
12: RM = rm
13: CP = cp
14: INSTALL = @INSTALL@
15: INSTALL_PROGRAM = @INSTALL_PROGRAM@
16: INSTALL_DATA = @INSTALL_DATA@
17: LN_S = @LN_S@
18: GCC = gcc
19: CC = $(GCC)
20: FORTH = ./gforth
21: STRIP = strip
22: TEXI2DVI = tex
23: DVI2PS = dvips
24: #you can get texi2html from http://asis01.cern.ch/infohtml/texi2html.html
25: TEXI2HTML = texi2html
26: MAKEINFO = makeinfo
27: XCFLAGS = @CFLAGS@
28: XDEFINES = @DEFS@
29: SWITCHES = $(XCFLAGS) $(XDEFINES) #-DNDEBUG #turn off assertions
30: ENGINE_FLAGS = -fno-defer-pop -fcaller-saves
31: CFLAGS = @DEBUGFLAG@ -O4 -Wall $(SWITCHES)
32:
33: #John Wavrik should use -Xlinker -N to get a writable text (executable)
34: LDFLAGS = @DEBUGFLAG@ @LDFLAGS@ @GCCLDFLAGS@
35: LDLIBS = @LIBS@
36:
37: prefix = @prefix@
38: exec_prefix = @exec_prefix@
39: srcdir = @srcdir@
40: bindir = $(exec_prefix)/bin
41: #read-only architecture-independent files
42: datadir = $(prefix)/share
43: #read-only architecture-dependent non-ascii files
44: libdir = $(prefix)/lib
45: infodir = $(prefix)/info
46: mandir = $(prefix)/man/man1
47:
48:
49: INCLUDES = forth.h io.h
50:
51: FORTH_SRC = anslocal.fs add.fs assert.fs ansi.fs blocks.fs bufio.fs checkans.fs \
52: colorize.fs cross.fs debug.fs debugging.fs doskey.fs ds2texi.fs \
53: dumpimage.fs environ.fs errore.fs etags.fs extend.fs filedump.fs \
54: float.fs glocals.fs glosgen.fs gray.fs hash.fs history.fs \
55: kernal.fs locals-test.fs look.fs main.fs makedoc.fs \
56: mach16b.fs mach16l.fs mach32b.fs mach32l.fs mach64b.fs mach64l.fs \
57: other.fs prims2x.fs random.fs search-order.fs see.fs sieve.fs \
58: startup.fs struct.fs tools.fs toolsext.fs tt.fs vars.fs vt100.fs \
59: vt100key.fs wordinfo.fs wordsets.fs \
60: tester.fs coretest.fs
61:
62: SOURCES = Makefile.in configure.in configure config.sub config.guess \
63: install-sh INSTALL README ToDo BUGS model COPYING \
64: gforth.ds texinfo.tex gforth.1 \
65: primitives engine.c main.c io.c \
66: m68k.h mips.h 386.h hppa.h cache.c sparc.h power.h alpha.h 32bit.h \
67: getopt.c getopt1.c getopt.h select.c \
68: ecvt.c memcmp.c strtol.c strtoul.c ansidecl.h memmove.c pow10.c \
69: makefile.dos configure.bat startup.dos \
70: glosgen.glo glossaries.doc \
71: $(INCLUDES) $(FORTH_SRC)
72:
73: RCS_FILES = ToDo model high-level
74:
75: GEN = gforth
76:
77: OBJECTS = engine.o io.o main.o @LIBOBJS@ @getopt_long@
78:
79: # things that need a working forth system to be generated
80: FORTH_GEN0 = primitives.b primitives.i prim_labels.i aliases.fs
81: FORTH_GEN = $(FORTH_GEN0) @KERNAL@
82: # this is used for antidependences,
83: FORTH_GEN1 = $(FORTH_GEN0) @gforth_fi@
84:
85:
86: GEN_PRECIOUS = $(FORTH_GEN) gforth.texi gforth.dvi gforth.ps Makefile configure
87:
88: #standards.info recommends this:
89: .SUFFIXES:
90: .SUFFIXES: .c .o
91:
92: all:
93: if [ ! -f gforth ]; then $(MAKE) first; fi
94: $(MAKE) more
95:
96: first: gforth
97:
98: more: $(FORTH_GEN) gforth
99:
100: #from the gcc Makefile:
101: #"Deletion of files made during compilation.
102: # There are four levels of this:
103: # `mostlyclean', `clean', `distclean' and `realclean'.
104: # `mostlyclean' is useful while working on a particular type of machine.
105: # It deletes most, but not all, of the files made by compilation.
106: # It does not delete libgcc.a or its parts, so it won't have to be recompiled.
107: # `clean' deletes everything made by running `make all'.
108: # `distclean' also deletes the files made by config.
109: # `realclean' also deletes everything that could be regenerated automatically."
110:
111: clean:
112: -$(RM) $(GEN) *.o *.s
113:
114: distclean: clean
115: -$(RM) machine.h gforth.fi config.cache config.log
116:
117: realclean: distclean
118: -$(RM) $(GEN_PRECIOUS)
119:
120: dist: $(SOURCES) $(FORTH_GEN)
121: -rm -rf gforth-$(VERSION)
122: mkdir gforth-$(VERSION)
123: cp -p $(SOURCES) $(FORTH_GEN) gforth-$(VERSION)
124: tar cvf - gforth-$(VERSION)|gzip -9 >gforth-$(VERSION).tar.gz
125:
126: #a binary distribution contains the complete source distribution,
127: # the objects, the executable and the links. the objects are there for making
128: # make happy.
129: bindist: $(SOURCES) $(FORTH_GEN) gforth $(OBJECTS) config.status Makefile
130: -rm -rf gforth-$(VERSION)
131: mkdir gforth-$(VERSION)
132: cp -p -d $(SOURCES) config.status Makefile $(FORTH_GEN) gforth $(OBJECTS) machine.h gforth.fi gforth-$(VERSION)
133: strip gforth-$(VERSION)/gforth
134: tar cvf - gforth-$(VERSION)|gzip -9 >gforth-$(VERSION)-@host@.tar.gz
135:
136: #makes a package with only the stuff not present in the source
137: #package. For installation the source package is still needed!
138: #This is useful if you want to distribute many binary versions in
139: #little space (e.g., on floppy disk): Put the source package and
140: #all the binonly packages you are interested in on the disk. The user
141: #then just has to unpack the source and his favourite binonly into the
142: #same directory and has a full binary distribution.
143: binonlydist: $(SOURCES) $(FORTH_GEN) gforth $(OBJECTS)
144: -rm -rf gforth-$(VERSION)
145: mkdir gforth-$(VERSION)
146: cp -p -d config.status Makefile gforth $(OBJECTS) machine.h gforth.fi gforth-$(VERSION)
147: strip gforth-$(VERSION)/gforth
148: tar cvf - gforth-$(VERSION)|gzip -9 >gforth-$(VERSION)-binonly-@host@.tar.gz
149:
150:
151:
152: #strip gforth, because the debugging stuff is hardly useful once
153: # gforth manages to execute more than a few primitives
154:
155: install: gforth $(FORTH_SRC) gforth.fi gforth.1 gforth.info
156: $(INSTALL) -d $(bindir) $(mandir) $(infodir) $(libdir)/gforth $(datadir)/gforth
157: $(INSTALL_PROGRAM) -s gforth $(bindir)
158: $(INSTALL_DATA) gforth.1 $(mandir)
159: $(INSTALL_DATA) gforth.info* $(infodir)
160: $(INSTALL_DATA) gforth.fi $(libdir)/gforth
161: for i in $(FORTH_SRC); do \
162: $(INSTALL_DATA) $$i $(libdir)/gforth; \
163: done
164:
165: test: gforth
166: @echo 'Expect to see INCORRECT RESULT: { GS1 -> <TRUE> <TRUE> }'
167: @echo 'This is a bug of the testing program'
168: $(FORTH) tester.fs coretest.fs -e bye
169: $(FORTH) startup.fs blocks.fs checkans.fs -e bye
170: @echo 'Expect no differences'
171: $(FORTH) prims2x.fs -e "s\" primitives.b\" ' output-c process-file bye"| diff -c - primitives.i
172:
173: dvi: gforth.dvi
174:
175: gforth: $(OBJECTS)
176: -$(CP) gforth gforth~
177: $(GCC) $(LDFLAGS) $(OBJECTS) $(LDLIBS) -o $@
178: @MAKE_EXE@
179:
180: kernl16l.fi: main.fs search-order.fs cross.fs aliases.fs vars.fs add.fs \
181: errore.fs kernal.fs extend.fs tools.fs toolsext.fs \
182: mach16l.fs $(FORTH_GEN1)
183: -$(CP) kernl16l.fi kernl16l.fi~
184: $(FORTH) -e 's" mach16l.fs"' main.fs
185: @LINK_KERNL16L@
186:
187: kernl16b.fi: main.fs search-order.fs cross.fs aliases.fs vars.fs add.fs \
188: errore.fs kernal.fs extend.fs tools.fs toolsext.fs \
189: mach16b.fs $(FORTH_GEN1)
190: -$(CP) kernl16b.fi kernl16b.fi~
191: $(FORTH) -e 's" mach16b.fs"' main.fs
192: @LINK_KERNL16B@
193:
194: kernl32l.fi: main.fs search-order.fs cross.fs aliases.fs vars.fs add.fs \
195: errore.fs kernal.fs extend.fs tools.fs toolsext.fs \
196: mach32l.fs $(FORTH_GEN1)
197: -$(CP) kernl32l.fi kernl32l.fi~
198: $(FORTH) -e 's" mach32l.fs"' main.fs
199: @LINK_KERNL32L@
200:
201: kernl32b.fi: main.fs search-order.fs cross.fs aliases.fs vars.fs add.fs \
202: errore.fs kernal.fs extend.fs tools.fs toolsext.fs \
203: mach32b.fs $(FORTH_GEN1)
204: -$(CP) kernl32b.fi kernl32b.fi~
205: $(FORTH) -e 's" mach32b.fs"' main.fs
206: @LINK_KERNL32B@
207:
208: kernl64l.fi: main.fs search-order.fs cross.fs aliases.fs vars.fs add.fs \
209: errore.fs kernal.fs extend.fs tools.fs toolsext.fs \
210: mach64l.fs $(FORTH_GEN1)
211: -$(CP) kernl64l.fi kernl64l.fi~
212: $(FORTH) -e 's" mach64l.fs"' main.fs
213: @LINK_KERNL64L@
214:
215: kernl64b.fi: main.fs search-order.fs cross.fs aliases.fs vars.fs add.fs \
216: errore.fs kernal.fs extend.fs tools.fs toolsext.fs \
217: mach64b.fs $(FORTH_GEN1)
218: -$(CP) kernl64b.fi kernl64b.fi~
219: $(FORTH) -e 's" mach64b.fs"' main.fs
220: @LINK_KERNL64B@
221:
222: engine.s: engine.c primitives.i prim_labels.i machine.h $(INCLUDES)
223: $(GCC) $(CFLAGS) $(ENGINE_FLAGS) -S engine.c
224:
225: engine.o: engine.c primitives.i prim_labels.i machine.h $(INCLUDES)
226: $(GCC) $(CFLAGS) $(ENGINE_FLAGS) -c engine.c
227:
228: strtoul.o: strtoul.c strtol.c
229:
230: primitives.b: primitives
231: m4 primitives >$@
232:
233: primitives.i : primitives.b prims2x.fs
234: $(FORTH) prims2x.fs -e "s\" primitives.b\" ' output-c process-file bye" >$@
235:
236: prim_labels.i : primitives.b prims2x.fs
237: $(FORTH) prims2x.fs -e "s\" primitives.b\" ' output-label process-file bye" >$@
238:
239: aliases.fs: primitives.b prims2x.fs
240: $(FORTH) prims2x.fs -e "s\" primitives.b\" ' output-alias process-file bye" >$@
241:
242: primitives.fs: primitives.b prims2x.fs
243: $(FORTH) prims2x.fs -e "s\" primitives.b\" ' output-forth process-file bye" >$@
244:
245: doc.fs: makedoc.fs float.fs search-order.fs glocals.fs environ.fs \
246: toolsext.fs wordinfo.fs \
247: vt100.fs colorize.fs see.fs bufio.fs debug.fs history.fs \
248: doskey.fs vt100key.fs startup.fs assert.fs debugging.fs
249: $(FORTH) -e "s\" doc.fs\"" makedoc.fs startup.fs -e bye
250:
251: gforth.texi: gforth.ds primitives.b ds2texi.fs prims2x.fs doc.fs
252: $(FORTH) ds2texi.fs >$@
253:
254: gforth.dvi: gforth.texi
255: $(TEXI2DVI) gforth.texi
256:
257: gforth.ps: gforth.dvi
258: $(DVI2PS) gforth.dvi -o $@
259:
260: gforth.info: gforth.texi
261: -$(MAKEINFO) gforth.texi
262:
263: html: gforth.texi
264: -$(RM) html/*
265: -mkdir html
266: cd html; $(TEXI2HTML) -menu -split_node ../gforth.texi
267:
268: # For an explanation of the following Makefile rules, see node
269: # `Automatic Remaking' in GNU Autoconf documentation.
270: Makefile: Makefile.in config.status
271: CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
272: config.status: configure
273: ./config.status --recheck
274: configure: configure.in
275: cd $(srcdir) && autoconf
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>