The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/port/mkbootrules

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 #!/bin/rc
    2 
    3 rfork e
    4 if(~ $#CONF 0)
    5         CONF=$1
    6 awk -v 'objtype='$objtype -v 'CONF='$CONF '
    7 BEGIN { nfs = 0 }
    8 /^$/{
    9         next;
   10 }
   11 /^#/{
   12         next;
   13 }
   14 collect && /^[^ \t]/{
   15         collect = 0;
   16 }
   17 collect && section ~ "bootdir" {
   18         if(NF >= 2)
   19                 x = $2;
   20         else{
   21                 x = $1;
   22                 sub(/.*\//, "", x);
   23         }
   24         fsname[nfs] = x;
   25         x = $1;
   26         gsub(/[^a-zA-Z0-9_]/, "_", x);
   27         fs[nfs] = x;
   28         file[nfs] = $1;
   29         nfs++;
   30 }
   31 $0 ~ /^[^ \t]/{
   32         if($0 ~ "bootdir"){
   33                 section = $0;
   34                 collect = 1;
   35         }
   36         next;
   37 }
   38 
   39 END{
   40         printf "%s.root.s:D:", CONF;
   41         for(i=0; i<nfs; i++)
   42                 printf " %s", file[i];
   43         printf "\n";
   44         printf "\t../port/mkrootall \\\n";
   45         for(i=0; i<nfs; i++)
   46                 printf "\t\t%s %s %s\\\n", fsname[i], fs[i], file[i];
   47         printf "\t>$target\n";
   48 
   49         printf "%s.rootc.c:D:", CONF;
   50         for(i=0; i<nfs; i++)
   51                 printf " %s", file[i];
   52         printf "\n";
   53         printf "\t../port/mkrootc \\\n";
   54         for(i=0; i<nfs; i++)
   55                 printf "\t\t%s %s %s\\\n", fsname[i], fs[i], file[i];
   56         printf "\t>$target\n";
   57 }
   58 
   59 ' $*

Cache object: f81842315ce4242413dcc32e063f7f6c


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.