comp.lang.ada
 help / color / mirror / Atom feed
From: "David C. Hoos" <david.c.hoos.sr@ada95.com>
To: "Phil" <philwebb@nospam.radiolink.net>
Cc: "comp.lang.ada@ada.eu.org" <comp.lang.ada@ada-france.org>
Subject: Re: gnatmake command line parameter - newbie question
Date: Fri, 24 Sep 2004 10:55:32 -0500
Date: 2004-09-24T10:55:32-05:00	[thread overview]
Message-ID: <mailman.89.1096041356.390.comp.lang.ada@ada-france.org> (raw)
In-Reply-To: b3f8l01ckudkkb23t9ekd3hbih0u8dv0j4@4ax.com

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
>




  parent reply	other threads:[~2004-09-24 15:55 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2004-09-25 12:09   ` Phil
replies disabled

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