summaryrefslogtreecommitdiff
path: root/utils/parallel
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2007-05-31 14:35:05 +0000
committerIan Lynagh <igloo@earth.li>2007-05-31 14:35:05 +0000
commit430453c5131592b6147a80202dc5f7fbe3f3d5fd (patch)
tree9c7cdf6b13a8586dfa653bb9ff393da5640d2599 /utils/parallel
parentad9d754d2b18d4dd027884e082c20777a29ef7d4 (diff)
downloadhaskell-430453c5131592b6147a80202dc5f7fbe3f3d5fd.tar.gz
Rework the build system a bit
Key changes: * Always build as if BIN_DIST is 1. BIN_DIST is thus removed. * Libraries are configured with prefix set to $$topdir rather than $(prefix)
Diffstat (limited to 'utils/parallel')
-rw-r--r--utils/parallel/Makefile60
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