build git as part of contrib-development
[AROS-Contrib.git] / development / scm / git / mmakefile.src
blobc73fe8463fee4792db6e638a7e0c2615e20ba231
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
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)
20 GIT_OPTIONS := \
21             --without-tcltk \
22             --with-lib='$(AROS_LIB)'
24 GIT_VERSION := 2.12.2
25 GIT_PORTDIR := $(PORTSDIR)/git
27 GIT_ARCHBASE := v$(GIT_VERSION)
28 GIT_ARCHDIR := git-$(GIT_VERSION)
30 BUILD_ENV := $(GIT_ENV)
32 # uncomment to get verbose build output..
33 # BUILD_ENV := V=1 $(BUILD_ENV)
35 USER_INCLUDES := -I$(AROS_CONTRIB_INCLUDES)
36 USER_LDFLAGS := -L$(AROS_CONTRIB_LIB)
38 #MM
39 contrib-development-git-setup :
40         @$(IF) $(TEST) -d $(GIT_PORTDIR)/$(GIT_ARCHDIR) \
41             && ! $(TEST) -f $(GIT_PORTDIR)/$(GIT_ARCHDIR)/configure ; then \
42                cd $(GIT_PORTDIR)/$(GIT_ARCHDIR) && $(MAKE) configure; \
43         fi
45 %fetch mmake=contrib-development-git-fetch archive=$(GIT_ARCHBASE) suffixes="tar.gz" \
46     location=$(PORTSSOURCEDIR) destination=$(GIT_PORTDIR) \
47     archive_origins=". https://github.com/git/git/archive" \
48     patches_specs="$(GIT_ARCHBASE)-aros.diff:$(GIT_ARCHDIR):-f,-p1" patches_origins="$(SRCDIR)/$(CURDIR)"
50 GIT_PATCHIGNORE := autom4te.cache configure GIT-VERSION-FILE
52 %create_patch mmake=contrib-development-git-create-patch archive=$(GIT_ARCHBASE) \
53     srcdir=$(GIT_ARCHDIR) suffixes="tar.gz" destination=$(GIT_PORTDIR) excludes="$(GIT_PATCHIGNORE)"
55 NOAWRN_FLAGS := $(NOWARN_IMPLICIT_FUNCTION_DECLARATION)
56 USER_CFLAGS := $(NOAWRN_FLAGS)
58 %build_with_configure mmake=contrib-development-git compiler=target \
59     srcdir=$(GIT_PORTDIR)/$(GIT_ARCHDIR) prefix="$(DESTDIR)" aros_prefix=$(GIT_NATIVEDIR) gnuflags=no nix=yes \
60     config_env_extra="$(GIT_CONFIG_ENV)" install_env="$(GIT_ENV)" extraoptions="$(GIT_OPTIONS)"
62 #MM
63 contrib-development-git-gendirs:
64         $(MKDIR) $(GENDIR)/$(CURDIR)
66 %common