OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [ada/] [Make-generated.in] - Rev 847

Go to most recent revision | Compare with Previous | Blame | View Log

# Dependencies for compiler sources that are generated at build time

# Note: can't use ?= here, not supported by older versions of GNU Make

ifeq ($(origin ADA_GEN_SUBDIR), undefined)
ADA_GEN_SUBDIR=ada
endif

ifeq ($(origin CP), undefined)
CP=cp
endif

ifeq ($(origin MKDIR), undefined)
MKDIR=mkdir -p
endif

ifeq ($(origin MOVE_IF_CHANGE), undefined)
MOVE_IF_CHANGE=mv -f
endif

ada_extra_files : $(ADA_GEN_SUBDIR)/treeprs.ads $(ADA_GEN_SUBDIR)/einfo.h $(ADA_GEN_SUBDIR)/sinfo.h $(ADA_GEN_SUBDIR)/nmake.adb \
        $(ADA_GEN_SUBDIR)/nmake.ads $(ADA_GEN_SUBDIR)/snames.ads $(ADA_GEN_SUBDIR)/snames.adb $(ADA_GEN_SUBDIR)/snames.h

# We delete the files before copying, below, in case they are read-only.

$(ADA_GEN_SUBDIR)/treeprs.ads : $(ADA_GEN_SUBDIR)/treeprs.adt $(ADA_GEN_SUBDIR)/sinfo.ads $(ADA_GEN_SUBDIR)/xtreeprs.adb
        -$(MKDIR) $(ADA_GEN_SUBDIR)/bldtools/treeprs
        $(RM) $(addprefix $(ADA_GEN_SUBDIR)/bldtools/treeprs/,$(notdir $^))
        $(CP) $^ $(ADA_GEN_SUBDIR)/bldtools/treeprs
        (cd $(ADA_GEN_SUBDIR)/bldtools/treeprs; gnatmake -q xtreeprs ; ./xtreeprs ../../treeprs.ads )

$(ADA_GEN_SUBDIR)/einfo.h : $(ADA_GEN_SUBDIR)/einfo.ads $(ADA_GEN_SUBDIR)/einfo.adb $(ADA_GEN_SUBDIR)/xeinfo.adb
        -$(MKDIR) $(ADA_GEN_SUBDIR)/bldtools/einfo
        $(RM) $(addprefix $(ADA_GEN_SUBDIR)/bldtools/einfo/,$(notdir $^))
        $(CP) $^ $(ADA_GEN_SUBDIR)/bldtools/einfo
        (cd $(ADA_GEN_SUBDIR)/bldtools/einfo; gnatmake -q xeinfo ; ./xeinfo ../../einfo.h )

$(ADA_GEN_SUBDIR)/sinfo.h : $(ADA_GEN_SUBDIR)/sinfo.ads $(ADA_GEN_SUBDIR)/xsinfo.adb
        -$(MKDIR) $(ADA_GEN_SUBDIR)/bldtools/sinfo
        $(RM) $(addprefix $(ADA_GEN_SUBDIR)/bldtools/sinfo/,$(notdir $^))
        $(CP) $^ $(ADA_GEN_SUBDIR)/bldtools/sinfo
        (cd $(ADA_GEN_SUBDIR)/bldtools/sinfo; gnatmake -q xsinfo ; ./xsinfo ../../sinfo.h )

$(ADA_GEN_SUBDIR)/snames.h $(ADA_GEN_SUBDIR)/snames.ads $(ADA_GEN_SUBDIR)/snames.adb : $(ADA_GEN_SUBDIR)/stamp-snames ; @true
$(ADA_GEN_SUBDIR)/stamp-snames : $(ADA_GEN_SUBDIR)/snames.ads-tmpl $(ADA_GEN_SUBDIR)/snames.adb-tmpl $(ADA_GEN_SUBDIR)/snames.h-tmpl $(ADA_GEN_SUBDIR)/xsnamest.adb $(ADA_GEN_SUBDIR)/xutil.ads $(ADA_GEN_SUBDIR)/xutil.adb
        -$(MKDIR) $(ADA_GEN_SUBDIR)/bldtools/snamest
        $(RM) $(addprefix $(ADA_GEN_SUBDIR)/bldtools/snamest/,$(notdir $^))
        $(CP) $^ $(ADA_GEN_SUBDIR)/bldtools/snamest
        (cd $(ADA_GEN_SUBDIR)/bldtools/snamest; gnatmake -q xsnamest ; ./xsnamest )
        $(MOVE_IF_CHANGE) $(ADA_GEN_SUBDIR)/bldtools/snamest/snames.ns $(ADA_GEN_SUBDIR)/snames.ads
        $(MOVE_IF_CHANGE) $(ADA_GEN_SUBDIR)/bldtools/snamest/snames.nb $(ADA_GEN_SUBDIR)/snames.adb
        $(MOVE_IF_CHANGE) $(ADA_GEN_SUBDIR)/bldtools/snamest/snames.nh $(ADA_GEN_SUBDIR)/snames.h
        touch $(ADA_GEN_SUBDIR)/stamp-snames

$(ADA_GEN_SUBDIR)/nmake.adb : $(ADA_GEN_SUBDIR)/sinfo.ads $(ADA_GEN_SUBDIR)/nmake.adt $(ADA_GEN_SUBDIR)/xnmake.adb $(ADA_GEN_SUBDIR)/xutil.ads $(ADA_GEN_SUBDIR)/xutil.adb
        -$(MKDIR) $(ADA_GEN_SUBDIR)/bldtools/nmake_b
        $(RM) $(addprefix $(ADA_GEN_SUBDIR)/bldtools/nmake_b/,$(notdir $^))
        $(CP) $^ $(ADA_GEN_SUBDIR)/bldtools/nmake_b
        (cd $(ADA_GEN_SUBDIR)/bldtools/nmake_b; gnatmake -q xnmake ; ./xnmake -b ../../nmake.adb )

$(ADA_GEN_SUBDIR)/nmake.ads :  $(ADA_GEN_SUBDIR)/sinfo.ads $(ADA_GEN_SUBDIR)/nmake.adt $(ADA_GEN_SUBDIR)/xnmake.adb $(ADA_GEN_SUBDIR)/nmake.adb $(ADA_GEN_SUBDIR)/xutil.ads $(ADA_GEN_SUBDIR)/xutil.adb
        -$(MKDIR) $(ADA_GEN_SUBDIR)/bldtools/nmake_s
        $(RM) $(addprefix $(ADA_GEN_SUBDIR)/bldtools/nmake_s/,$(notdir $^))
        $(CP) $^ $(ADA_GEN_SUBDIR)/bldtools/nmake_s
        (cd $(ADA_GEN_SUBDIR)/bldtools/nmake_s; gnatmake -q xnmake ; ./xnmake -s ../../nmake.ads )

ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(subst -, ,$(host)))),)
OSCONS_CPP=../../../$(DECC) -E /comment=as_is -DNATIVE \
             -DTARGET='""$(target)""' s-oscons-tmplt.c

OSCONS_EXTRACT=../../../$(DECC) -DNATIVE \
                 -DTARGET='""$(target)""' s-oscons-tmplt.c ; \
  ld -o s-oscons-tmplt.exe s-oscons-tmplt.obj; \
  ./s-oscons-tmplt.exe > s-oscons-tmplt.s

else
# GCC_FOR_TARGET has paths relative to the gcc directory, so we need to ajust
# for running it from $(ADA_GEN_SUBDIR)/bldtools/oscons
OSCONS_CC=`echo "$(GCC_FOR_TARGET)" \
  | sed -e 's^\./xgcc^../../../xgcc^' -e 's^-B./^-B../../../^'`
OSCONS_CPP=$(OSCONS_CC) $(GNATLIBCFLAGS) -E -C \
  -DTARGET=\"$(target)\" s-oscons-tmplt.c > s-oscons-tmplt.i
OSCONS_EXTRACT=$(OSCONS_CC) -S s-oscons-tmplt.i
endif

$(ADA_GEN_SUBDIR)/s-oscons.ads : $(ADA_GEN_SUBDIR)/s-oscons-tmplt.c $(ADA_GEN_SUBDIR)/gsocket.h $(ADA_GEN_SUBDIR)/xoscons.adb $(ADA_GEN_SUBDIR)/xutil.ads $(ADA_GEN_SUBDIR)/xutil.adb
        -$(MKDIR) $(ADA_GEN_SUBDIR)/bldtools/oscons
        $(RM) $(addprefix $(ADA_GEN_SUBDIR)/bldtools/oscons/,$(notdir $^))
        $(CP) $^ $(ADA_GEN_SUBDIR)/bldtools/oscons
        (cd $(ADA_GEN_SUBDIR)/bldtools/oscons ; gnatmake -q xoscons ; \
                $(RM) s-oscons-tmplt.i s-oscons-tmplt.s ; \
                $(OSCONS_CPP) ; \
                $(OSCONS_EXTRACT) ; \
                ./xoscons ; \
                $(RM) ../../s-oscons.ads ; \
                $(CP) s-oscons.ads s-oscons.h ../../)

$(ADA_GEN_SUBDIR)/sdefault.adb: $(ADA_GEN_SUBDIR)/stamp-sdefault ; @true
$(ADA_GEN_SUBDIR)/stamp-sdefault : $(srcdir)/version.c Makefile
        $(ECHO) "pragma Style_Checks (Off);" >tmp-sdefault.adb
        $(ECHO) "with Osint; use Osint;" >>tmp-sdefault.adb
        $(ECHO) "package body Sdefault is" >>tmp-sdefault.adb
        $(ECHO) "   S0 : constant String := \"$(prefix)/\";" >>tmp-sdefault.adb
        $(ECHO) "   S1 : constant String := \"$(ADA_INCLUDE_DIR)/\";" >>tmp-sdefault.adb
        $(ECHO) "   S2 : constant String := \"$(ADA_RTL_OBJ_DIR)/\";" >>tmp-sdefault.adb
        $(ECHO) "   S3 : constant String := \"$(target)/\";" >>tmp-sdefault.adb
        $(ECHO) "   S4 : constant String := \"$(libsubdir)/\";" >>tmp-sdefault.adb
        $(ECHO) "   function Include_Dir_Default_Name return String_Ptr is" >>tmp-sdefault.adb
        $(ECHO) "   begin" >>tmp-sdefault.adb
        $(ECHO) "      return Relocate_Path (S0, S1);" >>tmp-sdefault.adb
        $(ECHO) "   end Include_Dir_Default_Name;" >>tmp-sdefault.adb
        $(ECHO) "   function Object_Dir_Default_Name return String_Ptr is" >>tmp-sdefault.adb
        $(ECHO) "   begin" >>tmp-sdefault.adb
        $(ECHO) "      return Relocate_Path (S0, S2);" >>tmp-sdefault.adb
        $(ECHO) "   end Object_Dir_Default_Name;" >>tmp-sdefault.adb
        $(ECHO) "   function Target_Name return String_Ptr is" >>tmp-sdefault.adb
        $(ECHO) "   begin" >>tmp-sdefault.adb
        $(ECHO) "      return new String'(S3);" >>tmp-sdefault.adb
        $(ECHO) "   end Target_Name;" >>tmp-sdefault.adb
        $(ECHO) "   function Search_Dir_Prefix return String_Ptr is" >>tmp-sdefault.adb
        $(ECHO) "   begin" >>tmp-sdefault.adb
        $(ECHO) "      return Relocate_Path (S0, S4);" >>tmp-sdefault.adb
        $(ECHO) "   end Search_Dir_Prefix;" >>tmp-sdefault.adb
        $(ECHO) "end Sdefault;" >> tmp-sdefault.adb
        $(MOVE_IF_CHANGE) tmp-sdefault.adb $(ADA_GEN_SUBDIR)/sdefault.adb
        touch $(ADA_GEN_SUBDIR)/stamp-sdefault

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.