Annotation of gforth/Makefile.in, revision 1.35

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

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