From a127aa7a02cf8b53d8d5dd0cbb623f985f59ad52 Mon Sep 17 00:00:00 2001 From: pmichaud Date: Tue, 28 Aug 2012 03:24:06 -0500 Subject: Initial build makefile and script to prefix input lines. --- tools/star/Makefile | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ tools/star/prefix.pl | 12 ++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 tools/star/Makefile create mode 100644 tools/star/prefix.pl (limited to 'tools') diff --git a/tools/star/Makefile b/tools/star/Makefile new file mode 100644 index 0000000..1bc35d3 --- /dev/null +++ b/tools/star/Makefile @@ -0,0 +1,50 @@ +RAKUDO_VER = 2012.08 +NQP_VER = 2012.08 +PARROT_VER = 4.6.0 +PARROT_REL = supported/$(PARROT_VER) + +SRC_DIR = src + +RAKUDO_TGZ = rakudo-$(RAKUDO_VER).tar.gz +RAKUDO_URL = https://github.com/downloads/rakudo/rakudo/$(RAKUDO_TGZ) +RAKUDO_SRC = $(SRC_DIR)/$(RAKUDO_TGZ) +NQP_TGZ = nqp-$(NQP_VER).tar.gz +NQP_URL = https://github.com/downloads/perl6/nqp/$(NQP_TGZ) +NQP_SRC = $(SRC_DIR)/$(NQP_TGZ) +PARROT_TGZ = parrot-$(PARROT_VER).tar.gz +PARROT_URL = http://ftp.parrot.org/releases/$(PARROT_REL)/$(PARROT_TGZ) +PARROT_SRC = $(SRC_DIR)/$(PARROT_TGZ) + +PERL = perl +PREFIX = $(PERL) $(CURDIR)/tools/star/prefix.pl +WGET = wget --no-check-certificate + +always: + +rakudo: nqp $(RAKUDO_SRC) + tar --xform 's!rakudo-[^/]*!rakudo!' -xvzf $(RAKUDO_SRC) + +$(RAKUDO_SRC): + mkdir -p $(SRC_DIR) + $(WGET) $(RAKUDO_URL) -O $(RAKUDO_SRC) + +nqp: parrot $(NQP_SRC) + tar --xform 's!nqp-[^/]*!nqp!' -xvzf $(NQP_SRC) + +$(NQP_SRC): + mkdir -p $(SRC_DIR) + $(WGET) $(NQP_URL) -O $(NQP_SRC) + +parrot: $(PARROT_SRC) + tar --xform 's!parrot-[^/]*!parrot!' -xvzf $(PARROT_SRC) + +$(PARROT_SRC): + mkdir -p $(SRC_DIR) + $(WGET) $(PARROT_URL) -O $(PARROT_SRC) + +MANIFEST: always rakudo/MANIFEST parrot/MANIFEST nqp/MANIFEST + git ls-files >MANIFEST + $(PREFIX) rakudo/ rakudo/MANIFEST >>MANIFEST + $(PREFIX) nqp/ nqp/MANIFEST >>MANIFEST + cut -d' ' -f1 parrot/MANIFEST | $(PREFIX) parrot/ >>MANIFEST + git submodule foreach --quiet 'git ls-files | $(PREFIX) $$path/' >>MANIFEST diff --git a/tools/star/prefix.pl b/tools/star/prefix.pl new file mode 100644 index 0000000..c2dea0a --- /dev/null +++ b/tools/star/prefix.pl @@ -0,0 +1,12 @@ +#! perl + +# Add a prefix string (specified by $ARGV[0]) to all +# of the lines of the remaining files. Skips blank lines +# and lines beginning with a comment character. + +my $prefix = shift @ARGV; +while (<>) { + next if /^\s*(#|$)/; + print "$prefix$_"; +} + -- cgit v1.1