forked from JuliaLang/julia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
libwhich.mk
36 lines (30 loc) · 1.22 KB
/
libwhich.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
## LIBWHICH ##
LIBWHICH_GIT_URL := git://github.com/vtjnash/libwhich.git
LIBWHICH_TAR_URL = https://api.github.com/repos/vtjnash/libwhich/tarball/$1
$(eval $(call git-external,libwhich,LIBWHICH,,,$(BUILDDIR)))
LIBWHICH_OBJ_LIB := $(build_depsbindir)/libwhich
LIBWHICH_MFLAGS := CC="$(CC)"
$(BUILDDIR)/$(LIBWHICH_SRC_DIR)/build-compiled: $(BUILDDIR)/$(LIBWHICH_SRC_DIR)/source-extracted
$(MAKE) -C $(dir $<) $(LIBWHICH_MFLAGS) libwhich
echo 1 > $@
$(BUILDDIR)/$(LIBWHICH_SRC_DIR)/build-checked: $(BUILDDIR)/$(LIBWHICH_SRC_DIR)/build-compiled
ifeq ($(OS),$(BUILD_OS))
$(MAKE) -C $(dir $@) $(LIBWHICH_MFLAGS) check
endif
echo 1 > $@
define LIBWHICH_INSTALL
mkdir -p $2/$$(build_depsbindir)
cp $1/libwhich $2/$$(build_depsbindir)
endef
$(eval $(call staged-install, \
libwhich,$(LIBWHICH_SRC_DIR), \
LIBWHICH_INSTALL,,,))
clean-libwhich:
-rm $(BUILDDIR)/$(LIBWHICH_SRC_DIR)/build-compiled
-$(MAKE) -C $(BUILDDIR)/$(LIBWHICH_SRC_DIR) clean
get-libwhich: $(LIBWHICH_SRC_FILE)
extract-libwhich: $(BUILDDIR)/$(LIBWHICH_SRC_DIR)/source-extracted
configure-libwhich: extract-libwhich
compile-libwhich: $(BUILDDIR)/$(LIBWHICH_SRC_DIR)/build-compiled
fastcheck-libwhich: check-libwhich
check-libwhich: $(BUILDDIR)/$(LIBWHICH_SRC_DIR)/build-checked