This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[Ada] Support for building Ada utilities to autogenerate files


I checked in the patch below, which adds support for automatically
generating the treeprs.ads, [es]info.h and nmake.ad[bs] files when
needed. These rules in effect require a complete GNAT installation.
For official GCC releases we should include the generated files,
but I think this approach should be fine for developers working from
the CVS files.

Another change is to generate the files in the build directory
rather than in the source directory, which indeed seems cleaner to me.

  -Geert

2001-10-08  Geert Bosch  <bosch@gnat.com>

        * Makefile.in (treeprs.ads, einfo.h, sinfo.h, nmake.adb, nmake.ads):
        Automatically build utilities when files need to be regenerated.

Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/Makefile.in,v
retrieving revision 1.2
diff -p -r1.2 Makefile.in
*** Makefile.in 2001/10/08 17:58:31     1.2
--- Makefile.in 2001/10/08 23:42:01
*************** b_gnatdll.c : $(GNATDLL_OBJS)
*** 2416,2435 ****
        $(GNATBIND) $(ADA_INCLUDES) -o b_gnatdll.c gnatdll.ali
  b_gnatdll.o : b_gnatdll.c
  
! $(srcdir)/treeprs.ads : treeprs.adt sinfo.ads xtreeprs.spt
!       (cd $(srcdir); xtreeprs)
  
! $(srcdir)/einfo.h : einfo.ads einfo.adb xeinfo.spt
!       (cd $(srcdir); xeinfo einfo.h)
  
! $(srcdir)/sinfo.h : sinfo.ads xsinfo.spt
!       (cd $(srcdir); xsinfo sinfo.h)
  
! $(srcdir)/nmake.adb : nmake.adt sinfo.ads xnmake.spt
!       (cd $(srcdir); xnmake)
  
! $(srcdir)/nmake.ads :  nmake.adt sinfo.ads xnmake.spt
!       (cd $(srcdir); xnmake)
  
  ADA_INCLUDE_DIR = $(libsubdir)/adainclude
  ADA_RTL_OBJ_DIR = $(libsubdir)/adalib
--- 2416,2445 ----
        $(GNATBIND) $(ADA_INCLUDES) -o b_gnatdll.c gnatdll.ali
  b_gnatdll.o : b_gnatdll.c
  
! treeprs.ads : treeprs.adt sinfo.ads xtreeprs.adb
!       -$(MKDIR) bldtools
!       $(CP) $^ bldtools
!       (cd bldtools; gnatmake -q xtreeprs ; ./xtreeprs ../treeprs.ads )
  
! einfo.h : einfo.ads einfo.adb xeinfo.adb
!       -$(MKDIR) bldtools
!       $(CP) $^ bldtools
!       (cd bldtools; gnatmake -q xeinfo ; ./xeinfo ../einfo.h )
  
! sinfo.h : sinfo.ads xsinfo.adb
!       -$(MKDIR) bldtools
!       $(CP) $^ bldtools
!       (cd bldtools; gnatmake -q xsinfo ; ./xsinfo ../sinfo.h )
  
! nmake.adb : sinfo.ads nmake.adt xnmake.adb
!       -$(MKDIR) bldtools
!       $(CP) $^ bldtools
!       (cd bldtools; gnatmake -q xnmake ; ./xnmake -b ../nmake.adb )
  
! nmake.ads :  sinfo.ads nmake.adt xnmake.adb
!       -$(MKDIR) bldtools
!       $(CP) $^ bldtools
!       (cd bldtools; gnatmake -q xnmake ; ./xnmake -s ../nmake.ads )
  
  ADA_INCLUDE_DIR = $(libsubdir)/adainclude
  ADA_RTL_OBJ_DIR = $(libsubdir)/adalib




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]