Changeset 3496


Ignore:
Timestamp:
Jun 19, 2007, 2:01:54 AM (18 years ago)
Author:
bird
Message:

Optimized it so it's possible to get some work done.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/essentials/sys-apps/prefix-portage/kNIX-bootstrap.kmk

    r3492 r3496  
    2929
    3030#
    31 # First, a couple of templates so we can use the subst-install script.
     31# First, a couple of templates so we can emulate the subst-install script.
     32# (This is 10x faster then subst-install.)
    3233#
    3334TEMPLATE_portagedata = portage data.
    3435TEMPLATE_portagedata_EXTENDS = gendata
    3536# 1: source  2: destination, 3: target
    36 TEMPLATE_portagedata_INSTALLER = $(ASH) $(PATH_TARGET)/subst-install \
    37         "--installcmd=$(INSTALL_EXT)$(if $(mode), -m $(mode))$(if $(uid),-o $(uid))$(if $(gid),-g $(gid))" $1 $2
    38 TEMPLATE_portagedata_ORDERDEPS = \
    39         $(PATH_TARGET)/subst-install.sh \
    40         $(PATH_TARGET)/subst-install.vars
     37define TEMPLATE_portagedata_INSTALLER
     38        $(SED) -f $(PATH_TARGET)/subst-install.sed $1 > $(PATH_TARGET)/subst-install.tmp
     39        $(QUIET)$(INSTALL) $$(if $(mode), -m $(mode)) $$(if $(uid),-o $(uid)) $$(if $(gid),-g $(gid)) $(PATH_TARGET)/subst-install.tmp $2
     40        $(QUIET)$(RM) -f -- $(PATH_TARGET)/subst-install.tmp
     41endef
     42TEMPLATE_portagedata_DEPS = \
     43        $(PATH_TARGET)/subst-install.sed
    4144
    4245TEMPLATE_portagescript = portage data.
    4346TEMPLATE_portagescript_EXTENDS = genscript
    44 # 1: source  2: destination, 3: target
    45 TEMPLATE_portagescript_INSTALLER = $(ASH) $(PATH_TARGET)/subst-install \
    46         "--installcmd=$(INSTALL_EXT)$(if $(mode), -m $(mode))$(if $(uid),-o $(uid))$(if $(gid),-g $(gid))" $1 $2
    47 TEMPLATE_portagescript_ORDERDEPS = \
    48         $(PATH_TARGET)/subst-install.sh \
    49         $(PATH_TARGET)/subst-install.vars
    50 
    51 $(PATH_TARGET)/subst-install: subst-install.in | $$(call DIRDEP,$$(@D))
    52         $(INSTALL) -m 0775 $^ $@
    53 
    54 $(PATH_TARGET)/subst-install.vars: kNIX-bootstrap-os2.x86-subst-install.vars | $$(call DIRDEP,$$(@D))
    55         $(INSTALL) -m 0664 $^ $@
     47TEMPLATE_portagescript_INSTALLER = $(TEMPLATE_portagedata_INSTALLER)
     48TEMPLATE_portagescript_DEPS = $(TEMPLATE_portagedata_ORDERDEPS)
     49
     50# Generate the sed installer script.
     51$(PATH_TARGET)/subst-install.sed: kNIX-bootstrap-os2.x86-subst-install.vars kNIX-bootstrap-vars2sed.sed | $$(call DIRDEP,$$(@D))
     52        $(RM) -f $@
     53        $(SED) -f kNIX-bootstrap-vars2sed.sed $< > $@
    5654
    5755# temporary hack while ORDERDEPS doesn't work on INSTALLS.
    58 OTHERS += $(PATH_TARGET)/subst-install.vars $(PATH_TARGET)/subst-install
    59 OTHERS_CLEAN += $(PATH_TARGET)/subst-install.vars $(PATH_TARGET)/subst-install
     56OTHERS += $(PATH_TARGET)/subst-install.sed
     57OTHER_CLEAN += $(PATH_TARGET)/subst-install.sed
    6058
    6159
Note: See TracChangeset for help on using the changeset viewer.