source: trunk/essentials/sys-devel/autoconf/kNIX-bootstrap.kmk@ 3295

Last change on this file since 3295 was 3295, checked in by bird, 18 years ago

forgot to create the directory.

  • Property svn:keywords set to Id
File size: 6.1 KB
Line 
1# $Id: kNIX-bootstrap.kmk 3295 2007-05-05 23:26:25Z 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
27DEPTH = ../../..
28include $(PATH_KBUILD)/header.kmk
29
30# HASH
31ifndef HASH
32HASH :=\#
33endif
34
35# The autoconf version.
36VER = 2.61
37
38# Edit function used to transform bin/*.in and lib/*.in files.
39EDIT_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#
60INSTALLS += autoconf-bin
61autoconf-bin_TEMPLATE = usr.bin
62autoconf-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
71define 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
77endef
78$(foreach name, autoconf autoheader autom4te autoreconf autoscan autoupdate ifnames, \
79$(eval $(def_autoconf-bin)))
80
81ifeq (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 $(MKDIR) -p $(@D)
85 autom4te_perllibdir=$(PATH_TARGET)/lib \
86 AUTOM4TE_CFG=$(PATH_TARGET)/lib/autom4te.cfg \
87 $(PATH_TARGET)/bin/autom4te-$(VER) \
88 -B $(PATH_TARGET)/lib \
89 -B $(PATH_CURRENT)/lib \
90 --language M4sh \
91 --cache '' \
92 --melt $(PATH_CURRENT)/bin/autoconf.as \
93 -o $@
94else
95$(PATH_TARGET)/bin/autoconf.in: kNIX-bootstrap-os2.x86-autoconf.in
96 $(MKDIR) -p $(@D)
97 $(INSTALL) $< $@
98endif
99
100#
101# /usr/share/autoconf
102#
103INSTALLS += share-autoconf
104share-autoconf_TEMPLATE = gendata
105share-autoconf_INST = usr/share/autoconf/
106share-autoconf_SOURCES = \
107 $(PATH_TARGET)/lib/autom4te.cfg=>autom4te.cfg \
108 INSTALL=>INSTALL \
109 lib/autoconf/autoconf.m4=>autoconf/autoconf.m4 \
110 lib/autoconf/autoheader.m4=>autoconf/autoheader.m4 \
111 lib/autoconf/autoscan.m4=>autoconf/autoscan.m4 \
112 lib/autoconf/autotest.m4=>autoconf/autotest.m4 \
113 lib/autoconf/autoupdate.m4=>autoconf/autoupdate.m4 \
114 lib/autoconf/c.m4=>autoconf/c.m4 \
115 lib/autoconf/erlang.m4=>autoconf/erlang.m4 \
116 lib/autoconf/fortran.m4=>autoconf/fortran.m4 \
117 lib/autoconf/functions.m4=>autoconf/functions.m4 \
118 lib/autoconf/general.m4=>autoconf/general.m4 \
119 lib/autoconf/headers.m4=>autoconf/headers.m4 \
120 lib/autoconf/lang.m4=>autoconf/lang.m4 \
121 lib/autoconf/libs.m4=>autoconf/libs.m4 \
122 lib/autoconf/oldnames.m4=>autoconf/oldnames.m4 \
123 lib/autoconf/programs.m4=>autoconf/programs.m4 \
124 lib/autoconf/specific.m4=>autoconf/specific.m4 \
125 lib/autoconf/status.m4=>autoconf/status.m4 \
126 lib/autoconf/types.m4=>autoconf/types.m4 \
127 lib/Autom4te/C4che.pm=>Autom4te/C4che.pm \
128 lib/Autom4te/ChannelDefs.pm=>Autom4te/ChannelDefs.pm \
129 lib/Autom4te/Channels.pm=>Autom4te/Channels.pm \
130 lib/Autom4te/Configure_ac.pm=>Autom4te/Configure_ac.pm \
131 lib/Autom4te/FileUtils.pm=>Autom4te/FileUtils.pm \
132 lib/Autom4te/General.pm=>Autom4te/General.pm \
133 lib/Autom4te/Request.pm=>Autom4te/Request.pm \
134 lib/Autom4te/Struct.pm=>Autom4te/Struct.pm \
135 lib/Autom4te/XFile.pm=>Autom4te/XFile.pm \
136 kNIX-bootstrap-os2.x86-autoscan.list=>autoscan/autoscan.list \
137 lib/autotest/autotest.m4=>autotest/autotest.m4 \
138 lib/autotest/general.m4=>autotest/general.m4 \
139 lib/m4sugar/m4sh.m4=>m4sugar/m4sh.m4 \
140 lib/m4sugar/m4sugar.m4=>m4sugar/m4sugar.m4 \
141 $(PATH_TARGET)/lib/m4sugar/version.m4=>m4sugar/version.m4 \
142
143$(PATH_TARGET)/lib/autom4te.cfg: lib/autom4te.in
144 $(QUIET)$(MKDIR) -p $(@D)
145 $(call EDIT_FILE,$(autom4te.in)) $< > $@
146
147$(PATH_TARGET)/lib/m4sugar/version.m4:
148 $(MKDIR) -p $(@D)
149 $(RM) -f $@
150 $(APPEND) $@ '# This file is part of -*- Autoconf -*-.'
151 $(APPEND) $@ '# Version of Autoconf.'
152 $(APPEND) $@ '# Copyright (C) 1999, 2000, 2001, 2002'
153 $(APPEND) $@ '# Free Software Foundation, Inc.'
154 $(APPEND) $@ ''
155 $(APPEND) $@ 'm4_define([m4_PACKAGE_NAME], [GNU Autoconf])'
156 $(APPEND) $@ 'm4_define([m4_PACKAGE_TARNAME], [autoconf])'
157 $(APPEND) $@ 'm4_define([m4_PACKAGE_VERSION], [$(VER)])'
158 $(APPEND) $@ 'm4_define([m4_PACKAGE_STRING], [GNU Autoconf $(VER)])'
159 $(APPEND) $@ 'm4_define([m4_PACKAGE_BUGREPORT], [bug-autoconf@gnu.org])'
160
161
162include $(PATH_KBUILD)/footer.kmk
163
Note: See TracBrowser for help on using the repository browser.