1 | # $Id: kNIX-bootstrap.kmk 3167 2007-04-22 02:42:32Z bird $
|
---|
2 | ## @file
|
---|
3 | #
|
---|
4 | # kNIX Boostrap Makefile for autoconf
|
---|
5 | #
|
---|
6 | # Copyright (c) 2007 knut st. osmundsen <bird-src-spam@anduin.net>
|
---|
7 | #
|
---|
8 | #
|
---|
9 | # This file is part of kNIX.
|
---|
10 | #
|
---|
11 | # kNIX is free software; you can redistribute it and/or modify
|
---|
12 | # it under the terms of the GNU General Public License as published by
|
---|
13 | # the Free Software Foundation; either version 2 of the License, or
|
---|
14 | # (at your option) any later version.
|
---|
15 | #
|
---|
16 | # kNIX is distributed in the hope that it will be useful,
|
---|
17 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
18 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
19 | # GNU General Public License for more details.
|
---|
20 | #
|
---|
21 | # You should have received a copy of the GNU General Public License
|
---|
22 | # along with kNIX; if not, write to the Free Software
|
---|
23 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
---|
24 | #
|
---|
25 | #
|
---|
26 |
|
---|
27 | DEPTH = ../../..
|
---|
28 | include $(PATH_KBUILD)/header.kmk
|
---|
29 |
|
---|
30 | # HASH
|
---|
31 | ifndef HASH
|
---|
32 | HASH :=\#
|
---|
33 | endif
|
---|
34 |
|
---|
35 | # The autoconf version.
|
---|
36 | VER = 2.61
|
---|
37 |
|
---|
38 | # Edit function used to transform bin/*.in and lib/*.in files.
|
---|
39 | EDIT_FILE = $(SED) \
|
---|
40 | -e 's|@SHELL[@]|sh.exe|g' \
|
---|
41 | -e 's|^$(HASH)! */bin/sh|$(HASH)! sh.exe|g' \
|
---|
42 | -e 's|@PERL[@]|perl.exe|g' \
|
---|
43 | -e 's|@bindir[@]|/@unixroot/usr/bin|g' \
|
---|
44 | -e 's|@datadir[@]|/@unixroot/usr/share/autoconf|g' \
|
---|
45 | -e 's|@prefix[@]|/@unixroot/usr|g' \
|
---|
46 | -e 's|@autoconf-name[@]|autoconf-$(VER)|g' \
|
---|
47 | -e 's|@autoheader-name[@]|autoheader-$(VER)|g' \
|
---|
48 | -e 's|@autom4te-name[@]|autom4te-$(VER)|g' \
|
---|
49 | -e 's|@M4[@]|m4.exe|g' \
|
---|
50 | -e 's|@M4_DEBUGFILE[@]|--error-output|g' \
|
---|
51 | -e 's|@AWK[@]|gawk.exe|g' \
|
---|
52 | -e 's|@VERSION[@]|$(VER)|g' \
|
---|
53 | -e 's|@PACKAGE_NAME[@]|GNU Autoconf|g' \
|
---|
54 | -e 's|@configure_input[@]|Generated from $(1).in; do not edit by hand.|g'
|
---|
55 |
|
---|
56 |
|
---|
57 | #
|
---|
58 | # /usr/bin/
|
---|
59 | #
|
---|
60 | INSTALLS += autoconf-bin
|
---|
61 | autoconf-bin_TEMPLATE = usr.bin
|
---|
62 | autoconf-bin_SOURCES = \
|
---|
63 | $(PATH_TARGET)/bin/autoconf-$(VER) \
|
---|
64 | $(PATH_TARGET)/bin/autoheader-$(VER) \
|
---|
65 | $(PATH_TARGET)/bin/autom4te-$(VER) \
|
---|
66 | $(PATH_TARGET)/bin/autoreconf-$(VER) \
|
---|
67 | $(PATH_TARGET)/bin/autoscan-$(VER) \
|
---|
68 | $(PATH_TARGET)/bin/autoupdate-$(VER) \
|
---|
69 | $(PATH_TARGET)/bin/ifnames-$(VER)
|
---|
70 |
|
---|
71 | define def_autoconf-bin
|
---|
72 | $(PATH_TARGET)/bin/$(name)-$(VER): $(if $(eq autoconf,$(name)),$(PATH_TARGET)/)bin/$(name).in #kNIX-bootstrap.kmk
|
---|
73 | $(QUIET)$(MKDIR) -p $$(@D)
|
---|
74 | $(call EDIT_FILE,$(name)) $$< > $$@.tmp
|
---|
75 | $(INSTALL) -m a+x,a-w $$@.tmp $$@
|
---|
76 | $(RM) -f $$@.tmp
|
---|
77 | endef
|
---|
78 | $(foreach name, autoconf autoheader autom4te autoreconf autoscan autoupdate ifnames, \
|
---|
79 | $(eval $(def_autoconf-bin)))
|
---|
80 |
|
---|
81 | ifeq (0,1)
|
---|
82 | # This requires perl, so we have to cheat with a prebuilt one.
|
---|
83 | $(PATH_TARGET)/bin/autoconf.in: bin/autoconf.as $(PATH_TARGET)/bin/autom4te-$(VER)
|
---|
84 | autom4te_perllibdir=$(PATH_TARGET)/lib \
|
---|
85 | AUTOM4TE_CFG=$(PATH_TARGET)/lib/autom4te.cfg \
|
---|
86 | $(PATH_TARGET)/bin/autom4te-$(VER) \
|
---|
87 | -B $(PATH_TARGET)/lib \
|
---|
88 | -B $(PATH_CURRENT)/lib \
|
---|
89 | --language M4sh \
|
---|
90 | --cache '' \
|
---|
91 | --melt $(PATH_CURRENT)/bin/autoconf.as \
|
---|
92 | -o $@
|
---|
93 | else
|
---|
94 | $(PATH_TARGET)/bin/autoconf.in: kNIX-bootstrap-os2.x86-autoconf.in
|
---|
95 | $(INSTALL) $< $@
|
---|
96 | endif
|
---|
97 |
|
---|
98 | #
|
---|
99 | # /usr/share/autoconf
|
---|
100 | #
|
---|
101 | INSTALLS += share-autoconf
|
---|
102 | share-autoconf_TEMPLATE = gendata
|
---|
103 | share-autoconf_INST = usr/share/autoconf/
|
---|
104 | share-autoconf_SOURCES = \
|
---|
105 | $(PATH_TARGET)/lib/autom4te.cfg=>autom4te.cfg \
|
---|
106 | INSTALL=>INSTALL \
|
---|
107 | lib/autoconf/autoconf.m4=>autoconf/autoconf.m4 \
|
---|
108 | lib/autoconf/autoheader.m4=>autoconf/autoheader.m4 \
|
---|
109 | lib/autoconf/autoscan.m4=>autoconf/autoscan.m4 \
|
---|
110 | lib/autoconf/autotest.m4=>autoconf/autotest.m4 \
|
---|
111 | lib/autoconf/autoupdate.m4=>autoconf/autoupdate.m4 \
|
---|
112 | lib/autoconf/c.m4=>autoconf/c.m4 \
|
---|
113 | lib/autoconf/erlang.m4=>autoconf/erlang.m4 \
|
---|
114 | lib/autoconf/fortran.m4=>autoconf/fortran.m4 \
|
---|
115 | lib/autoconf/functions.m4=>autoconf/functions.m4 \
|
---|
116 | lib/autoconf/general.m4=>autoconf/general.m4 \
|
---|
117 | lib/autoconf/headers.m4=>autoconf/headers.m4 \
|
---|
118 | lib/autoconf/lang.m4=>autoconf/lang.m4 \
|
---|
119 | lib/autoconf/libs.m4=>autoconf/libs.m4 \
|
---|
120 | lib/autoconf/oldnames.m4=>autoconf/oldnames.m4 \
|
---|
121 | lib/autoconf/programs.m4=>autoconf/programs.m4 \
|
---|
122 | lib/autoconf/specific.m4=>autoconf/specific.m4 \
|
---|
123 | lib/autoconf/status.m4=>autoconf/status.m4 \
|
---|
124 | lib/autoconf/types.m4=>autoconf/types.m4 \
|
---|
125 | lib/Autom4te/C4che.pm=>Autom4te/C4che.pm \
|
---|
126 | lib/Autom4te/ChannelDefs.pm=>Autom4te/ChannelDefs.pm \
|
---|
127 | lib/Autom4te/Channels.pm=>Autom4te/Channels.pm \
|
---|
128 | lib/Autom4te/Configure_ac.pm=>Autom4te/Configure_ac.pm \
|
---|
129 | lib/Autom4te/FileUtils.pm=>Autom4te/FileUtils.pm \
|
---|
130 | lib/Autom4te/General.pm=>Autom4te/General.pm \
|
---|
131 | lib/Autom4te/Request.pm=>Autom4te/Request.pm \
|
---|
132 | lib/Autom4te/Struct.pm=>Autom4te/Struct.pm \
|
---|
133 | lib/Autom4te/XFile.pm=>Autom4te/XFile.pm \
|
---|
134 | kNIX-bootstrap-os2.x86-autoscan.list=>autoscan/autoscan.list \
|
---|
135 | lib/autotest/autotest.m4=>autotest/autotest.m4 \
|
---|
136 | lib/autotest/general.m4=>autotest/general.m4 \
|
---|
137 | lib/m4sugar/m4sh.m4=>m4sugar/m4sh.m4 \
|
---|
138 | lib/m4sugar/m4sugar.m4=>m4sugar/m4sugar.m4 \
|
---|
139 | $(PATH_TARGET)/lib/m4sugar/version.m4=>m4sugar/version.m4 \
|
---|
140 |
|
---|
141 | $(PATH_TARGET)/lib/autom4te.cfg: lib/autom4te.in
|
---|
142 | $(QUIET)$(MKDIR) -p $(@D)
|
---|
143 | $(call EDIT_FILE,$(autom4te.in)) $< > $@
|
---|
144 |
|
---|
145 | $(PATH_TARGET)/lib/m4sugar/version.m4:
|
---|
146 | $(MKDIR) -p $(@D)
|
---|
147 | $(RM) -f $@
|
---|
148 | $(APPEND) $@ '# This file is part of -*- Autoconf -*-.'
|
---|
149 | $(APPEND) $@ '# Version of Autoconf.'
|
---|
150 | $(APPEND) $@ '# Copyright (C) 1999, 2000, 2001, 2002'
|
---|
151 | $(APPEND) $@ '# Free Software Foundation, Inc.'
|
---|
152 | $(APPEND) $@ ''
|
---|
153 | $(APPEND) $@ 'm4_define([m4_PACKAGE_NAME], [GNU Autoconf])'
|
---|
154 | $(APPEND) $@ 'm4_define([m4_PACKAGE_TARNAME], [autoconf])'
|
---|
155 | $(APPEND) $@ 'm4_define([m4_PACKAGE_VERSION], [$(VER)])'
|
---|
156 | $(APPEND) $@ 'm4_define([m4_PACKAGE_STRING], [GNU Autoconf $(VER)])'
|
---|
157 | $(APPEND) $@ 'm4_define([m4_PACKAGE_BUGREPORT], [bug-autoconf@gnu.org])'
|
---|
158 |
|
---|
159 |
|
---|
160 | include $(PATH_KBUILD)/footer.kmk
|
---|
161 |
|
---|