Changeset c2e2d0c in freewrt for tools/sed/Makefile


Ignore:
Timestamp:
Jul 22, 2006, 4:08:05 AM (19 years ago)
Author:
Thorsten Glaser <tg@…>
Branches:
freewrt_1_0, freewrt_2_0
Children:
c746a832
Parents:
07526d20
Message:

sanitise the way tools which must be in lbin/ (currently,
sed and pax/cpio/tar, but there will be more...) are handled:
make prereq invokes a special recursive target install-lbin
which copies them from the staging dir into lbin if they exist
there (i.e. are already installed), or removes the install stamp
otherwise. the tools' install-lbin target does however duplicate
a little code, this could be done better but it works OK like this

also, add a missing include to brcm-utils and fix pax' clean target

git-svn-id: svn://www.freewrt.org/trunk/freewrt@339 afb5a338-a214-0410-bd46-81f09a774fd1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/sed/Makefile

    r07526d20 rc2e2d0c  
    66PKG_MD5SUM:=            928f0e06422f414091917401f1a834d0
    77PKG_SOURCE_URL:=        ftp://ftp.gnu.org/gnu/sed
    8 PKG_BINARY:=            sed/sed
    9 PKG_TARGET_BINARY:=     bin/sed
    108
    119include $(TOPDIR)/rules.mk
     
    2725        touch $@
    2826
    29 $(WRKBUILD)/$(PKG_BINARY): $(WRKBUILD)/.configured
     27$(WRKBUILD)/sed/sed: $(WRKBUILD)/.configured
    3028        $(MAKE) -C $(WRKBUILD)
    3129
    32 # This stuff is needed to work around GNU make deficiencies
    33 build-sed-host-binary: $(WRKBUILD)/$(PKG_BINARY)
    34         @if [ -L $(STAGING_DIR)/$(PKG_TARGET_BINARY) ] ; then \
    35                 rm -f $(STAGING_DIR)/$(PKG_TARGET_BINARY); fi;
    36         @if [ ! -f $(STAGING_DIR)/$(PKG_TARGET_BINARY) -o $(STAGING_DIR)/$(PKG_TARGET_BINARY) \
    37         -ot $(WRKBUILD)/$(PKG_BINARY) ] ; then \
    38             set -x; \
    39             mkdir -p $(STAGING_DIR)/bin; \
    40             $(MAKE) DESTDIR=$(STAGING_DIR) -C $(WRKBUILD) install; \
    41             mv $(STAGING_DIR)/usr/bin/sed $(STAGING_DIR)/bin/; \
    42             rm -rf $(STAGING_DIR)/share/locale $(STAGING_DIR)/usr/info \
    43                     $(STAGING_DIR)/usr/man $(STAGING_DIR)/usr/share/doc; fi
     30source:
     31prepare: $(WRKBUILD)/.unpacked
    4432
    45 install-lbin: ${WRKBUILD}/${PKG_BINARY}
    46         install -c -s -m 555 ${WRKBUILD}/${PKG_BINARY} ${TOPDIR}/lbin/sed
     33compile: $(WRKBUILD)/sed/sed
    4734
    48 source:
    49 prepare:
    50 compile:
    51 install: build-sed-host-binary install-lbin
     35install: compile
     36        mkdir -p $(STAGING_DIR)/bin
     37        rm -f $(STAGING_DIR)/bin/sed ${TOPDIR}/lbin/sed
     38        install -c -s -m 555 ${WRKBUILD}/sed/sed $(STAGING_DIR)/bin/sed
     39        cp $(STAGING_DIR)/bin/sed ${TOPDIR}/lbin/sed
     40
     41install-lbin:
     42        rm -f ${TOPDIR}/lbin/sed
     43        if [ -e $(STAGING_DIR)/bin/sed ]; then \
     44                cp $(STAGING_DIR)/bin/sed ${TOPDIR}/lbin/sed; \
     45        else \
     46                rm -f $(TOOLS_STAMP_DIR)/.tools_sed-install; \
     47        fi
     48
    5249clean:
    5350        rm -rf $(WRKBUILD)
    54         rm -f $(STAGING_DIR)/$(PKG_TARGET_BINARY)
     51        rm -f $(STAGING_DIR)/bin/sed ${TOPDIR}/lbin/sed
Note: See TracChangeset for help on using the changeset viewer.