Annotation of gforth/Makefile.in, revision 1.32

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

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>