Index: Makefile ================================================================== --- Makefile +++ Makefile @@ -24,11 +24,11 @@ appfsd.o: appfsd.c appfsd.tcl.h $(CC) $(CPPFLAGS) $(CFLAGS) -o appfsd.o -c appfsd.c appfsd.tcl.h: appfsd.tcl stringify.tcl - ./stringify.tcl appfsd.tcl > appfsd.tcl.h.new + sed 's@[\\"]@\\&@g;s@^@ "@;s@$$@\\n"@' appfsd.tcl > appfsd.tcl.h.new mv appfsd.tcl.h.new appfsd.tcl.h install: appfsd cp appfsd $(bindir) DELETED stringify.tcl Index: stringify.tcl ================================================================== --- stringify.tcl +++ /dev/null @@ -1,27 +0,0 @@ -#! /usr/bin/env tclsh - -proc stringifyfile {filename {key 0}} { - catch { - set fd [open $filename r] - } - - if {![info exists fd]} { - return "" - } - - set data [read -nonewline $fd] - close $fd - - foreach line [split $data \n] { - set line [string map [list "\\" "\\\\" "\"" "\\\""] $line] - append ret " \"$line\\n\"\n" - } - - return $ret -} - -foreach file $argv { - puts -nonewline [stringifyfile $file] -} - -exit 0