diff options
Diffstat (limited to 'utils/parallel')
-rw-r--r-- | utils/parallel/Makefile | 60 |
1 files changed, 28 insertions, 32 deletions
diff --git a/utils/parallel/Makefile b/utils/parallel/Makefile index 094c5cbba1..b297de04c5 100644 --- a/utils/parallel/Makefile +++ b/utils/parallel/Makefile @@ -1,49 +1,45 @@ TOP=../.. include $(TOP)/mk/boilerplate.mk +# +# You'll only get this with Parallel Haskell or +# GranSim.. +# +ifeq "$(BuildingParallel)" "YES" +INSTALL_PARALLEL_SCRIPTS = YES +endif +ifeq "$(BuildingGranSim)" "YES" +INSTALL_PARALLEL_SCRIPTS = YES +endif + +ifeq "$(INSTALL_PARALLEL_SCRIPTS)" "YES" + PERL_PROGS = \ grs2gr gr2qp qp2ps ghc-fool-sort ghc-unfool-sort gr2pe gr2java \ qp2ap gr2RTS RTS2gran gran-extr gp-ext-imp tf avg-RTS SPLIT \ AVG SN get_SN sn_filter ps-scale-y - BASH_PROGS = gr2ps gr2jv gr2ap gr2gran -# -# One rule fits all, not particularly selective. -# -$(PERL_PROGS) : $(patsubst %,%.pl,$(PERL_PROGS)) -$(BASH_PROGS) : $(patsubst %,%.bash,$(BASH_PROGS)) - +$(PERL_INSTALLERS) = $(addprefix install.perl.,$(PERL_PROGS)) +$(BASH_INSTALLERS) = $(addprefix install.bash.,$(BASH_PROGS)) -all :: $(PERL_PROGS) $(BASH_PROGS) +.PHONY: install.perl.% +.PHONY: install.bash.% -$(PERL_PROGS) : - $(RM) $@ - @echo Creating $@... - @echo "#!"$(PERL) > $@ - @cat $@.pl >> $@ - @chmod a+x $@ +install :: $(PERL_INSTALLERS) $(BASH_INSTALLERS) -$(BASH_PROGS) : - $(RM) $@ - @echo Creating $@... - @echo "#!"$(BASH) > $@ - @cat $@.bash >> $@ - @chmod a+x $@ +$(PERL_INSTALLERS): install.perl.%: + rm -f $(bindir)/$* + echo "#!$(PERL)" >> $(bindir)/$* + cat $*.pl >> $(bindir)/$* + $(EXECUTABLE_FILE) $(bindir)/$* -# -# You'll only get this with Parallel Haskell or -# GranSim.. -# -ifeq "$(BuildingParallel)" "YES" -INSTALL_SCRIPTS += $(BASH_PROGS) $(PERL_PROGS) -else -ifeq "$(BuildingGranSim)" "YES" -INSTALL_SCRIPTS += $(BASH_PROGS) $(PERL_PROGS) +$(BASH_INSTALLERS): install.bash.%: + rm -f $(bindir)/$* + echo "#!$(BASH)" >> $(bindir)/$* + cat $*.bash >> $(bindir)/$* + $(EXECUTABLE_FILE) $(bindir)/$* endif -endif - -CLEAN_FILES += $(BASH_PROGS) $(PERL_PROGS) include $(TOP)/mk/target.mk |