# $Id$ ## @file # # kNIX Boostrap Makefile for autoconf # # Copyright (c) 2007 knut st. osmundsen # # # This file is part of kNIX. # # kNIX is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # kNIX is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with kNIX; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # DEPTH = ../../.. include $(PATH_KBUILD)/header.kmk # HASH ifndef HASH HASH :=\# endif # The autoconf version. VER = 2.61 # Edit function used to transform bin/*.in and lib/*.in files. EDIT_FILE = $(SED) \ -e 's|@SHELL[@]|sh.exe|g' \ -e 's|^$(HASH)! */bin/sh|$(HASH)! sh.exe|g' \ -e 's|@PERL[@]|perl.exe|g' \ -e 's|@bindir[@]|/@unixroot/usr/bin|g' \ -e 's|@datadir[@]|/@unixroot/usr/share/autoconf|g' \ -e 's|@prefix[@]|/@unixroot/usr|g' \ -e 's|@autoconf-name[@]|autoconf-$(VER)|g' \ -e 's|@autoheader-name[@]|autoheader-$(VER)|g' \ -e 's|@autom4te-name[@]|autom4te-$(VER)|g' \ -e 's|@M4[@]|m4.exe|g' \ -e 's|@M4_DEBUGFILE[@]|--error-output|g' \ -e 's|@AWK[@]|gawk.exe|g' \ -e 's|@VERSION[@]|$(VER)|g' \ -e 's|@PACKAGE_NAME[@]|GNU Autoconf|g' \ -e 's|@configure_input[@]|Generated from $(1).in; do not edit by hand.|g' # # /usr/bin/ # INSTALLS += autoconf-bin autoconf-bin_TEMPLATE = usr.bin autoconf-bin_SOURCES = \ $(PATH_TARGET)/bin/autoconf-$(VER) \ $(PATH_TARGET)/bin/autoheader-$(VER) \ $(PATH_TARGET)/bin/autom4te-$(VER) \ $(PATH_TARGET)/bin/autoreconf-$(VER) \ $(PATH_TARGET)/bin/autoscan-$(VER) \ $(PATH_TARGET)/bin/autoupdate-$(VER) \ $(PATH_TARGET)/bin/ifnames-$(VER) define def_autoconf-bin $(PATH_TARGET)/bin/$(name)-$(VER): $(if $(eq autoconf,$(name)),$(PATH_TARGET)/)bin/$(name).in #kNIX-bootstrap.kmk $(QUIET)$(MKDIR) -p $$(@D) $(call EDIT_FILE,$(name)) $$< > $$@.tmp $(INSTALL) -m a+x,a-w $$@.tmp $$@ $(RM) -f $$@.tmp endef $(foreach name, autoconf autoheader autom4te autoreconf autoscan autoupdate ifnames, \ $(eval $(def_autoconf-bin))) ifeq (0,1) # This requires perl, so we have to cheat with a prebuilt one. $(PATH_TARGET)/bin/autoconf.in: bin/autoconf.as $(PATH_TARGET)/bin/autom4te-$(VER) $(MKDIR) -p $(@D) autom4te_perllibdir=$(PATH_TARGET)/lib \ AUTOM4TE_CFG=$(PATH_TARGET)/lib/autom4te.cfg \ $(PATH_TARGET)/bin/autom4te-$(VER) \ -B $(PATH_TARGET)/lib \ -B $(PATH_CURRENT)/lib \ --language M4sh \ --cache '' \ --melt $(PATH_CURRENT)/bin/autoconf.as \ -o $@ else $(PATH_TARGET)/bin/autoconf.in: kNIX-bootstrap-os2.x86-autoconf.in $(MKDIR) -p $(@D) $(INSTALL) $< $@ endif # # /usr/share/autoconf # INSTALLS += share-autoconf share-autoconf_TEMPLATE = gendata share-autoconf_INST = usr/share/autoconf/ share-autoconf_SOURCES = \ $(PATH_TARGET)/lib/autom4te.cfg=>autom4te.cfg \ INSTALL=>INSTALL \ lib/autoconf/autoconf.m4=>autoconf/autoconf.m4 \ lib/autoconf/autoheader.m4=>autoconf/autoheader.m4 \ lib/autoconf/autoscan.m4=>autoconf/autoscan.m4 \ lib/autoconf/autotest.m4=>autoconf/autotest.m4 \ lib/autoconf/autoupdate.m4=>autoconf/autoupdate.m4 \ lib/autoconf/c.m4=>autoconf/c.m4 \ lib/autoconf/erlang.m4=>autoconf/erlang.m4 \ lib/autoconf/fortran.m4=>autoconf/fortran.m4 \ lib/autoconf/functions.m4=>autoconf/functions.m4 \ lib/autoconf/general.m4=>autoconf/general.m4 \ lib/autoconf/headers.m4=>autoconf/headers.m4 \ lib/autoconf/lang.m4=>autoconf/lang.m4 \ lib/autoconf/libs.m4=>autoconf/libs.m4 \ lib/autoconf/oldnames.m4=>autoconf/oldnames.m4 \ lib/autoconf/programs.m4=>autoconf/programs.m4 \ lib/autoconf/specific.m4=>autoconf/specific.m4 \ lib/autoconf/status.m4=>autoconf/status.m4 \ lib/autoconf/types.m4=>autoconf/types.m4 \ lib/Autom4te/C4che.pm=>Autom4te/C4che.pm \ lib/Autom4te/ChannelDefs.pm=>Autom4te/ChannelDefs.pm \ lib/Autom4te/Channels.pm=>Autom4te/Channels.pm \ lib/Autom4te/Configure_ac.pm=>Autom4te/Configure_ac.pm \ lib/Autom4te/FileUtils.pm=>Autom4te/FileUtils.pm \ lib/Autom4te/General.pm=>Autom4te/General.pm \ lib/Autom4te/Request.pm=>Autom4te/Request.pm \ lib/Autom4te/Struct.pm=>Autom4te/Struct.pm \ lib/Autom4te/XFile.pm=>Autom4te/XFile.pm \ kNIX-bootstrap-os2.x86-autoscan.list=>autoscan/autoscan.list \ lib/autotest/autotest.m4=>autotest/autotest.m4 \ lib/autotest/general.m4=>autotest/general.m4 \ lib/m4sugar/m4sh.m4=>m4sugar/m4sh.m4 \ lib/m4sugar/m4sugar.m4=>m4sugar/m4sugar.m4 \ $(PATH_TARGET)/lib/m4sugar/version.m4=>m4sugar/version.m4 \ $(PATH_TARGET)/lib/autom4te.cfg: lib/autom4te.in $(QUIET)$(MKDIR) -p $(@D) $(call EDIT_FILE,$(autom4te.in)) $< > $@ $(PATH_TARGET)/lib/m4sugar/version.m4: $(MKDIR) -p $(@D) $(RM) -f $@ $(APPEND) $@ '# This file is part of -*- Autoconf -*-.' $(APPEND) $@ '# Version of Autoconf.' $(APPEND) $@ '# Copyright (C) 1999, 2000, 2001, 2002' $(APPEND) $@ '# Free Software Foundation, Inc.' $(APPEND) $@ '' $(APPEND) $@ 'm4_define([m4_PACKAGE_NAME], [GNU Autoconf])' $(APPEND) $@ 'm4_define([m4_PACKAGE_TARNAME], [autoconf])' $(APPEND) $@ 'm4_define([m4_PACKAGE_VERSION], [$(VER)])' $(APPEND) $@ 'm4_define([m4_PACKAGE_STRING], [GNU Autoconf $(VER)])' $(APPEND) $@ 'm4_define([m4_PACKAGE_BUGREPORT], [bug-autoconf@gnu.org])' include $(PATH_KBUILD)/footer.kmk