1 include $(TOPDIR
)/rules.mk
3 #############################################################
7 #############################################################
9 SED_SOURCE
:=sed-
$(SED_VER
).
tar.gz
10 SED_SITE
:=ftp
://ftp.gnu.org
/gnu
/sed
12 SED_DIR1
:=$(TOOL_BUILD_DIR
)/sed-
$(SED_VER
)
13 SED_DIR2
:=$(BUILD_DIR
)/sed-
$(SED_VER
)
15 SED_TARGET_BINARY
:=bin
/sed
16 ifeq ($(strip $(BUILD_WITH_LARGEFILE
)),true
)
17 SED_CPPFLAGS
=-D_FILE_OFFSET_BITS
=64
19 HOST_SED_TARGET
=$(shell .
/sedcheck.sh
)
21 $(DL_DIR
)/$(SED_SOURCE
):
23 $(SCRIPT_DIR
)/download.pl
$(DL_DIR
) $(SED_SOURCE
) x
$(SED_SITE
)
25 #############################################################
27 # build sed for use on the host system
29 #############################################################
31 $(SED_DIR1
)/.unpacked
: $(DL_DIR
)/$(SED_SOURCE
)
32 mkdir
-p
$(TOOL_BUILD_DIR
)
33 mkdir
-p
$(STAGING_DIR
)/bin
;
34 $(SED_CAT
) $(DL_DIR
)/$(SED_SOURCE
) |
tar -C
$(TOOL_BUILD_DIR
) $(TAR_OPTIONS
) -
35 touch
$(SED_DIR1
)/.unpacked
37 $(SED_DIR1
)/.configured
: $(SED_DIR1
)/.unpacked
38 (cd
$(SED_DIR1
); rm -rf config.cache
; \
40 --prefix=$(STAGING_DIR
) \
43 touch
$(SED_DIR1
)/.configured
45 $(SED_DIR1
)/$(SED_BINARY
): $(SED_DIR1
)/.configured
46 $(MAKE
) -C
$(SED_DIR1
)
48 # This stuff is needed to work around GNU make deficiencies
49 build-sed-host-binary
: $(SED_DIR1
)/$(SED_BINARY
)
50 @if
[ -L
$(STAGING_DIR
)/$(SED_TARGET_BINARY
) ] ; then \
51 rm -f
$(STAGING_DIR
)/$(SED_TARGET_BINARY
); fi
;
52 @if
[ ! -f
$(STAGING_DIR
)/$(SED_TARGET_BINARY
) -o
$(STAGING_DIR
)/$(SED_TARGET_BINARY
) \
53 -ot
$(SED_DIR1
)/$(SED_BINARY
) ] ; then \
55 mkdir
-p
$(STAGING_DIR
)/bin
; \
56 $(MAKE
) DESTDIR
=$(STAGING_DIR
) -C
$(SED_DIR1
) install; \
57 mv
$(STAGING_DIR
)/usr
/bin
/sed
$(STAGING_DIR
)/bin
/; \
58 rm -rf
$(STAGING_DIR
)/share
/locale
$(STAGING_DIR
)/usr
/info \
59 $(STAGING_DIR
)/usr
/man
$(STAGING_DIR
)/usr
/share
/doc
; fi
62 @if
[ -x
/usr
/bin
/sed
]; then SED
="/usr/bin/sed"; else \
63 if
[ -x
/bin
/sed
]; then SED
="/bin/sed"; fi
; fi
; \
64 mkdir
-p
$(STAGING_DIR
)/bin
; \
65 rm -f
$(STAGING_DIR
)/$(SED_TARGET_BINARY
); \
66 ln
-s
$$SED $(STAGING_DIR
)/$(SED_TARGET_BINARY
)
71 install: $(HOST_SED_TARGET
)
74 rm -f
$(STAGING_DIR
)/$(SED_TARGET_BINARY
)
This page took 0.043858 seconds and 5 git commands to generate.