File:  [gforth] / gforth / install-tags.fs
Revision 1.1: download - view: text, annotated - select for diffs
Sat Nov 1 17:10:57 2008 UTC (10 years, 9 months ago) by anton
Branches: MAIN
CVS tags: v0-7-0, HEAD
worked around HP/UX awk limitations by replacing awk script with gforth script
put some workarounds for specific boxes into testall and testdist

    1: \ enhance TAGS file with install directory
    2: 
    3: \ Copyright (C) 2008 Free Software Foundation, Inc.
    4: 
    5: \ This file is part of Gforth.
    6: 
    7: \ Gforth is free software; you can redistribute it and/or
    8: \ modify it under the terms of the GNU General Public License
    9: \ as published by the Free Software Foundation, either version 3
   10: \ of the License, or (at your option) any later version.
   11: 
   12: \ This program is distributed in the hope that it will be useful,
   13: \ but WITHOUT ANY WARRANTY; without even the implied warranty of
   14: \ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   15: \ GNU General Public License for more details.
   16: 
   17: \ You should have received a copy of the GNU General Public License
   18: \ along with this program. If not, see http://www.gnu.org/licenses/.
   19: 
   20: 
   21: \ usage: gforth -e 's" dir"' install-tags.fs -e bye <TAGS >install/TAGS
   22: 
   23: \ We used to do this with
   24: 
   25: \ awk 'BEGIN {RS="\014\n"; ORS=RS} {if (NR==1) print $0; else print "$(datadir)/gforth/$(VERSION)/"$$0;}'
   26: 
   27: \ but the awk of HP/UX B.11.23 was not up to the task
   28: 
   29: 2constant dir
   30: s\" \f\l" 2constant separator
   31: 
   32: : install-tags ( c-addr u -- )
   33:     begin { c-addr u }
   34:         c-addr u separator search while
   35:             separator nip /string { c-addr2 u2 }
   36:             c-addr c-addr2 over - type
   37:             dir type
   38:             c-addr2 u2 repeat
   39:     type ;
   40: 
   41: infile-id slurp-fid install-tags
   42: 
   43: 
   44:             
   45:             
   46:             
   47:             

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>