]> Lady’s Gitweb - CGirls/commitdiff
Dot‐prefix version and flags files
authorLady <redacted>
Fri, 28 Mar 2025 17:44:30 +0000 (13:44 -0400)
committerLady <redacted>
Fri, 28 Mar 2025 17:44:30 +0000 (13:44 -0400)
These clutter up the directory and really don¦t need to be visible to
an average user.

.gitignore
make/cgirls.mak

index 38b847a260505a95257ad9fcc928ac21ca042607..42b79cb3eca684ff8946df5ee67facf0152e6a76 100644 (file)
@@ -1,8 +1,8 @@
 # SPDX-FileCopyrightText: 2025 Lady <https://www.ladys.computer/about/#lady>
 # SPDX-License-Identifier: CC0-1.0
 
-CGIRLS-CFLAGS
-VERSION
+.CGIRLS-CFLAGS
+.VERSION
 .depend
 *.o
 cgirls
index ccbc9ebbd3840e3563402267f514e123056275c3..7dca4ceaa03361df6369d1eae194855c01889b3a 100644 (file)
@@ -15,13 +15,13 @@ cgirls : $(CGIRLSDIR)/cgirls
 .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´.
@@ -43,7 +43,7 @@ CGIRLS_ALLOBJS = $(CGIRLS_OBJS) $(CGIRLS_TESTOBJS)
 
 # 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)"'
 
@@ -70,15 +70,15 @@ endif
 -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)
This page took 0.030125 seconds and 4 git commands to generate.