From faf307cbdcce56c10eeae1e035423f6be3cf1444 Mon Sep 17 00:00:00 2001 From: rurban Date: Sat, 22 Dec 2001 03:56:29 +0000 Subject: [PATCH] added docs for requirements and usage. added the possibility to use your private url easily improved the Makefile for standalone usage, without ant git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/trunk@877 96ab9672-09ca-45d6-a79d-3d69d39ca109 --- tests/makemakebuild.pl | 58 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 53 insertions(+), 5 deletions(-) diff --git a/tests/makemakebuild.pl b/tests/makemakebuild.pl index 2c0990964..371a132d7 100644 --- a/tests/makemakebuild.pl +++ b/tests/makemakebuild.pl @@ -3,12 +3,29 @@ # Write out a Makefile and a build.xml file based on the *.inputs files # in the current directory. Steve Wainstead, April 2001. -# $Id: makemakebuild.pl,v 1.1 2001-09-20 20:52:22 wainstead Exp $ +# $Id: makemakebuild.pl,v 1.2 2001-12-22 03:56:29 rurban Exp $ # read in all the input files, loop over each one and build up # text blocks that we will subsitute into the skeletons for Makefile # and build.xml. +# reqirements: +# sun's java sdk, http://java.sun.com/j2se/ +# httpunit, http://httpunit.sf.net +# ant, http://jakarta.apache.org/builds/jakarta-ant/release/ + +# usage: +# copy the httpunit jars to this path or add them to your CLASSPATH +# fix the url below for your server +# run makemakebuild.pl, this creates Makefile (gnu make) and build.xml (ant) +# run make, this compiles the classes and runs ant. +# if your classpath is wrong run ant seperately to test. +# run ant for each test. both ant and make can run independently. + +#my $my_wikiurl = 'http://reini/phpwiki/'; # this will replace steve's url below if defined +#----------------------------------------- + +my $ori_wikiurl = 'http://127.0.0.1:8080/~swain/phpwiki/'; my @files = <*.inputs>; chomp(@files); # prolly unnecessary, but oh well. @@ -18,6 +35,12 @@ foreach $inputfile (@files) { $inputfile =~ m/\.inputs$/; $javafile = "$`.java"; $classname = $`; + if ($my_wikiurl and ($my_wikiurl ne $ori_wikiurl)) { + local $/; + open IN, "< $inputfile"; + $contents = ; + `perl -i.orig -pe 's|$ori_wikiurl|$my_wikiurl|' $inputfile` if $contents =~ m|$ori_wikiurl|; + } $test_make_target_names .= "$javafile "; $test_make_targets .=<<"EOLN"; @@ -61,15 +84,39 @@ $makefile = < + -- 2.45.0