1 |
706 |
jeremybenn |
# Dependencies for compiler sources that are generated at build time
|
2 |
|
|
|
3 |
|
|
# Note: can't use ?= here, not supported by older versions of GNU Make
|
4 |
|
|
|
5 |
|
|
ifeq ($(origin ADA_GEN_SUBDIR), undefined)
|
6 |
|
|
ADA_GEN_SUBDIR=ada
|
7 |
|
|
endif
|
8 |
|
|
|
9 |
|
|
ifeq ($(origin CP), undefined)
|
10 |
|
|
CP=cp
|
11 |
|
|
endif
|
12 |
|
|
|
13 |
|
|
ifeq ($(origin MKDIR), undefined)
|
14 |
|
|
MKDIR=mkdir -p
|
15 |
|
|
endif
|
16 |
|
|
|
17 |
|
|
ifeq ($(origin MOVE_IF_CHANGE), undefined)
|
18 |
|
|
MOVE_IF_CHANGE=mv -f
|
19 |
|
|
endif
|
20 |
|
|
|
21 |
|
|
ada_extra_files : $(ADA_GEN_SUBDIR)/treeprs.ads $(ADA_GEN_SUBDIR)/einfo.h $(ADA_GEN_SUBDIR)/sinfo.h $(ADA_GEN_SUBDIR)/nmake.adb \
|
22 |
|
|
$(ADA_GEN_SUBDIR)/nmake.ads $(ADA_GEN_SUBDIR)/snames.ads $(ADA_GEN_SUBDIR)/snames.adb $(ADA_GEN_SUBDIR)/snames.h
|
23 |
|
|
|
24 |
|
|
# We delete the files before copying, below, in case they are read-only.
|
25 |
|
|
|
26 |
|
|
$(ADA_GEN_SUBDIR)/treeprs.ads : $(ADA_GEN_SUBDIR)/treeprs.adt $(ADA_GEN_SUBDIR)/sinfo.ads $(ADA_GEN_SUBDIR)/xtreeprs.adb
|
27 |
|
|
-$(MKDIR) $(ADA_GEN_SUBDIR)/bldtools/treeprs
|
28 |
|
|
$(RM) $(addprefix $(ADA_GEN_SUBDIR)/bldtools/treeprs/,$(notdir $^))
|
29 |
|
|
$(CP) $^ $(ADA_GEN_SUBDIR)/bldtools/treeprs
|
30 |
|
|
(cd $(ADA_GEN_SUBDIR)/bldtools/treeprs; gnatmake -q xtreeprs ; ./xtreeprs ../../treeprs.ads )
|
31 |
|
|
|
32 |
|
|
$(ADA_GEN_SUBDIR)/einfo.h : $(ADA_GEN_SUBDIR)/einfo.ads $(ADA_GEN_SUBDIR)/einfo.adb $(ADA_GEN_SUBDIR)/xeinfo.adb $(ADA_GEN_SUBDIR)/ceinfo.adb
|
33 |
|
|
-$(MKDIR) $(ADA_GEN_SUBDIR)/bldtools/einfo
|
34 |
|
|
$(RM) $(addprefix $(ADA_GEN_SUBDIR)/bldtools/einfo/,$(notdir $^))
|
35 |
|
|
$(CP) $^ $(ADA_GEN_SUBDIR)/bldtools/einfo
|
36 |
|
|
(cd $(ADA_GEN_SUBDIR)/bldtools/einfo; gnatmake -q xeinfo ; ./xeinfo ../../einfo.h )
|
37 |
|
|
|
38 |
|
|
$(ADA_GEN_SUBDIR)/sinfo.h : $(ADA_GEN_SUBDIR)/sinfo.ads $(ADA_GEN_SUBDIR)/sinfo.adb $(ADA_GEN_SUBDIR)/xsinfo.adb $(ADA_GEN_SUBDIR)/csinfo.adb
|
39 |
|
|
-$(MKDIR) $(ADA_GEN_SUBDIR)/bldtools/sinfo
|
40 |
|
|
$(RM) $(addprefix $(ADA_GEN_SUBDIR)/bldtools/sinfo/,$(notdir $^))
|
41 |
|
|
$(CP) $^ $(ADA_GEN_SUBDIR)/bldtools/sinfo
|
42 |
|
|
(cd $(ADA_GEN_SUBDIR)/bldtools/sinfo; gnatmake -q xsinfo ; ./xsinfo ../../sinfo.h )
|
43 |
|
|
|
44 |
|
|
$(ADA_GEN_SUBDIR)/snames.h $(ADA_GEN_SUBDIR)/snames.ads $(ADA_GEN_SUBDIR)/snames.adb : $(ADA_GEN_SUBDIR)/stamp-snames ; @true
|
45 |
|
|
$(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
|
46 |
|
|
-$(MKDIR) $(ADA_GEN_SUBDIR)/bldtools/snamest
|
47 |
|
|
$(RM) $(addprefix $(ADA_GEN_SUBDIR)/bldtools/snamest/,$(notdir $^))
|
48 |
|
|
$(CP) $^ $(ADA_GEN_SUBDIR)/bldtools/snamest
|
49 |
|
|
(cd $(ADA_GEN_SUBDIR)/bldtools/snamest; gnatmake -q xsnamest ; ./xsnamest )
|
50 |
|
|
$(MOVE_IF_CHANGE) $(ADA_GEN_SUBDIR)/bldtools/snamest/snames.ns $(ADA_GEN_SUBDIR)/snames.ads
|
51 |
|
|
$(MOVE_IF_CHANGE) $(ADA_GEN_SUBDIR)/bldtools/snamest/snames.nb $(ADA_GEN_SUBDIR)/snames.adb
|
52 |
|
|
$(MOVE_IF_CHANGE) $(ADA_GEN_SUBDIR)/bldtools/snamest/snames.nh $(ADA_GEN_SUBDIR)/snames.h
|
53 |
|
|
touch $(ADA_GEN_SUBDIR)/stamp-snames
|
54 |
|
|
|
55 |
|
|
$(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
|
56 |
|
|
-$(MKDIR) $(ADA_GEN_SUBDIR)/bldtools/nmake_b
|
57 |
|
|
$(RM) $(addprefix $(ADA_GEN_SUBDIR)/bldtools/nmake_b/,$(notdir $^))
|
58 |
|
|
$(CP) $^ $(ADA_GEN_SUBDIR)/bldtools/nmake_b
|
59 |
|
|
(cd $(ADA_GEN_SUBDIR)/bldtools/nmake_b; gnatmake -q xnmake ; ./xnmake -b ../../nmake.adb )
|
60 |
|
|
|
61 |
|
|
$(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
|
62 |
|
|
-$(MKDIR) $(ADA_GEN_SUBDIR)/bldtools/nmake_s
|
63 |
|
|
$(RM) $(addprefix $(ADA_GEN_SUBDIR)/bldtools/nmake_s/,$(notdir $^))
|
64 |
|
|
$(CP) $^ $(ADA_GEN_SUBDIR)/bldtools/nmake_s
|
65 |
|
|
(cd $(ADA_GEN_SUBDIR)/bldtools/nmake_s; gnatmake -q xnmake ; ./xnmake -s ../../nmake.ads )
|
66 |
|
|
|
67 |
|
|
$(ADA_GEN_SUBDIR)/sdefault.adb: $(ADA_GEN_SUBDIR)/stamp-sdefault ; @true
|
68 |
|
|
$(ADA_GEN_SUBDIR)/stamp-sdefault : $(srcdir)/version.c Makefile
|
69 |
|
|
$(ECHO) "pragma Style_Checks (Off);" >tmp-sdefault.adb
|
70 |
|
|
$(ECHO) "with Osint; use Osint;" >>tmp-sdefault.adb
|
71 |
|
|
$(ECHO) "package body Sdefault is" >>tmp-sdefault.adb
|
72 |
|
|
$(ECHO) " S0 : constant String := \"$(prefix)/\";" >>tmp-sdefault.adb
|
73 |
|
|
$(ECHO) " S1 : constant String := \"$(ADA_INCLUDE_DIR)/\";" >>tmp-sdefault.adb
|
74 |
|
|
$(ECHO) " S2 : constant String := \"$(ADA_RTL_OBJ_DIR)/\";" >>tmp-sdefault.adb
|
75 |
|
|
$(ECHO) " S3 : constant String := \"$(target_noncanonical)/\";" >>tmp-sdefault.adb
|
76 |
|
|
$(ECHO) " S4 : constant String := \"$(libsubdir)/\";" >>tmp-sdefault.adb
|
77 |
|
|
$(ECHO) " function Include_Dir_Default_Name return String_Ptr is" >>tmp-sdefault.adb
|
78 |
|
|
$(ECHO) " begin" >>tmp-sdefault.adb
|
79 |
|
|
$(ECHO) " return Relocate_Path (S0, S1);" >>tmp-sdefault.adb
|
80 |
|
|
$(ECHO) " end Include_Dir_Default_Name;" >>tmp-sdefault.adb
|
81 |
|
|
$(ECHO) " function Object_Dir_Default_Name return String_Ptr is" >>tmp-sdefault.adb
|
82 |
|
|
$(ECHO) " begin" >>tmp-sdefault.adb
|
83 |
|
|
$(ECHO) " return Relocate_Path (S0, S2);" >>tmp-sdefault.adb
|
84 |
|
|
$(ECHO) " end Object_Dir_Default_Name;" >>tmp-sdefault.adb
|
85 |
|
|
$(ECHO) " function Target_Name return String_Ptr is" >>tmp-sdefault.adb
|
86 |
|
|
$(ECHO) " begin" >>tmp-sdefault.adb
|
87 |
|
|
$(ECHO) " return new String'(S3);" >>tmp-sdefault.adb
|
88 |
|
|
$(ECHO) " end Target_Name;" >>tmp-sdefault.adb
|
89 |
|
|
$(ECHO) " function Search_Dir_Prefix return String_Ptr is" >>tmp-sdefault.adb
|
90 |
|
|
$(ECHO) " begin" >>tmp-sdefault.adb
|
91 |
|
|
$(ECHO) " return Relocate_Path (S0, S4);" >>tmp-sdefault.adb
|
92 |
|
|
$(ECHO) " end Search_Dir_Prefix;" >>tmp-sdefault.adb
|
93 |
|
|
$(ECHO) "end Sdefault;" >> tmp-sdefault.adb
|
94 |
|
|
$(MOVE_IF_CHANGE) tmp-sdefault.adb $(ADA_GEN_SUBDIR)/sdefault.adb
|
95 |
|
|
touch $(ADA_GEN_SUBDIR)/stamp-sdefault
|
96 |
|
|
|
97 |
|
|
$(ADA_GEN_SUBDIR)/gnat.hlp : $(ADA_GEN_SUBDIR)/vms_help.adb $(ADA_GEN_SUBDIR)/vms_cmds.ads $(ADA_GEN_SUBDIR)/gnat.help_in $(ADA_GEN_SUBDIR)/vms_data.ads
|
98 |
|
|
-$(MKDIR) $(ADA_GEN_SUBDIR)/bldtools/gnat_hlp
|
99 |
|
|
$(RM) $(addprefix $(ADA_GEN_SUBDIR)/bldtools/gnat_hlp/,$(notdir $^))
|
100 |
|
|
$(CP) $^ $(ADA_GEN_SUBDIR)/bldtools/gnat_hlp
|
101 |
|
|
(cd $(ADA_GEN_SUBDIR)/bldtools/gnat_hlp; \
|
102 |
|
|
gnatmake -q vms_help; \
|
103 |
|
|
./vms_help$(build_exeext) gnat.help_in vms_data.ads ../../gnat.hlp)
|