File tree Expand file tree Collapse file tree 4 files changed +23
-8
lines changed
Expand file tree Collapse file tree 4 files changed +23
-8
lines changed Original file line number Diff line number Diff line change 1313# Anything explicitly listed here will always avoid a bogus "up to date" result
1414TARGETS = \
1515 all clean tg awk hooks helpers doc html \
16- precheck TG-BUILD-SETTINGS \
16+ precheck TG-BUILD-SETTINGS settings \
1717 install install-doc install-html \
1818 tg--awksome tg-tg.txt topgit.html \
1919 shell_compatibility_test \
Original file line number Diff line number Diff line change 1616 tg $(commands_out ) $(utils_out ) $(awk_out ) $(hooks_out ) $(helpers_out ) \
1717 bin-wrappers/tg bin-wrappers/pre-commit $(help_out ) tg-tg.txt
1818
19+ settings : TG-BUILD-SETTINGS FORCE
20+ +$(Q ) cd t && $(MAKE ) settings
21+
1922awk : $(awk_out )
2023hooks : $(hooks_out )
2124helpers : $(helpers_out )
@@ -185,11 +188,11 @@ bs() { printf "%s\\n" \
185188# make -f Makefile.mak TG-BUILD-SETTINGS thus avoiding this always
186189# causing the targets that depend on it to build while still forcing
187190# a rebuild if any settings actually change.
188- TG-BUILD-SETTINGS : $(FORCE_SETTINGS_BUILD )
191+ TG-BUILD-SETTINGS : $(CONFIGDEPS ) $( FORCE_SETTINGS_BUILD )
189192 $(Q )$(BUILD_SETTINGS ) ; if test x" $$ (bs)" ! = x" ` cat \" $@ \" 2> /dev/null` " ; then \
190193 echo " * new build settings" ; \
191194 bs > " $@ " ; \
192- fi
195+ elif test z " $( FORCE_SETTINGS_BUILD ) " = z ; then touch " $@ " ; fi
193196
194197test : all FORCE
195198 +$(Q ) cd t && $(MAKE ) all
Original file line number Diff line number Diff line change @@ -20,13 +20,24 @@ set -e
2020# If MKTOP is set, they are looked for there instead of in
2121# the current directory.
2222#
23+ # The CONFIGDEPS variable will be set to the ones that exist
24+ # (for use in dependency lines).
25+ #
2326# wrap it up for safety
2427configsh () {
25- ! [ -f " ${MKTOP: +$MKTOP / } config.sh" ] ||
26- . ./" ${MKTOP: +$MKTOP / } config.sh"
28+ [ z" $MKTOP " = z" /" ] || MKTOP=" ${MKTOP%/ } "
29+ CONFIGDEPS=
30+ ! [ -f " ${MKTOP: +$MKTOP / } config.sh" ] || {
31+ . ./" ${MKTOP: +$MKTOP / } config.sh"
32+ CONFIGDEPS=" ${CONFIGDEPS: +$CONFIGDEPS }${MKTOP: +$MKTOP / } config.sh"
33+ }
2734 # now set CONFIGMAK and make it an absolute path
2835 [ -n " $CONFIGMAK " ] || CONFIGMAK=" ${MKTOP: +$MKTOP / } config.mak"
29- [ -f " $CONFIGMAK " ] || CONFIGMAK=" ${MKTOP: +$MKTOP / } Makefile.mt"
36+ if [ -f " $CONFIGMAK " ]; then
37+ CONFIGDEPS=" ${CONFIGDEPS: +$CONFIGDEPS } $CONFIGMAK "
38+ else
39+ CONFIGMAK=" ${MKTOP: +$MKTOP / } Makefile.mt"
40+ fi
3041 case " $CONFIGMAK " in * /?* );;* ) CONFIGMAK=" ./$CONFIGMAK " ; esac
3142 CONFIGMAK=" $( cd " ${CONFIGMAK%/* } " && pwd) /${CONFIGMAK##*/ } "
3243}
Original file line number Diff line number Diff line change @@ -110,6 +110,7 @@ TEST_TARGET = $(TEST_TARGET_$(DEFAULT_TEST_TARGET_))
110110all : $(TEST_TARGET )
111111
112112settings : TG-TEST-SETTINGS
113+ -@true # avoids the "Nothing to be done" message
113114
114115test : pre-clean TG-TEST-SETTINGS $(TEST_LINT ) FORCE
115116 $(Q ) set -m && $(CACHE_SETUP_TTY ) $(MAKE ) $$ {GNO_PD_OPT} -f Makefile.mak aggregate-results-and-cleanup
@@ -197,11 +198,11 @@ ts() { printf "%s\\n" \
197198 ': "$${GIT_MINIMUM_VERSION:=$$TG_GIT_MINIMUM_VERSION}"' \
198199;}
199200
200- TG-TEST-SETTINGS : $(FORCE_SETTINGS_BUILD )
201+ TG-TEST-SETTINGS : $(CONFIGDEPS ) $( FORCE_SETTINGS_BUILD )
201202 $(Q )$(TEST_SETTINGS ) ; if test x" $$ (ts)" ! = x" ` cat \" $@ \" 2> /dev/null` " ; then \
202203 echo " * new test settings" ; \
203204 ts > " $@ " ; \
204- fi
205+ elif test z " $( FORCE_SETTINGS_BUILD ) " = z ; then touch " $@ " ; fi
205206
206207FORCE : __file_which_should_not_exist
207208
You can’t perform that action at this time.
0 commit comments