]> git.proxmox.com Git - grub2.git/blame - geninitheader.sh
Merge mainline into cleanbuild
[grub2.git] / geninitheader.sh
CommitLineData
6d099807 1#! /bin/sh
2#
5a79f472 3# Copyright (C) 2005,2007 Free Software Foundation, Inc.
6d099807 4#
5# This gensymlist.sh is free software; the author
6# gives unlimited permission to copy and/or distribute it,
7# with or without modifications, as long as this notice is preserved.
8#
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12# PARTICULAR PURPOSE.
13
daf0f0ba 14lst="$1"
15shift
16
6d099807 17cat <<EOF
18/* This file is automatically generated by gensymlist.sh. DO NOT EDIT! */
19/*
20 * GRUB -- GRand Unified Bootloader
5a79f472 21 * Copyright (C) 2005,2007 Free Software Foundation, Inc.
6d099807 22 *
5a79f472 23 * GRUB is free software: you can redistribute it and/or modify
6d099807 24 * it under the terms of the GNU General Public License as published by
5a79f472 25 * the Free Software Foundation, either version 3 of the License, or
6d099807 26 * (at your option) any later version.
27 *
5a79f472 28 * GRUB is distributed in the hope that it will be useful,
6d099807 29 * but WITHOUT ANY WARRANTY; without even the implied warranty of
30 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31 * GNU General Public License for more details.
32 *
33 * You should have received a copy of the GNU General Public License
5a79f472 34 * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
6d099807 35 */
36
37EOF
38
39cat <<EOF
40void grub_init_all (void);
41void grub_fini_all (void);
42EOF
43
daf0f0ba 44grep -v '^#' "${lst}" | sed -n '/GRUB_MOD_INIT *([a-zA-Z0-9_]*)/{s/.*GRUB_MOD_INIT *(\([a-zA-Z0-9_]*\)).*/void grub_\1_init (void);/;p;}'
45grep -v '^#' "${lst}" | sed -n '/GRUB_MOD_INIT *([a-zA-Z0-9_]*)/{s/.*GRUB_MOD_INIT *(\([a-zA-Z0-9_]*\)).*/void grub_\1_fini (void);/;p;}'