.PHONY : cgirls
include Makefile
-# The `gen-version.sh´ script updates the `VERSION´ file when·ever the version changes.
+# The `gen-version.sh´ script updates the `.VERSION´ file when·ever the version changes.
# This file is then included to set `CGIRLS_VERSION´.
-$(CGIRLSDIR)/VERSION : VERSIONFORCE
- @cd '$(CGIRLSDIR)' && $(SHELL_PATH_SQ) sh/gen-version.sh VERSION
+$(CGIRLSDIR)/.VERSION : VERSIONFORCE
+ @cd '$(CGIRLSDIR)' && $(SHELL_PATH_SQ) sh/gen-version.sh .VERSION
VERSIONFORCE : ;
.PHONY : VERSIONFORCE
--include $(CGIRLSBUILDDIR)/VERSION
+-include $(CGIRLSBUILDDIR)/.VERSION
# `CGIRLS_CFLAGS´ is a separate variable so that it can be tracked separately, to avoid rebuilding all of Git when these variables change.
# `ALL_CGIRLS_CFLAGS´ is the same as `ALL_CFLAGS´ plus `CGIRLS_CFLAGS´, except that it changes the C standard target to be `c2x´.
# Only `cgirls.c´ references CGIRLS_VERSION so we only rebuild its objects when the version changes.
CGIRLS_VERSION_OBJS := $(CGIRLSDIR)/cgirls.o
-$(CGIRLS_VERSION_OBJS) : $(CGIRLSDIR)/VERSION
+$(CGIRLS_VERSION_OBJS) : $(CGIRLSDIR)/.VERSION
$(CGIRLS_VERSION_OBJS) : EXTRA_CPPFLAGS = \
-DCGIRLS_VERSION='"$(CGIRLS_VERSION)"'
-include $(CGIRLSDIR)/make/config.mak
# This saves the value of `CGIRLS_CFLAGS´ to force a rebuild of `CGIRLS_OBJS´ if the flags should change.
-$(CGIRLSDIR)/CGIRLS-CFLAGS : FORCE
+$(CGIRLSDIR)/.CGIRLS-CFLAGS : FORCE
@FLAGS='$(subst ','"'"',$(CGIRLS_CFLAGS))'; \
- if test x"$$FLAGS" != x"$$(cat $(CGIRLSDIR)/CGIRLS-CFLAGS 2>/dev/null)" ; then \
+ if test x"$$FLAGS" != x"$$(cat $(CGIRLSDIR)/.CGIRLS-CFLAGS 2>/dev/null)" ; then \
echo 1>&2 " * new CGit build flags"; \
- echo "$$FLAGS" >$(CGIRLSDIR)/CGIRLS-CFLAGS; \
+ echo "$$FLAGS" >$(CGIRLSDIR)/.CGIRLS-CFLAGS; \
fi
-# Objects are built and linked the same as with Git, except depending on the additional `CGIRLS-CFLAGS´ file and using `ALL_CGIRLS_CFLAGS´ in place of `ALL_CFLAGS´.
-$(CGIRLS_ALLOBJS) : $(CGIRLSDIR)/%.o : $(CGIRLSDIR)/%.c GIT-CFLAGS $(CGIRLSDIR)/CGIRLS-CFLAGS $(missing_dep_dirs)
+# Objects are built and linked the same as with Git, except depending on the additional `.CGIRLS-CFLAGS´ file and using `ALL_CGIRLS_CFLAGS´ in place of `ALL_CFLAGS´.
+$(CGIRLS_ALLOBJS) : $(CGIRLSDIR)/%.o : $(CGIRLSDIR)/%.c GIT-CFLAGS $(CGIRLSDIR)/.CGIRLS-CFLAGS $(missing_dep_dirs)
$(QUIET_CC)$(CC) -o $@ -c $(dep_args) $(ALL_CGIRLS_CFLAGS) $(EXTRA_CPPFLAGS) $<
$(CGIRLSDIR)/cgirls : $(CGIRLS_OBJS) GIT-LDFLAGS $(GITLIBS)
$(QUIET_LINK)$(CC) $(ALL_CGIRLS_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)