source: freewrt/tools/sed/Makefile@ a787d3e

freewrt_1_0 freewrt_2_0
Last change on this file since a787d3e was c2e2d0c, checked in by Thorsten Glaser <tg@…>, 19 years ago

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

  • Property mode set to 100644
File size: 1.1 KB
Line 
1# $FreeWRT$
2
3PKG_NAME:= sed
4PKG_VERSION:= 4.1.2
5PKG_RELEASE:= 1
6PKG_MD5SUM:= 928f0e06422f414091917401f1a834d0
7PKG_SOURCE_URL:= ftp://ftp.gnu.org/gnu/sed
8
9include $(TOPDIR)/rules.mk
10include ../rules.mk
11
12$(WRKBUILD)/.unpacked: $(DL_DIR)/$(PKG_SOURCE)
13 @mkdir -p $(STAGING_DIR)/bin
14 ${EXTRACT_CMD}
15 touch $@
16
17$(WRKBUILD)/.configured: $(WRKBUILD)/.unpacked
18 (cd $(WRKBUILD); rm -rf config.cache; \
19 ac_cv_header_wctype_h=no \
20 ./configure \
21 --disable-nls \
22 --prefix=$(STAGING_DIR) \
23 --prefix=/usr \
24 );
25 touch $@
26
27$(WRKBUILD)/sed/sed: $(WRKBUILD)/.configured
28 $(MAKE) -C $(WRKBUILD)
29
30source:
31prepare: $(WRKBUILD)/.unpacked
32
33compile: $(WRKBUILD)/sed/sed
34
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
49clean:
50 rm -rf $(WRKBUILD)
51 rm -f $(STAGING_DIR)/bin/sed ${TOPDIR}/lbin/sed
Note: See TracBrowser for help on using the repository browser.