cvs commit: mod_parrot/eg demo.pasm

[email protected]
Newsgroups perl.cvs.mod_parrot
Message-ID <[email protected]>
ask         02/05/22 20:05:48

  Modified:    .        Makefile README mod_parrot.c
  Added:       eg       demo.pasm
  Log:
  random changes I had to do to make it work here ...
  
  http://modparrot.develooper.com:8051/demo.pbc
  
  Revision  Changes    Path
  1.6       +17 -3     mod_parrot/Makefile
  
  Index: Makefile
  ===================================================================
  RCS file: /cvs/public/mod_parrot/Makefile,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -w -r1.5 -r1.6
  --- Makefile	17 May 2002 16:19:41 -0000	1.5
  +++ Makefile	23 May 2002 03:05:46 -0000	1.6
  @@ -2,16 +2,19 @@
   
   PARROT_DIR=/usr/src/parrot
   PARROT_LIB_DIR=$(PARROT_DIR)/blib/lib
  +ASM=$(PARROT_DIR)/assemble.pl
   
   all: mod_parrot.so
   
   mod_parrot.so: mod_parrot.c
  -	make -C $(PARROT_DIR) shared-only
  +	(cd $(PARROT_DIR); make shared-only)
   	$(APACHEDIR)/bin/apxs -Wall -I $(PARROT_DIR)/include -c -n parrot mod_parrot.c -L$(PARROT_LIB_DIR) -lparrot 
   
   install: mod_parrot.so
   	$(APACHEDIR)/bin/apxs -i -a -n parrot mod_parrot.so
   
  +test:
  +	echo $(`pwd`)
   hs:
   	$(APACHEDIR)/bin/apachectl stop
   	sleep 1
  @@ -22,6 +25,17 @@
   	LD_LIBRARY_PATH=$(PARROT_LIB_DIR) $(APACHEDIR)/bin/httpd -X
   
   patch:	mod_parrot.diff
  -	perl -pi -ne 's#(.Config{ccflags})#"\1 -I$(CURDIR) -I$(APACHEDIR)/include"#' $(PARROT_DIR)/Configure.pl
  -	perl -pi -ne 's#(.Config{libs})#"\1 -L$(CURDIR)"#' $(PARROT_DIR)/Configure.pl
  +	perl -pi -ne 's#(.Config{ccflags})#"\1 -I$(.CURDIR) -I$(APACHEDIR)/include"#' $(PARROT_DIR)/Configure.pl
  +	perl -pi -ne 's#(.Config{libs})#"\1 -L$(.CURDIR)"#' $(PARROT_DIR)/Configure.pl
   	patch -d $(PARROT_DIR) -p0 < mod_parrot.diff
  +
  +patchprint:
  +	perl -pi -e 's/(\s+)printf\(/$1modparrot_printf(/g' $(PARROT_DIR)/core_ops.c
  +
  +
  +clean:
  +	rm *.o *.so
  +
  +demo:	eg/demo.pasm
  +	$(ASM) eg/demo.pasm > eg/demo.pbc
  +	cp eg/demo.pbc $(APACHEDIR)/htdocs/demo.pbc
  
  
  
  1.4       +19 -17    mod_parrot/README
  
  Index: README
  ===================================================================
  RCS file: /cvs/public/mod_parrot/README,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -w -r1.3 -r1.4
  --- README	2 Dec 2001 05:32:40 -0000	1.3
  +++ README	23 May 2002 03:05:46 -0000	1.4
  @@ -1,12 +1,9 @@
   README for Apache mod_parrot module
   
   First of all; it doesn't actually work. Until Parrot has an IO sub
  -system it'll be ugly to get it to print to the browser, so we didn't
  -get around to that.  So for now you have to run httpd with -X and
  -watch the output on your terminal. Exciting, huh?
  -
  -UPDATE:  this now sort of works!  (But it's a little... well, a lot,
  -hackish)
  +system it'll be ugly to get it to print to the browsers, so that
  +doesn't work very well.  So for now your best bet is to httpd with -X
  +and watch the output on your terminal. Exciting, huh?
   
   
   To install:
  @@ -15,17 +12,22 @@
   
   1. First build parrot.
   
  -If you want IO, you need to run this command on your parrot source:
  -  perl -pi -e 's/modparrot_printf/printf/g' core_ops.c
  -That munges the parrot source code to call a modparrot function which
  -sends output to the appropriate place in parrot.
  -(You can also just do the following:
  -
  -    a) cd $PARROT_DIR
  -    b) perl ./Configure.pl with arguments to your tasting
  -    c) back in the mod_parrot dir
  -    d) make patchparrot 
  -	    (which will make the appropriate patch and then build the library.)
  +   If you want IO then start by running
  +
  +     make patchprint
  +
  +   That munges the parrot source code to call a modparrot function
  +   which sends output to the appropriate place in parrot.
  +
  +   Then run  
  +
  +     make patch
  +	# (which will make the appropriate patch and then build the library.)
  +     cd $PARROT_DIR
  +     perl ./Configure.pl with arguments to your tasting
  +     make
  +     cd -
  +
   
   2. Then run
   
  
  
  
  1.7       +1 -1      mod_parrot/mod_parrot.c
  
  Index: mod_parrot.c
  ===================================================================
  RCS file: /cvs/public/mod_parrot/mod_parrot.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -w -r1.6 -r1.7
  --- mod_parrot.c	22 May 2002 03:33:01 -0000	1.6
  +++ mod_parrot.c	23 May 2002 03:05:46 -0000	1.7
  @@ -105,7 +105,7 @@
   static void mod_parrot_init(server_rec *s, pool *p)
   {
   #if MODULE_MAGIC_NUMBER >= 19980527
  -    ap_add_version_component("mod_parrot/.03");
  +    ap_add_version_component("mod_parrot/0.04");
   #endif
     // init Parrot
     init_world();
  
  
  
  1.1                  mod_parrot/eg/demo.pasm
  
  Index: demo.pasm
  ===================================================================
  print "Hello!\n"
  print "Websurfer!\n"
  # should have the ip address or something here. :-)
  end
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.