1 #############################################################
5 #############################################################
7 GNUGREP_SOURCE
:=grep_
$(GNUGREP_VERSION
).ds1.orig.
tar.gz
8 GNUGREP_SITE
:=$(BR2_DEBIAN_MIRROR
)/debian
/pool
/main
/g
/grep
/
9 GNUGREP_DIR
:=$(BUILD_DIR
)/grep-
$(GNUGREP_VERSION
)
11 GNUGREP_BINARY
:=src
/grep
12 GNUGREP_TARGET_BINARY
:=bin
/grep
14 $(DL_DIR
)/$(GNUGREP_SOURCE
):
15 $(WGET
) -P
$(DL_DIR
) $(GNUGREP_SITE
)/$(GNUGREP_SOURCE
)
17 grep-source
: $(DL_DIR
)/$(GNUGREP_SOURCE
)
19 $(GNUGREP_DIR
)/.unpacked
: $(DL_DIR
)/$(GNUGREP_SOURCE
)
20 rm -rf
$(GNUGREP_DIR
).xxx
21 $(GNUGREP_CAT
) $(DL_DIR
)/$(GNUGREP_SOURCE
) |
tar -C
$(BUILD_DIR
) $(TAR_OPTIONS
) -
22 mv
$(GNUGREP_DIR
) $(GNUGREP_DIR
).xxx
23 $(GNUGREP_CAT
) $(GNUGREP_DIR
).xxx
/grep_
$(GNUGREP_VERSION
).
tar.gz |
tar -C
$(BUILD_DIR
) $(TAR_OPTIONS
) -
24 rm -rf
$(GNUGREP_DIR
).xxx
25 touch
$(GNUGREP_DIR
)/.unpacked
27 $(GNUGREP_DIR
)/.configured
: $(GNUGREP_DIR
)/.unpacked
28 (cd
$(GNUGREP_DIR
); rm -rf config.cache
; \
29 $(TARGET_CONFIGURE_OPTS
) \
30 $(TARGET_CONFIGURE_ARGS
) \
32 --target
=$(GNU_TARGET_NAME
) \
33 --host
=$(GNU_TARGET_NAME
) \
34 --build
=$(GNU_HOST_NAME
) \
40 --libexecdir
=/usr
/lib \
42 --datadir=/usr
/share \
43 --localstatedir
=/var \
47 $(DISABLE_LARGEFILE
) \
48 --disable-perl-regexp \
49 --without-included-regex \
51 touch
$(GNUGREP_DIR
)/.configured
53 $(GNUGREP_DIR
)/$(GNUGREP_BINARY
): $(GNUGREP_DIR
)/.configured
54 $(MAKE
) -C
$(GNUGREP_DIR
)
56 # This stuff is needed to work around GNU make deficiencies
57 grep-target_binary
: $(GNUGREP_DIR
)/$(GNUGREP_BINARY
)
58 @if
[ -L
$(TARGET_DIR
)/$(GNUGREP_TARGET_BINARY
) ]; then \
59 rm -f
$(TARGET_DIR
)/$(GNUGREP_TARGET_BINARY
); fi
60 @if
[ ! -f
$(GNUGREP_DIR
)/$(GNUGREP_BINARY
) -o
$(TARGET_DIR
)/$(GNUGREP_TARGET_BINARY
) -ot \
61 $(GNUGREP_DIR
)/$(GNUGREP_BINARY
) ]; then \
63 rm -f
$(TARGET_DIR
)/bin
/grep
$(TARGET_DIR
)/bin
/egrep
$(TARGET_DIR
)/bin
/fgrep
; \
64 cp
-a
$(GNUGREP_DIR
)/src
/grep
$(GNUGREP_DIR
)/src
/egrep \
65 $(GNUGREP_DIR
)/src
/fgrep
$(TARGET_DIR
)/bin
/; fi
67 grep
: uclibc gettext libintl grep-target_binary
70 $(MAKE
) DESTDIR
=$(TARGET_DIR
) -C
$(GNUGREP_DIR
) uninstall
71 -$(MAKE
) -C
$(GNUGREP_DIR
) clean
76 #############################################################
78 # Toplevel Makefile options
80 #############################################################
81 ifeq ($(BR2_PACKAGE_GREP
),y
)