This is the mail archive of the gcc@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]
Other format: [Raw text]

Re: [Ada] some parallel build fixes


> Could someone at ACT forward us the script if it's still there?

Actually we read the ali files directly. Here is the relevant part:

<<
mv Makefile.in Makefile.in.old
echo "# regular dependencies" > deps.tmp

for name_adl in `ls *.ali | grep -v sdefault`; do
  awk ' BEGIN { \
           first = 0; \
           len_line = 0;\
           } \
\
        /^U/ && (first == 0)  {\
           split ($3, a, ".");\
           len_line += length(a[1]) + 5;\
           printf("%s.o : ", a[1]); \
           first = 1;\
           }\
        /^D/ {\
           len_line += length($2) + 1;\
           if (len_line > 75) {\
              printf("\\\n   ");\
              len_line = length($2) + 4;\
              }\
           printf ("%s ",$2);\
           }\
       END {\
          printf("\n\n");\
          }'  $name_adl >> deps.tmp
done

echo "# end of regular dependencies" >> deps.tmp

sed -e '/^# regular dependencies/,/^# end of regular/d' \
    -e '/^# GNAT DEPENDENCIES/r deps.tmp' < Makefile.in.old > Makefile.in
>>

> Otherwise I'll try to cook it up, a bit of sed
> s,../../gcc/ada,\$(srcdir) on the output of the command given after my
> signature is the starting point.

Note that with the VPATH directive, you do not have to bother with ../../..
paths, only the file names matter.

Arno


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