comp.lang.ada
 help / color / mirror / Atom feed
* gnatmake command line parameter - newbie question
@ 2004-09-24 15:27 Phil
  2004-09-24 15:51 ` Alex R. Mosteo
  2004-09-24 15:55 ` David C. Hoos
  0 siblings, 2 replies; 15+ messages in thread
From: Phil @ 2004-09-24 15:27 UTC (permalink / raw)


Hi,

I want to do a 

"gnatmake gmain" but have the gnatmake look in subdirectories for
dependant packages.....can you please tell me the right command?

either on windows98 or linux.

thanks............................me would be ever so grateful! :)



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: gnatmake command line parameter - newbie question
  2004-09-24 15:27 gnatmake command line parameter - newbie question Phil
@ 2004-09-24 15:51 ` Alex R. Mosteo
  2004-09-25 12:38   ` Phil
  2004-09-24 15:55 ` David C. Hoos
  1 sibling, 1 reply; 15+ messages in thread
From: Alex R. Mosteo @ 2004-09-24 15:51 UTC (permalink / raw)


Phil wrote:
> Hi,
> 
> I want to do a 
> 
> "gnatmake gmain" but have the gnatmake look in subdirectories for
> dependant packages.....can you please tell me the right command?
> 
> either on windows98 or linux.
> 
> thanks............................me would be ever so grateful! :)

Add -I<folder> for additional include folders. Check your users guide 
for more details and other parameters.



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: gnatmake command line parameter - newbie question
  2004-09-24 15:27 gnatmake command line parameter - newbie question Phil
  2004-09-24 15:51 ` Alex R. Mosteo
@ 2004-09-24 15:55 ` David C. Hoos
  2004-09-25 12:09   ` Phil
  1 sibling, 1 reply; 15+ messages in thread
From: David C. Hoos @ 2004-09-24 15:55 UTC (permalink / raw)
  To: Phil; +Cc: comp.lang.ada@ada.eu.org

Most of the answers to questions like this are at your fingertips.

For example, just typing "gnatmake" without any arguments
yields the usage summary that follows my signature.

A cursory examination of that output shows that "-Idir" (where
"dir" is the name of the directory -- sub- or not) where the other
files are to be found..

More detailed discussions are in the Gnat Users Guide and
Gnat Reference Manual which come with each gnat distribution.

Hope this helps

David Hoos

hoosd@sunv0 > gnatmake
Usage: gnatmake  opts  name  {[-cargs opts] [-bargs opts] [-largs opts]
[-margs opts]}

  name is one or more file name from which you can omit the .adb or .ads
suffix

gnatmake switches:
  -a       Consider all files, even readonly ali files
  -b       Bind only
  -B       Build, bind and link full project
  -c       Compile only
  -C       Cache source mappings: invoke compiler with temp mapping file
  -C=mapp  Cache source mappings: invoke compiler with mapping file mapp
  -D dir   Specify dir as the object directory
  -f       Force recompilations of non predefined units
  -F       Full project path name in brief error messages
  -i       In place. Replace existing ali file, or put it with source
  -jnum    Use nnn processes to compile
  -k       Keep going after compilation errors
  -l       Link only
  -m       Minimal recompilation
  -M       List object file dependences for Makefile
  -n       Check objects up to date, output next file to compile if not
  -o name  Choose an alternate executable name
  -Pproj   Use GNAT Project File proj
  -q       Be quiet/terse
  -R       Do not use a run_path_option when linking
  -s       Recompile if compiler switches have changed
  -u       Unique compilation. Only compile the given files.
  -U       Unique compilation for all sources of all projects
  -v       Display reasons for all (re)compilations
  -vPx     Specify verbosity when parsing GNAT Project Files
  -Xnm=val Specify an external reference for GNAT Project Files
  -z       No main subprogram (zero main)

  --GCC=command       Use this gcc command
  --GNATBIND=command  Use this gnatbind command
  --GNATLINK=command  Use this gnatlink command

Source and Library search path switches:
  -aLdir    Skip missing library sources if ali in dir
  -Adir     like -aLdir -aIdir
  -aOdir    Specify library/object files search path
  -aIdir    Specify source files search path
  -Idir     Like -aIdir -aOdir
  -I-       Don't look for sources & library files in the default directory
  -Ldir     Look for program libraries also in dir
  -nostdinc Don't look for sources in the system default directory
  -nostdlib Don't look for library files in the system default directory
  --RTS=dir specify the default source and object search path

To pass an arbitrary switch to the Compiler, Binder or Linker:
  -cargs opts   opts are passed to the compiler
  -bargs opts   opts are passed to the binder
  -largs opts   opts are passed to the linker
  -margs opts   opts are passed to gnatmake

Compiler switches (passed to the compiler by gnatmake):

  -fstack-check Generate stack checking code
  -fno-inline   Inhibit all inlining (makes executable smaller)
  -g            Generate debugging information
  -Idir         Specify source files search path
  -I-           Do not look for sources in current directory
  -O[0123]      Control the optimization level

  -gnata    Assertions enabled. Pragma Assert/Debug to be activated
  -gnatA    Avoid processing gnat.adc, if present file will be ignored
  -gnatb    Generate brief messages to stderr even if verbose mode set
  -gnatc    Check syntax and semantics only (no code generation)
  -gnatC    Compress names in external names and debug info tables
  -gnatd?   Compiler debug option ? ([.]a-z,A-Z,0-9), see debug.adb
  -gnatD    Debug expanded generated code rather than source code
  -gnatec=? Specify configuration pragmas file, e.g. -gnatec=/x/f.adc
  -gnateD?  Define or redefine preprocessing symbol, e.g. -gnateDsym=val
  -gnatef   Full source path in brief error messages
  -gnatem=? Specify mapping file, e.g. -gnatem=mapping
  -gnatep=? Specify preprocessing data file, e.g. -gnatep=prep.data
  -gnatE    Dynamic elaboration checking mode enabled
  -gnatf    Full errors. Verbose details, all undefined references
  -gnatF    Force all import/export external names to all uppercase
  -gnatg    GNAT implementation mode (used for compiling GNAT units)
  -gnatG    Output generated expanded code in source form
  -gnath    Output this usage (help) information
  -gnati?   Identifier char set (?=1/2/3/4/5/8/9/p/f/n/w)
  -gnatk    Limit file names to nnn characters (k = krunch)
  -gnatl    Output full source listing with embedded error messages
  -gnatL    Use longjmp/setjmp for exception handling
  -gnatmnnn Limit number of detected errors to nnn (1-999999)
  -gnatn    Inlining of subprograms (apply pragma Inline across units)
  -gnatN    Full (frontend) inlining of subprograms
  -gnato    Enable overflow checking (off by default)
  -gnatO nm Set name of output ali file (internal switch)
  -gnatp    Suppress all checks
  -gnatP    Generate periodic calls to System.Polling.Poll
  -gnatq    Don't quit, try semantics, even if parse errors
  -gnatQ    Don't quit, write ali/tree file even if compile errors
  -gnatR?   List rep inf (?=0/1/2/3 for none/types/all/variable)
  -gnats    Syntax check only
  -gnatS    Print listing of package Standard
  -gnatt    Tree output file to be generated
  -gnatTnnn All compiler tables start at nnn times usual starting size
  -gnatu    List units for this compilation
  -gnatU    Enable unique tag for error messages
  -gnatv    Verbose mode. Full error output with source lines to stdout
  -gnatVxx  Enable selected validity checking mode, xx = list of parameters:
        a    turn on all validity checking options
        c    turn on checking for copies
        C    turn off checking for copies
        d    turn on default (RM) checking
        D    turn off default (RM) checking
        f    turn on checking for floating-point
        F    turn off checking for floating-point
        i    turn on checking for in params
        I    turn off checking for in params
        m    turn on checking for in out params
        M    turn off checking for in out params
        o    turn on checking for operators/attributes
        O    turn off checking for operators/attributes
        p    turn on checking for parameters
        P    turn off checking for parameters
        r    turn on checking for returns
        R    turn off checking for returns
        s    turn on checking for subscripts
        S    turn off checking for subscripts
        t    turn on checking for tests
        T    turn off checking for tests
        n    turn off all validity checks (including RM)
  -gnatwxx  Enable selected warning modes, xx = list of parameters:
        a    turn on all optional warnings (except d,h,l)
        A    turn off all optional warnings
        c    turn on warnings for constant conditional
        C*   turn off warnings for constant conditional
        d    turn on warnings for implicit dereference
        D*   turn off warnings for implicit dereference
        e    treat all warnings as errors
        f    turn on warnings for unreferenced formal
        F*   turn off warnings for unreferenced formal
        g*   turn on warnings for unrecognized pragma
        G    turn off warnings for unrecognized pragma
        h    turn on warnings for hiding variable
        H*   turn off warnings for hiding variable
        i*   turn on warnings for implementation unit
        I    turn off warnings for implementation unit
        j    turn on warnings for obsolescent (annex J) feature
        J*   turn off warnings for obsolescent (annex J) feature
        k    turn on warnings on constant variable
        K*   turn off warnings on constant variable
        l    turn on warnings for missing elaboration pragma
        L*   turn off warnings for missing elaboration pragma
        m    turn on warnings for variable assigned but not read
        M*   turn off warnings for variable assigned but not read
        n*   normal warning mode (cancels -gnatws/-gnatwe)
        o*   turn on warnings for address clause overlay
        O    turn off warnings for address clause overlay
        p    turn on warnings for ineffective pragma inline
        P*   turn off warnings for ineffective pragma inline
        r    turn on warnings for redundant construct
        R*   turn off warnings for redundant construct
        s    suppress all warnings
        u    turn on warnings for unused entity
        U*   turn off warnings for unused entity
        v*   turn on warnings for unassigned variable
        V    turn off warnings for unassigned variable
        x*   turn on warnings for export/import
        X*   turn off warnings for export/import
        z*   turn on size/align warnings for unchecked conversion
        Z    turn off size/align warnings for unchecked conversion
        *    indicates default in above list
  -gnatW    Wide character encoding method (h/u/s/e/8/b)
  -gnatx    Suppress output of cross-reference information
  -gnatX    Language extensions permitted
  -gnaty    Enable all style checks except 'o', indent=3
  -gnatyxx  Enable selected style checks xx = list of parameters:
        1-9  check indentation
        a    check attribute casing
        b    check no blanks at end of lines
        c    check comment format
        e    check end/exit labels present
        f    check no form feeds/vertical tabs in source
        h    check no horizontal tabs in source
        i    check if-then layout
        k    check casing rules for keywords
        l    check reference manual layout
        m    check line length <= 79 characters
        n    check casing of package Standard identifiers
        Mnnn check line length <= nnn characters
        o    check subprogram bodies in alphabetical order
        p    check pragma casing
        r    check casing for identifier references
        s    check separate subprogram specs present
        t    check token separation rules
  -gnatz    Distribution stub generation (r/c for receiver/caller stubs)
  -gnatZ    Use zero cost exception handling
  -gnat83   Enforce Ada 83 restrictions

----- Original Message ----- 
From: "Phil" <philwebb@nospam.radiolink.net>
Newsgroups: comp.lang.ada
To: <comp.lang.ada@ada-france.org>
Sent: Friday, September 24, 2004 10:27 AM
Subject: gnatmake command line parameter - newbie question


> Hi,
>
> I want to do a
>
> "gnatmake gmain" but have the gnatmake look in subdirectories for
> dependant packages.....can you please tell me the right command?
>
> either on windows98 or linux.
>
> thanks............................me would be ever so grateful! :)
> _______________________________________________
> comp.lang.ada mailing list
> comp.lang.ada@ada-france.org
> http://www.ada-france.org/mailman/listinfo/comp.lang.ada
>




^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: gnatmake command line parameter - newbie question
  2004-09-24 15:55 ` David C. Hoos
@ 2004-09-25 12:09   ` Phil
  0 siblings, 0 replies; 15+ messages in thread
From: Phil @ 2004-09-25 12:09 UTC (permalink / raw)



>Most of the answers to questions like this are at your fingertips.
>
>For example, just typing "gnatmake" without any arguments
>yields the usage summary that follows my signature.
>
>A cursory examination of that output shows that "-Idir" (where
>"dir" is the name of the directory -- sub- or not) where the other
>files are to be found..
>
>More detailed discussions are in the Gnat Users Guide and
>Gnat Reference Manual which come with each gnat distribution.


I tried the reference manual. it is poorly written, that is why i
posted here.



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: gnatmake command line parameter - newbie question
  2004-09-24 15:51 ` Alex R. Mosteo
@ 2004-09-25 12:38   ` Phil
  2004-09-25 13:12     ` Frank
                       ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Phil @ 2004-09-25 12:38 UTC (permalink / raw)


On Fri, 24 Sep 2004 17:51:48 +0200, "Alex R. Mosteo"
<devnull@mailinator.com> wrote:

>Phil wrote:
>> Hi,
>> 
>> I want to do a 
>> 
>> "gnatmake gmain" but have the gnatmake look in subdirectories for
>> dependant packages.....can you please tell me the right command?
>> 
>> either on windows98 or linux.
>> 
>> thanks............................me would be ever so grateful! :)
>
>Add -I<folder> for additional include folders. Check your users guide 
>for more details and other parameters.

i have seen this command but have got something wrong, it wont work. i
did check users guide. in fact what i am trying to compile is source
code from the users guide!
i have three files...........
/home/Phil/gmain.abs
/home/Phil/testsub/greetings.adb
/home/Phil/testsub/greetings.abs

from the /home/Phil directory i type "gnatmake gmain -ldir testsub"
and get "greetings.abs not found" compilation fails.

i need to know the EXACT text to type......i am refreshing my skills
but i do know what users guides are.......i must be doing something
silly but what?

ANd once i figure this out i need a way to automatically examine all
subdirectories as required.....cross that bridge when i come to
it.....




^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: gnatmake command line parameter - newbie question
  2004-09-25 12:38   ` Phil
@ 2004-09-25 13:12     ` Frank
  2004-09-26 11:49       ` Phil
  2004-09-25 13:20     ` Marius Amado Alves
  2004-09-25 20:54     ` Jeffrey Carter
  2 siblings, 1 reply; 15+ messages in thread
From: Frank @ 2004-09-25 13:12 UTC (permalink / raw)


> >Add -I<folder> for additional include folders. Check your users guide
> >for more details and other parameters.
>
> i have seen this command but have got something wrong, it wont work. i
> did check users guide. in fact what i am trying to compile is source
> code from the users guide!
> i have three files...........
> /home/Phil/gmain.abs
> /home/Phil/testsub/greetings.adb
> /home/Phil/testsub/greetings.abs
>
> from the /home/Phil directory i type "gnatmake gmain -ldir testsub"
> and get "greetings.abs not found" compilation fails.

Hi!

Are you using "-ldir" with small letter of "L" ? The tip above says capital
of "i":  "-I<folder>"

Untested ;-)

Frank





^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: gnatmake command line parameter - newbie question
  2004-09-25 12:38   ` Phil
  2004-09-25 13:12     ` Frank
@ 2004-09-25 13:20     ` Marius Amado Alves
  2004-09-26 11:57       ` Phil
  2004-09-25 20:54     ` Jeffrey Carter
  2 siblings, 1 reply; 15+ messages in thread
From: Marius Amado Alves @ 2004-09-25 13:20 UTC (permalink / raw)
  To: comp.lang.ada

> i have three files...........
> /home/Phil/gmain.abs
> /home/Phil/testsub/greetings.adb
> /home/Phil/testsub/greetings.abs
> 
> from the /home/Phil directory i type "gnatmake gmain -ldir testsub"
> and get "greetings.abs not found" compilation fails.

I think it's -I, not -l. Try -Itestsub or -I/home/Phil/testsub.




^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: gnatmake command line parameter - newbie question
  2004-09-25 12:38   ` Phil
  2004-09-25 13:12     ` Frank
  2004-09-25 13:20     ` Marius Amado Alves
@ 2004-09-25 20:54     ` Jeffrey Carter
  2004-09-26 12:35       ` Phil
  2 siblings, 1 reply; 15+ messages in thread
From: Jeffrey Carter @ 2004-09-25 20:54 UTC (permalink / raw)


Phil wrote:

> On Fri, 24 Sep 2004 17:51:48 +0200, "Alex R. Mosteo"
> <devnull@mailinator.com> wrote:
>>Add -I<folder> for additional include folders. Check your users guide 
>>for more details and other parameters.
> 
> i have three files...........
> /home/Phil/gmain.abs
> /home/Phil/testsub/greetings.adb
> /home/Phil/testsub/greetings.abs
> 
> from the /home/Phil directory i type "gnatmake gmain -ldir testsub"
> and get "greetings.abs not found" compilation fails.

If you type "-ldir testsub" when you're instructed to type "-I<folder>" 
I doubt if you'll ever be able to do things like this on your own. I 
would suggest, in this specific case only, typing

gnatmake -Itestsub gmain

Do you have a main procedure? This list of files makes it look as if you 
don't.

-- 
Jeff Carter
"Go and boil your bottoms."
Monty Python & the Holy Grail
01




^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: gnatmake command line parameter - newbie question
  2004-09-25 13:12     ` Frank
@ 2004-09-26 11:49       ` Phil
  2004-09-26 18:34         ` OT: " Frank
  0 siblings, 1 reply; 15+ messages in thread
From: Phil @ 2004-09-26 11:49 UTC (permalink / raw)



>Are you using "-ldir" with small letter of "L" ? The tip above says capital
>of "i":  "-I<folder>"

EXACTLY! thanks :)



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: gnatmake command line parameter - newbie question
  2004-09-25 13:20     ` Marius Amado Alves
@ 2004-09-26 11:57       ` Phil
  0 siblings, 0 replies; 15+ messages in thread
From: Phil @ 2004-09-26 11:57 UTC (permalink / raw)



>I think it's -I, not -l. Try -Itestsub or -I/home/Phil/testsub.

i'm running agent newsreader in WINE. your message on my screen looks
like:

"i think it's -l, not -l."

i think what????? but then i read the other guys post as well and
mystery is solved........................
:)




^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: gnatmake command line parameter - newbie question
  2004-09-25 20:54     ` Jeffrey Carter
@ 2004-09-26 12:35       ` Phil
  2004-09-26 19:54         ` Jeffrey Carter
  2004-09-26 19:59         ` Jeffrey Carter
  0 siblings, 2 replies; 15+ messages in thread
From: Phil @ 2004-09-26 12:35 UTC (permalink / raw)



>If you type "-ldir testsub" when you're instructed to type "-I<folder>" 
>I doubt if you'll ever be able to do things like this on your own. I 

sometimes when you have something which doesn't work you need to ask
"dumb" questions. this lets you get a higher confidence in area's and
let you turn the magnifying glass on other area's where there is a
higher probability of finding the problem. when i used unix 10 to 15
years ago there was ALWAYS a white space or some non alphabet
character between parameters, say a non alphabet character if the
parameters were associated. i did try numerous permutations before
posting.

The problem was screen size/fontsize/font....don't know exactly.

I have seen advertisements for programmers where they include "social
competence" as a requirement. do you know why?
>
>gnatmake -Itestsub gmain
>
>Do you have a main procedure? This list of files makes it look as if you 
>don't.

these file names were from the GNAT user guide tutorial.




^ permalink raw reply	[flat|nested] 15+ messages in thread

* OT: Re: gnatmake command line parameter - newbie question
  2004-09-26 11:49       ` Phil
@ 2004-09-26 18:34         ` Frank
       [not found]           ` <r2nel0l91uhkc5ijtgmr7uaccs31qe5ifr@4ax.com>
  0 siblings, 1 reply; 15+ messages in thread
From: Frank @ 2004-09-26 18:34 UTC (permalink / raw)


I recognize this situation very well. During a math-exam I
misread/misunderstood "1" (digit one) and "l" (letter L)
in the text. In this way a spent 15 minuted trying to solve the task :-)).

Similar a collegue of me searched for a long time for a bug in SQLWindows
where "!" is start of comment and "!=" means
"not equal". After some time he discovered that a space had hidden between
the exclamation-sign and the equal-sign.
Lesson learned: Courier

Frank





^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: gnatmake command line parameter - newbie question
  2004-09-26 12:35       ` Phil
@ 2004-09-26 19:54         ` Jeffrey Carter
  2004-09-26 19:59         ` Jeffrey Carter
  1 sibling, 0 replies; 15+ messages in thread
From: Jeffrey Carter @ 2004-09-26 19:54 UTC (permalink / raw)


Phil wrote:

> these file names were from the GNAT user guide tutorial.

The GNAT User Guide indicates that procedure Gmain needs to be in file 
gmain.adb. You stated gmain.ads. I thought that might be a typo, but if 
it's not, the compiler will tell you.

-- 
Jeff Carter
"Sons of a silly person."
Monty Python & the Holy Grail
02




^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: gnatmake command line parameter - newbie question
  2004-09-26 12:35       ` Phil
  2004-09-26 19:54         ` Jeffrey Carter
@ 2004-09-26 19:59         ` Jeffrey Carter
  1 sibling, 0 replies; 15+ messages in thread
From: Jeffrey Carter @ 2004-09-26 19:59 UTC (permalink / raw)


Phil wrote:

> when i used unix 10 to 15
> years ago there was ALWAYS a white space or some non alphabet
> character between parameters, say a non alphabet character if the
> parameters were associated.

One thing I've learned from decades of using UNIX is that prior 
experience is never a guide to how to use a new command.

> The problem was screen size/fontsize/font....don't know exactly.

I could understand that resulting in -ltestsub or -l<testsub>. Since 
clear understanding of exactly what was posted is essential in cases 
like this, it would be a good idea to find a way to display posts that 
doesn't make 'l' and 'I' look the same.

-- 
Jeff Carter
"Sons of a silly person."
Monty Python & the Holy Grail
02




^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: OT: Re: gnatmake command line parameter - newbie question
       [not found]           ` <r2nel0l91uhkc5ijtgmr7uaccs31qe5ifr@4ax.com>
@ 2004-09-27  7:42             ` Martin Krischik
  0 siblings, 0 replies; 15+ messages in thread
From: Martin Krischik @ 2004-09-27  7:42 UTC (permalink / raw)


Dennis Lee Bieber wrote:

> On Sun, 26 Sep 2004 20:34:25 +0200, "Frank" <franjoe@frisurf.no>
> declaimed the following in comp.lang.ada:
> 
>> Lesson learned: Courier
>>
> I'll see your Courier and raise you a Lucida Console <G>

I counter with "Bitstream Vera Sans Mono" - which beats both by a little dot
inside the zero.

With Regards

Martin
-- 
mailto://krischik@users.sourceforge.net
http://www.ada.krischik.com




^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2004-09-27  7:42 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-24 15:27 gnatmake command line parameter - newbie question Phil
2004-09-24 15:51 ` Alex R. Mosteo
2004-09-25 12:38   ` Phil
2004-09-25 13:12     ` Frank
2004-09-26 11:49       ` Phil
2004-09-26 18:34         ` OT: " Frank
     [not found]           ` <r2nel0l91uhkc5ijtgmr7uaccs31qe5ifr@4ax.com>
2004-09-27  7:42             ` Martin Krischik
2004-09-25 13:20     ` Marius Amado Alves
2004-09-26 11:57       ` Phil
2004-09-25 20:54     ` Jeffrey Carter
2004-09-26 12:35       ` Phil
2004-09-26 19:54         ` Jeffrey Carter
2004-09-26 19:59         ` Jeffrey Carter
2004-09-24 15:55 ` David C. Hoos
2004-09-25 12:09   ` Phil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox