1 #############################################################
5 #############################################################
7 SED_SOURCE
:=sed-
$(SED_VER
).
tar.gz
8 SED_SITE
:=ftp
://ftp.gnu.org
/gnu
/sed
10 SED_DIR1
:=$(TOOL_BUILD_DIR
)/sed-
$(SED_VER
)
11 SED_DIR2
:=$(BUILD_DIR
)/sed-
$(SED_VER
)
13 SED_TARGET_BINARY
:=bin
/sed
14 ifeq ($(strip $(BUILD_WITH_LARGEFILE
)),true
)
15 SED_CPPFLAGS
=-D_FILE_OFFSET_BITS
=64
17 HOST_SED_TARGET
=$(shell .
/sedcheck.sh
)
19 $(DL_DIR
)/$(SED_SOURCE
):
21 $(SCRIPT_DIR
)/download.pl
$(DL_DIR
) $(SED_SOURCE
) x
$(SED_SITE
)
23 sed-source
: $(DL_DIR
)/$(SED_SOURCE
)
26 #############################################################
28 # build sed for use on the host system
30 #############################################################
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
)
68 host-sed
: $(HOST_SED_TARGET
)
71 -$(MAKE
) -C
$(SED_DIR1
) clean
75 rm -f
$(STAGING_DIR
)/$(SED_TARGET_BINARY
)
This page took 0.043649 seconds and 5 git commands to generate.