Skip to content

Commit a767f2f

Browse files
pks-tgitster
authored andcommitted
builds: move build scripts into "tools/"
We have a bunch of scripts used by our different build systems that are all located in the top-level directory. Now that we have introduced the new "tools/" directory though we have a better home for them. Move the scripts into the "tools/" directory. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 405c98a commit a767f2f

13 files changed

Lines changed: 35 additions & 35 deletions

Makefile

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2689,21 +2689,21 @@ $(BUILT_INS): git$X
26892689
ln -s $< $@ 2>/dev/null || \
26902690
cp $< $@
26912691

2692-
config-list.h: generate-configlist.sh
2692+
config-list.h: tools/generate-configlist.sh
26932693
@mkdir -p .depend
2694-
$(QUIET_GEN)$(SHELL_PATH) ./generate-configlist.sh . $@ .depend/config-list.h.d
2694+
$(QUIET_GEN)$(SHELL_PATH) ./tools/generate-configlist.sh . $@ .depend/config-list.h.d
26952695

26962696
-include .depend/config-list.h.d
26972697

2698-
command-list.h: generate-cmdlist.sh command-list.txt
2698+
command-list.h: tools/generate-cmdlist.sh command-list.txt
26992699

27002700
command-list.h: $(wildcard Documentation/git*.adoc)
2701-
$(QUIET_GEN)$(SHELL_PATH) ./generate-cmdlist.sh \
2701+
$(QUIET_GEN)$(SHELL_PATH) ./tools/generate-cmdlist.sh \
27022702
$(patsubst %,--exclude-program %,$(EXCLUDED_PROGRAMS)) \
27032703
. $@
27042704

2705-
hook-list.h: generate-hooklist.sh Documentation/githooks.adoc
2706-
$(QUIET_GEN)$(SHELL_PATH) ./generate-hooklist.sh . $@
2705+
hook-list.h: tools/generate-hooklist.sh Documentation/githooks.adoc
2706+
$(QUIET_GEN)$(SHELL_PATH) ./tools/generate-hooklist.sh . $@
27072707

27082708
SCRIPT_DEFINES = $(SHELL_PATH_SQ):$(DIFF_SQ):\
27092709
$(localedir_SQ):$(USE_GETTEXT_SCHEME):$(SANE_TOOL_PATH_SQ):\
@@ -2716,8 +2716,8 @@ GIT-SCRIPT-DEFINES: FORCE
27162716
echo "$$FLAGS" >$@; \
27172717
fi
27182718

2719-
$(SCRIPT_SH_GEN) $(SCRIPT_LIB) : % : %.sh generate-script.sh GIT-BUILD-OPTIONS GIT-SCRIPT-DEFINES
2720-
$(QUIET_GEN)./generate-script.sh "$<" "$@+" ./GIT-BUILD-OPTIONS && \
2719+
$(SCRIPT_SH_GEN) $(SCRIPT_LIB) : % : %.sh tools/generate-script.sh GIT-BUILD-OPTIONS GIT-SCRIPT-DEFINES
2720+
$(QUIET_GEN)./tools/generate-script.sh "$<" "$@+" ./GIT-BUILD-OPTIONS && \
27212721
mv $@+ $@
27222722

27232723
git.rc: git.rc.in GIT-VERSION-GEN GIT-VERSION-FILE
@@ -2757,8 +2757,8 @@ endif
27572757

27582758
PERL_DEFINES += $(gitexecdir) $(perllibdir) $(localedir)
27592759

2760-
$(SCRIPT_PERL_GEN): % : %.perl generate-perl.sh GIT-PERL-DEFINES GIT-PERL-HEADER GIT-VERSION-FILE
2761-
$(QUIET_GEN)$(SHELL_PATH) generate-perl.sh ./GIT-BUILD-OPTIONS ./GIT-VERSION-FILE GIT-PERL-HEADER "$<" "$@+" && \
2760+
$(SCRIPT_PERL_GEN): % : %.perl tools/generate-perl.sh GIT-PERL-DEFINES GIT-PERL-HEADER GIT-VERSION-FILE
2761+
$(QUIET_GEN)$(SHELL_PATH) tools/generate-perl.sh ./GIT-BUILD-OPTIONS ./GIT-VERSION-FILE GIT-PERL-HEADER "$<" "$@+" && \
27622762
mv $@+ $@
27632763

27642764
PERL_DEFINES := $(subst $(space),:,$(PERL_DEFINES))
@@ -2786,8 +2786,8 @@ GIT-PERL-HEADER: $(PERL_HEADER_TEMPLATE) GIT-PERL-DEFINES Makefile
27862786
perllibdir:
27872787
@echo '$(perllibdir_SQ)'
27882788

2789-
git-instaweb: git-instaweb.sh generate-script.sh GIT-BUILD-OPTIONS GIT-SCRIPT-DEFINES
2790-
$(QUIET_GEN)./generate-script.sh "$<" "$@+" ./GIT-BUILD-OPTIONS && \
2789+
git-instaweb: git-instaweb.sh tools/generate-script.sh GIT-BUILD-OPTIONS GIT-SCRIPT-DEFINES
2790+
$(QUIET_GEN)./tools/generate-script.sh "$<" "$@+" ./GIT-BUILD-OPTIONS && \
27912791
chmod +x $@+ && \
27922792
mv $@+ $@
27932793
else # NO_PERL
@@ -2804,9 +2804,9 @@ endif # NO_PERL
28042804
$(SCRIPT_PYTHON_GEN): GIT-BUILD-OPTIONS
28052805

28062806
ifndef NO_PYTHON
2807-
$(SCRIPT_PYTHON_GEN): generate-python.sh
2807+
$(SCRIPT_PYTHON_GEN): tools/generate-python.sh
28082808
$(SCRIPT_PYTHON_GEN): % : %.py
2809-
$(QUIET_GEN)$(SHELL_PATH) generate-python.sh ./GIT-BUILD-OPTIONS "$<" "$@"
2809+
$(QUIET_GEN)$(SHELL_PATH) tools/generate-python.sh ./GIT-BUILD-OPTIONS "$<" "$@"
28102810
else # NO_PYTHON
28112811
$(SCRIPT_PYTHON_GEN): % : unimplemented.sh
28122812
$(QUIET_GEN) \
@@ -3226,9 +3226,9 @@ endif
32263226
NO_PERL_CPAN_FALLBACKS_SQ = $(subst ','\'',$(NO_PERL_CPAN_FALLBACKS))
32273227
endif
32283228

3229-
perl/build/lib/%.pm: perl/%.pm generate-perl.sh GIT-BUILD-OPTIONS GIT-VERSION-FILE GIT-PERL-DEFINES
3229+
perl/build/lib/%.pm: perl/%.pm tools/generate-perl.sh GIT-BUILD-OPTIONS GIT-VERSION-FILE GIT-PERL-DEFINES
32303230
$(call mkdir_p_parent_template)
3231-
$(QUIET_GEN)$(SHELL_PATH) generate-perl.sh ./GIT-BUILD-OPTIONS ./GIT-VERSION-FILE GIT-PERL-HEADER "$<" "$@"
3231+
$(QUIET_GEN)$(SHELL_PATH) tools/generate-perl.sh ./GIT-BUILD-OPTIONS ./GIT-VERSION-FILE GIT-PERL-HEADER "$<" "$@"
32323232

32333233
perl/build/man/man3/Git.3pm: perl/Git.pm
32343234
$(call mkdir_p_parent_template)
@@ -3936,7 +3936,7 @@ check-docs::
39363936
### Make sure built-ins do not have dups and listed in git.c
39373937
#
39383938
check-builtins::
3939-
./check-builtins.sh
3939+
./tools/check-builtins.sh
39403940

39413941
### Test suite coverage testing
39423942
#

config.mak.dev

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
ifndef COMPILER_FEATURES
2-
COMPILER_FEATURES := $(shell ./detect-compiler $(CC))
2+
COMPILER_FEATURES := $(shell ./tools/detect-compiler $(CC))
33
endif
44

55
ifeq ($(filter no-error,$(DEVOPTS)),)

contrib/buildsystems/CMakeLists.txt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -636,22 +636,22 @@ set(EXCLUSION_PROGS_CACHE ${EXCLUSION_PROGS} CACHE STRING "Programs not built" F
636636
if(NOT EXISTS ${CMAKE_BINARY_DIR}/command-list.h OR NOT EXCLUSION_PROGS_CACHE STREQUAL EXCLUSION_PROGS)
637637
list(REMOVE_ITEM EXCLUSION_PROGS empty)
638638
message("Generating command-list.h")
639-
execute_process(COMMAND "${SH_EXE}" "${CMAKE_SOURCE_DIR}/generate-cmdlist.sh"
639+
execute_process(COMMAND "${SH_EXE}" "${CMAKE_SOURCE_DIR}/tools/generate-cmdlist.sh"
640640
${EXCLUSION_PROGS}
641641
"${CMAKE_SOURCE_DIR}"
642642
"${CMAKE_BINARY_DIR}/command-list.h")
643643
endif()
644644

645645
if(NOT EXISTS ${CMAKE_BINARY_DIR}/config-list.h)
646646
message("Generating config-list.h")
647-
execute_process(COMMAND "${SH_EXE}" "${CMAKE_SOURCE_DIR}/generate-configlist.sh"
647+
execute_process(COMMAND "${SH_EXE}" "${CMAKE_SOURCE_DIR}/tools/generate-configlist.sh"
648648
"${CMAKE_SOURCE_DIR}"
649649
"${CMAKE_BINARY_DIR}/config-list.h")
650650
endif()
651651

652652
if(NOT EXISTS ${CMAKE_BINARY_DIR}/hook-list.h)
653653
message("Generating hook-list.h")
654-
execute_process(COMMAND "${SH_EXE}" ${CMAKE_SOURCE_DIR}/generate-hooklist.sh
654+
execute_process(COMMAND "${SH_EXE}" ${CMAKE_SOURCE_DIR}/tools/generate-hooklist.sh
655655
"${CMAKE_SOURCE_DIR}"
656656
"${CMAKE_BINARY_DIR}/hook-list.h")
657657
endif()
@@ -832,11 +832,11 @@ foreach(script ${git_shell_scripts})
832832
endif()
833833

834834
add_custom_command(OUTPUT "${CMAKE_BINARY_DIR}/${shell_gen_path}"
835-
COMMAND "${SH_EXE}" "${CMAKE_SOURCE_DIR}/generate-script.sh"
835+
COMMAND "${SH_EXE}" "${CMAKE_SOURCE_DIR}/tools/generate-script.sh"
836836
"${CMAKE_SOURCE_DIR}/${script}.sh"
837837
"${CMAKE_BINARY_DIR}/${shell_gen_path}"
838838
"${CMAKE_BINARY_DIR}/GIT-BUILD-OPTIONS"
839-
DEPENDS "${CMAKE_SOURCE_DIR}/generate-script.sh"
839+
DEPENDS "${CMAKE_SOURCE_DIR}/tools/generate-script.sh"
840840
"${CMAKE_SOURCE_DIR}/${script}.sh"
841841
VERBATIM)
842842
list(APPEND shell_gen ${CMAKE_BINARY_DIR}/${shell_gen_path})
@@ -875,13 +875,13 @@ foreach(script ${git_perl_scripts} ${perl_modules})
875875
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/${perl_gen_dir}")
876876

877877
add_custom_command(OUTPUT "${CMAKE_BINARY_DIR}/${perl_gen_path}"
878-
COMMAND "${SH_EXE}" "${CMAKE_SOURCE_DIR}/generate-perl.sh"
878+
COMMAND "${SH_EXE}" "${CMAKE_SOURCE_DIR}/tools/generate-perl.sh"
879879
"${CMAKE_BINARY_DIR}/GIT-BUILD-OPTIONS"
880880
"${CMAKE_BINARY_DIR}/GIT-VERSION-FILE"
881881
"${CMAKE_BINARY_DIR}/GIT-PERL-HEADER"
882882
"${CMAKE_SOURCE_DIR}/${script}"
883883
"${CMAKE_BINARY_DIR}/${perl_gen_path}"
884-
DEPENDS "${CMAKE_SOURCE_DIR}/generate-perl.sh"
884+
DEPENDS "${CMAKE_SOURCE_DIR}/tools/generate-perl.sh"
885885
"${CMAKE_SOURCE_DIR}/${script}"
886886
"${CMAKE_BINARY_DIR}/GIT-BUILD-OPTIONS"
887887
"${CMAKE_BINARY_DIR}/GIT-VERSION-FILE"
@@ -892,11 +892,11 @@ add_custom_target(perl-gen ALL DEPENDS ${perl_gen})
892892

893893
# Python script
894894
add_custom_command(OUTPUT "${CMAKE_BINARY_DIR}/git-p4"
895-
COMMAND "${SH_EXE}" "${CMAKE_SOURCE_DIR}/generate-python.sh"
895+
COMMAND "${SH_EXE}" "${CMAKE_SOURCE_DIR}/tools/generate-python.sh"
896896
"${CMAKE_BINARY_DIR}/GIT-BUILD-OPTIONS"
897897
"${CMAKE_SOURCE_DIR}/git-p4.py"
898898
"${CMAKE_BINARY_DIR}/git-p4"
899-
DEPENDS "${CMAKE_SOURCE_DIR}/generate-python.sh"
899+
DEPENDS "${CMAKE_SOURCE_DIR}/tools/generate-python.sh"
900900
"${CMAKE_SOURCE_DIR}/git-p4.py"
901901
"${CMAKE_BINARY_DIR}/GIT-BUILD-OPTIONS"
902902
VERBATIM)

contrib/subtree/meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ git_subtree = custom_target(
33
output: 'git-subtree',
44
command: [
55
shell,
6-
meson.project_source_root() / 'generate-script.sh',
6+
meson.project_source_root() / 'tools/generate-script.sh',
77
'@INPUT@',
88
'@OUTPUT@',
99
meson.project_build_root() / 'GIT-BUILD-OPTIONS',

meson.build

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ libgit_sources = [
554554
libgit_sources += custom_target(
555555
input: 'command-list.txt',
556556
output: 'command-list.h',
557-
command: [shell, meson.current_source_dir() + '/generate-cmdlist.sh', meson.current_source_dir(), '@OUTPUT@'],
557+
command: [shell, meson.current_source_dir() + '/tools/generate-cmdlist.sh', meson.current_source_dir(), '@OUTPUT@'],
558558
env: script_environment,
559559
)
560560

@@ -723,10 +723,10 @@ endif
723723
builtin_sources += custom_target(
724724
output: 'config-list.h',
725725
depfile: 'config-list.h.d',
726-
depend_files: [ 'generate-configlist.sh' ],
726+
depend_files: [ 'tools/generate-configlist.sh' ],
727727
command: [
728728
shell,
729-
meson.current_source_dir() / 'generate-configlist.sh',
729+
meson.current_source_dir() / 'tools/generate-configlist.sh',
730730
meson.current_source_dir(),
731731
'@OUTPUT@',
732732
'@DEPFILE@',
@@ -739,7 +739,7 @@ builtin_sources += custom_target(
739739
output: 'hook-list.h',
740740
command: [
741741
shell,
742-
meson.current_source_dir() + '/generate-hooklist.sh',
742+
meson.current_source_dir() + '/tools/generate-hooklist.sh',
743743
meson.current_source_dir(),
744744
'@OUTPUT@',
745745
],
@@ -1959,7 +1959,7 @@ foreach script : scripts_sh
19591959
output: fs.stem(script),
19601960
command: [
19611961
shell,
1962-
meson.project_source_root() / 'generate-script.sh',
1962+
meson.project_source_root() / 'tools/generate-script.sh',
19631963
'@INPUT@',
19641964
'@OUTPUT@',
19651965
meson.project_build_root() / 'GIT-BUILD-OPTIONS',
@@ -2008,7 +2008,7 @@ if perl_features_enabled
20082008

20092009
generate_perl_command = [
20102010
shell,
2011-
meson.project_source_root() / 'generate-perl.sh',
2011+
meson.project_source_root() / 'tools/generate-perl.sh',
20122012
meson.project_build_root() / 'GIT-BUILD-OPTIONS',
20132013
git_version_file.full_path(),
20142014
perl_header,
@@ -2057,7 +2057,7 @@ if target_python.found()
20572057
output: fs.stem(script),
20582058
command: [
20592059
shell,
2060-
meson.project_source_root() / 'generate-python.sh',
2060+
meson.project_source_root() / 'tools/generate-python.sh',
20612061
meson.project_build_root() / 'GIT-BUILD-OPTIONS',
20622062
'@INPUT@',
20632063
'@OUTPUT@',
File renamed without changes.

0 commit comments

Comments
 (0)