From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b80cdba86bdc9052 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-12-22 11:48:34 PST Newsgroups: comp.lang.ada Path: nntp.gmd.de!newsserver.jvnc.net!nntpserver.pppl.gov!princeton!rutgers!att-out!pacbell.com!uop!lll-winken.llnl.gov!uwm.edu!math.ohio-state.edu!howland.reston.ans.net!swiss.ans.net!news.dfn.de!news.belwue.de!news.uni-stuttgart.de!rz.uni-karlsruhe.de!darum.uni-mannheim.de!fht-mannheim!roxi.rz.fht-mannheim.de!duz From: duz@roxi.rz.fht-mannheim.de (Dirk Zoller) Subject: Re: ada-mode problems References: <3c7vgq$1abl@hearst.cac.psu.edu> <3d75gg$lid@kaiwan009.kaiwan.com> Sender: news@roxi.rz.fht-mannheim.de (NEWS - system account) Organization: Fachhochschule fuer Technik, Mannheim (FRG) Date: Wed, 21 Dec 94 22:11:04 CET X-Newsreader: TIN [version 1.2 PL2] Message-ID: <1994Dec21.221104.23859@roxi.rz.fht-mannheim.de> Date: 1994-12-21T22:11:04+01:00 List-Id: Hello, David D. Shochat (dshochat@kaiwan009.kaiwan.com) wrote: : emacs 19.28 : ada-mode 2.8 from cs.nyu.edu /pub/gnat I use the same versions and are relatively happy. : Some things do seem to work (e.g. indentation). Not perfectly. It gets confused after a use statement inside a package body. E.g. package body blabla is package int_io is new integer_io (integer); use int_io; now the indentation is completely different from what it would be without the use clause. : But when I try to : use the compile command from the Ada menu, I just get a "make -k" : prompt in the minibuffer. I tried changing it to gcc -c, but then : it didn't insert the file name. I suspect you are on the wrong trail here. It would be better if you could rely on make to know how to make an executable from Ada sources. Unfortunately you can't yet. If you have a C-source xyz.c and want to have the executable xyz then you can simply say make xyz. That's why emacs suggests the "make -k" command line. I use the following Makefile to achieve a similar effect with ada sources too. It declares a few new "pattern rules" (works only with GNU-make). ======================================================================= # # Makefile --- Makefile for GNU-make, make executables from Ada sources # # for OS/2 use: O = .obj E = .exe # for Unices use: ifdef HOSTNAME # a variable only defined in unix O = .o E = endif CC = gcc ADAC = $(CC) GF = -O2 -fomit-frame-pointer BF = -s %.ali %$O : %.ads %.adb $(ADAC) -c $(GF) $*.adb %.ali %$O : %.adb $(ADAC) -c $(GF) $< %.s : %.adb $(ADAC) -S $(GF) $< -o $@ %$O : %.c $(CC) -c $(CFLAGS) $< -o $@ %.s : %.c $(CC) -S $(CFLAGS) $< -o $@ %$E : %.ali %$O gnatbl $(BF) $< -o $@ ======================================================================= (Don't cut/paste this text from an xterm, the tabs are important!) Note that this Makefile doesn't contain any target. You can include it in your Makefiles and add targets or simply say "make target" when there is a target.adb source. There are a few rules to build executables from multiple sources. The dependency is chained using the *.ali files GNAT produces along with the objects. What more good ideas on using make with GNAT do you have? Dirk --- duz@roxi.rz.fht-mannheim.de