# SPDX-FileCopyrightText: 2025 Lady <https://www.ladys.computer/about/#lady>
# SPDX-License-Identifier: GPL-2.0-only

SHELL = /bin/sh

GIT := git

GITDIR := Git

CGIRLS_VERSION := 0.1.0
GIT_VERSION := 2.49.0

all : cgirls cgirls-tests documentation ;

-include $(GITDIR)/config.mak.uname
-include $(GITDIR)/shared.mak

VERSION :
	$(QUIET_SUBDIR0)Git $(QUIET_SUBDIR1) -f ../make/cgirls.mak ../VERSION

cgirls cgirls-tests :
	$(QUIET_SUBDIR0)Git $(QUIET_SUBDIR1) -f ../make/cgirls.mak $@ $(EXTRA_GIT_TARGETS) NO_PERL=1 NO_GITWEB=1 NO_PYTHON=1 NO_TCLTK=1 NO_GETTEXT=1 NO_EXPAT=1 NO_CURL=1

cgirls-test-% : FORCE
	$(QUIET_SUBDIR0)Git $(QUIET_SUBDIR1) -f ../make/cgirls.mak ../$@ $(EXTRA_GIT_TARGETS) NO_PERL=1 NO_GITWEB=1 NO_PYTHON=1 NO_TCLTK=1 NO_GETTEXT=1 NO_EXPAT=1 NO_CURL=1

documentation : FORCE
	@$(MAKE) -f make/documentation.mak $@

$(GITDIR)/shared.mak : %/shared.mak : FORCE
	$(GIT) submodule update --init '$*'

FORCE : ;
.PHONY : FORCE VERSION all cgirls cgirls-tests ;