Skip to content

Commit

Permalink
Update makefile in preparation for Documentation/config/*.txt
Browse files Browse the repository at this point in the history
config.txt is going to be broken down in smaller pieces and put under
Documentation/config directory. Update build rules to take these files
into account.

A dummy file is added to make sure wildcard expansion is predictable
(depending on shell setting it could expand to nothing or becomes a
path if config directory is empty). The file will be deleted once the
move is over.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
pclouds authored and gitster committed Oct 29, 2018
1 parent 89e4fcb commit 76b993a
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Documentation/Makefile
Expand Up @@ -285,7 +285,7 @@ docdep_prereqs = \
mergetools-list.made $(mergetools_txt) \
cmd-list.made $(cmds_txt)

doc.dep : $(docdep_prereqs) $(wildcard *.txt) build-docdep.perl
doc.dep : $(docdep_prereqs) $(wildcard *.txt) $(wildcard config/*.txt) build-docdep.perl
$(QUIET_GEN)$(RM) $@+ $@ && \
$(PERL_PATH) ./build-docdep.perl >$@+ $(QUIET_STDERR) && \
mv $@+ $@
Expand Down
Empty file added Documentation/config/dummy.txt
Empty file.
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -2068,7 +2068,7 @@ $(BUILT_INS): git$X

command-list.h: generate-cmdlist.sh command-list.txt

command-list.h: $(wildcard Documentation/git*.txt) Documentation/*config.txt
command-list.h: $(wildcard Documentation/git*.txt) Documentation/*config.txt Documentation/config/*.txt
$(QUIET_GEN)$(SHELL_PATH) ./generate-cmdlist.sh command-list.txt >$@+ && mv $@+ $@

SCRIPT_DEFINES = $(SHELL_PATH_SQ):$(DIFF_SQ):$(GIT_VERSION):\
Expand Down
2 changes: 1 addition & 1 deletion generate-cmdlist.sh
Expand Up @@ -80,7 +80,7 @@ print_config_list () {
cat <<EOF
static const char *config_name_list[] = {
EOF
grep -h '^[a-zA-Z].*\..*::$' Documentation/*config.txt |
grep -h '^[a-zA-Z].*\..*::$' Documentation/*config.txt Documentation/config/*.txt |
sed '/deprecated/d; s/::$//; s/, */\n/g' |
sort |
while read line
Expand Down

0 comments on commit 76b993a

Please sign in to comment.