# $HeadURL$ $LastChangedRevision$ ############################################################################## # # PREAMBLE # ############################################################################## # The included file will define ADE_MF_MODROOT_DIR include $(ADEROOT)/include/bin/Makefile ############################################################################## # # MODULE-SPECIFIC VARIABLES USED ONLY IN THIS FILE # ############################################################################## ADESPPSTAGE0_ORDDSRCS = adespp.pl.spp $(UTILS_PL_SPP) $(GEP_PL_SPP) # No install command or flags specified because we will use the ADE-suggested # values in the install target. ############################################################################## # # MODULE-SPECIFIC DEPENDENCIES FOR STANDARD TARGETS # ############################################################################## compile: adeconf adespp adetest aderel adegmt aderoot adeinst ############################################################################## # # MODULE-SPECIFIC DEPENDENCIES FOR NON-STANDARD TARGETS # ############################################################################## # All programs must be rebuilt if the compiler is rebuilt. adeconf: adeconf.sh.spp adespp adegmt: adegmt.sh.spp adespp adeinst: adeinst.sh.spp adespp aderel: aderel.pl.spp adespp aderoot: aderoot.sh.spp adespp adespp: adespp_stage3 adetest: adetest.sh.spp adespp adespp_stage3: adespp_stage2 # There is a pattern based recipe which could apply to adespp_stage2, but # we explicitly provide a recipe below, and so it is ignored. Because it # is ignored, make does not know that paths.spp is a dependency, so we # must explicitly mention it. There is no point in mentioning it for adespp # itself, because that is just made with a 'cp' command, and there is # a risk - if we define it for adespp3 - that if the paths change then # adespp_stage3 will get rebuilt successfully but could - if the paths # have actually changed - differ from adespp_stage2. So better to # specify then here. adespp_stage1 is not 'paths-aware' anyware so there # is no point in putting it there. adespp_stage2: adespp_stage1 $(PATHS_SPP) adespp_stage1: $(ADESPPSTAGE0_ORDDSRCS) .INTERMEDIATE: adespp_stage3 adespp_stage2 adespp_stage1 ############################################################################## # # MODULE-SPECIFIC RECIPES FOR STANDARD TARGETS # ############################################################################## install: $(ADE_MF_INSTALL_CMD) $(ADE_MF_INSTALL_FLAGS) adeconf \ adespp adetest aderel adegmt aderoot adeinst \ $(ADE_MF_INSTALL_DIR) clean: rm -f adeconf adespp adetest aderel adegmt aderoot adeinst \ adespp_stage1 adespp_stage2 adespp_stage3 ############################################################################## # # MODULE-SPECIFIC RECIPES FOR NON-STANDARD TARGETS # ############################################################################## adespp_stage1: @#echo "Compiling (path-unaware) stage1 compiler (with sed) ..." sed -e "s%SPPSYM_PERL_CMD%$(PERL_CMD)%g" \ $(ADESPPSTAGE0_ORDDSRCS) > $@ chmod a+rx $@ adespp_stage2: @#echo "Compiling (path-aware) stage2 compiler (with path-unaware stage1 compiler) ..." @# We should not use ADE_MF_*; modules are not supposed @# to know about those variables, but here we have no @# choice because we are providing our own recipe to @# make something from an .spp. ./adespp_stage1 $(ADE_MF_ADESPP_FLAGS) adespp.pl.spp $@ adespp_stage3: @#echo "Compiling (path-aware) stage3 compiler (with path-aware stage2 compiler, just for comparison checking) ..." @# We should not use ADE_MF_*; modules are not supposed @# to know about those variables, but here we have no @# choice because we are providing our own recipe to @# make something from an .spp. ./adespp_stage2 $(ADE_MF_ADESPP_FLAGS) adespp.pl.spp $@ [ "`egrep -v '#.*Generated.*:.*' adespp_stage3 | sum`" = "`egrep -v '#.*Generated.*:.*' adespp_stage2 | sum`" ] adespp: cp $^ $@