fix the dir's used to build/install git
[AROS-Contrib.git] / development / scm / git / mmakefile.src
blobac4ef35768dd9b47260234de0b40dd662c159f1f
1 # Copyright © 2016-2017, The AROS Development Team. All rights reserved.
2 # $Id$
4 include $(SRCDIR)/config/aros.cfg
6 #MM- contrib-development : contrib-development-git
7 #MM contrib-development-git : contrib-development-git-setup contrib-libiconv
8 #MM contrib-development-git-setup : contrib-development-git-fetch contrib-development-git-gendirs
10 GIT_DESTDIR     :=      $(AROS_DEVELOPER)
11 GIT_NATIVEDIR  :=       /$(AROS_DIR_DEVELOPER)
13 GIT_ENV := \
14            UNAME="$(CROSSTOOLSDIR)/$(AROS_TARGET_CPU)-aros-uname"
15 GIT_CONFIG_ENV := \
16             ac_cv_fread_reads_directories="no" \
17             ac_cv_snprintf_returns_bogus="no" \
18             $(GIT_ENV)
19 GIT_INSTALL_ENV := \
20             DESTDIR_SQ="$(AROSDIR)" \
21             $(GIT_ENV)
23 GIT_OPTIONS := \
24             --without-tcltk \
25             --with-lib='$(AROS_LIB)'
27 GIT_VERSION := 2.12.2
28 GIT_PORTDIR := $(PORTSDIR)/git
30 GIT_ARCHBASE := v$(GIT_VERSION)
31 GIT_ARCHDIR := git-$(GIT_VERSION)
33 BUILD_ENV := $(GIT_ENV)
35 # uncomment to get verbose build output..
36 # BUILD_ENV := V=1 $(BUILD_ENV)
38 USER_INCLUDES := -I$(AROS_CONTRIB_INCLUDES)
39 USER_LDFLAGS := -L$(AROS_CONTRIB_LIB)
41 #MM
42 contrib-development-git-setup :
43         @$(IF) $(TEST) -d $(GIT_PORTDIR)/$(GIT_ARCHDIR) \
44             && ! $(TEST) -f $(GIT_PORTDIR)/$(GIT_ARCHDIR)/configure ; then \
45                cd $(GIT_PORTDIR)/$(GIT_ARCHDIR) && $(MAKE) configure; \
46         fi
48 %fetch mmake=contrib-development-git-fetch archive=$(GIT_ARCHBASE) suffixes="tar.gz" \
49     location=$(PORTSSOURCEDIR) destination=$(GIT_PORTDIR) \
50     archive_origins=". https://github.com/git/git/archive" \
51     patches_specs="$(GIT_ARCHBASE)-aros.diff:$(GIT_ARCHDIR):-f,-p1" patches_origins="$(SRCDIR)/$(CURDIR)"
53 GIT_PATCHIGNORE := autom4te.cache configure GIT-VERSION-FILE
55 %create_patch mmake=contrib-development-git-create-patch archive=$(GIT_ARCHBASE) \
56     srcdir=$(GIT_ARCHDIR) suffixes="tar.gz" destination=$(GIT_PORTDIR) excludes="$(GIT_PATCHIGNORE)"
58 NOAWRN_FLAGS := $(NOWARN_IMPLICIT_FUNCTION_DECLARATION)
59 USER_CFLAGS := $(NOAWRN_FLAGS)
61 %build_with_configure mmake=contrib-development-git compiler=target \
62     srcdir=$(GIT_PORTDIR)/$(GIT_ARCHDIR) prefix="$(GIT_NATIVEDIR)" gnuflags=no nix=yes \
63     config_env_extra="$(GIT_CONFIG_ENV)" install_env="$(GIT_INSTALL_ENV)" extraoptions="$(GIT_OPTIONS)"
65 #MM
66 contrib-development-git-gendirs:
67         $(MKDIR) $(GENDIR)/$(CURDIR)
69 %common