33.4 Interdependencies of the Aldor Source Files

  33.4.1 src/asfiles.list
  33.4.2 src/Makefile.dep

Instead of listing here the dependencies of the source files directly, we parse the source files and generate the file src/Makefile.dep with all the relevant dependencies.

The basic idea is that we parse each .as file (which lies in the same directory as its corresponding .as.nw file) for constructor names that are defined in that file. Finally, we interrelate these data via tools/dependencies.pl.nw in order to obtain src/Makefile.dep.

Note that extensions of domains are not yet reliably resolved. For the moment one has to give explicit dependencies that should be listed in Makefile.def.nw in the following format

libmyalps${LIBPOSTFIX}(mybasic.${FILEEXTENSION}):\  
    libmyalps${LIBPOSTFIX}(myout.${FILEEXTENSION})

where myalps and my have to be replaced accordingly by the name and prefix of the project.

As an auxiliary file src/asfiles.list is generated.

466generate interdependencies of files 466  (458 539)  547
Makefile.dep: asfiles.list $(CODEFILES)
        $(PERL) $(TOOLS)/dependencies.pl \
                asfiles.list ${LIBRARYNAME} ${PROJECTROOT} > $@

asfiles.list: Makefile.nw Makefile.asfiles
        -$(RM) asfiles.list
        (for f in ${ASFILES}; do \
          echo ${LIBRARYNAME} src/$$f ${LIBPREFIX} >> $@; \
        done)

include Makefile.dep

Defines:
asfiles.list, used in chunks 460 and 547.

Uses ASFILES 462, CODEFILES 432, LIBPREFIX 124, LIBRARYNAME 124, PERL 427b, PROJECTROOT 346, and TOOLS 423b.

33.4.1 src/asfiles.list

The file src/asfiles.list is generated via the target asfiles.list and given below.

myalps src/myalps/arith my  
myalps src/myalps/binpow my  
myalps src/myalps/copy my  
myalps src/myalps/prtype my  
myalps src/myalps/version my

33.4.2 src/Makefile.dep

The file src/Makefile.dep generated by tools/dependencies.pl.nw is given below. It is included into src/Makefile.nw.

By default the dependencies are minimized, since MAKE will take care of dependency lines. If for some reason one wants a saturated list of dependencies, see Section 38.6.

Sections 38.6 and 29.7.2 explain the meaning of the variables FILEEXTENSION and LIBPOSTFIX.

# Generated via  
# /home/hemmecke/SVK/HOME/trunk/projects/Software/allprose/tools/dependencies.pl \  
#   asfiles.list \  
#   myalps \  
#   /home/hemmecke/SVK/HOME/trunk/projects/Software/allprose  
libmyalps${LIBPOSTFIX}(myarith.${FILEEXTENSION}):\  
    libmyalps${LIBPOSTFIX}(myprtype.${FILEEXTENSION})