Skip to content

Commit 862e225

Browse files
dschoderrickstolee
authored andcommitted
Merge branch 'move-scalar-to-toplevel'
Since Junio indicated that he'd be fine with `scalar` to eventually be a top-level command. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2 parents eb97239 + 558699e commit 862e225

File tree

19 files changed

+21
-289
lines changed

19 files changed

+21
-289
lines changed

.github/workflows/main.yml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,6 @@ jobs:
9191
HOME: ${{runner.workspace}}
9292
NO_PERL: 1
9393
run: . /etc/profile && ci/make-test-artifacts.sh artifacts
94-
- name: build Scalar
95-
shell: bash
96-
run: |
97-
make -C contrib/scalar &&
98-
mkdir -p artifacts/bin-wrappers artifacts/contrib/scalar &&
99-
cp contrib/scalar/scalar.exe artifacts/contrib/scalar/ &&
100-
cp bin-wrappers/scalar artifacts/bin-wrappers/
10194
- name: zip up tracked files
10295
run: git archive -o artifacts/tracked.tar.gz HEAD
10396
- name: upload tracked files and build artifacts
@@ -167,8 +160,6 @@ jobs:
167160
run: compat\vcbuild\vcpkg_copy_dlls.bat release ${{ matrix.arch }}-windows
168161
- name: generate Visual Studio solution
169162
shell: bash
170-
env:
171-
INCLUDE_SCALAR: YesPlease
172163
run: |
173164
cmake `pwd`/contrib/buildsystems/ -DCMAKE_PREFIX_PATH=`pwd`/compat/vcbuild/vcpkg/installed/${{ matrix.arch }}-windows \
174165
-DNO_GETTEXT=YesPlease -DPERL_TESTS=OFF -DPYTHON_TESTS=OFF -DCURL_NO_CURL_CMAKE=ON -DCMAKE_GENERATOR_PLATFORM=${{ matrix.arch }} -DVCPKG_ARCH=${{ matrix.arch }}-windows -DHOST_CPU=${{ matrix.arch }}
@@ -182,12 +173,6 @@ jobs:
182173
run: |
183174
mkdir -p artifacts &&
184175
eval "$(make -n artifacts-tar INCLUDE_DLLS_IN_ARTIFACTS=YesPlease ARTIFACTS_DIRECTORY=artifacts NO_GETTEXT=YesPlease 2>&1 | grep ^tar)"
185-
- name: copy Scalar
186-
shell: bash
187-
run: |
188-
mkdir -p artifacts/bin-wrappers artifacts/contrib/scalar &&
189-
cp contrib/scalar/scalar.exe artifacts/contrib/scalar/ &&
190-
cp bin-wrappers/scalar artifacts/bin-wrappers/
191176
- name: zip up tracked files
192177
run: git archive -o artifacts/tracked.tar.gz HEAD
193178
- name: upload tracked files and build artifacts

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@
192192
/config-list.h
193193
/command-list.h
194194
/hook-list.h
195+
/scalar
195196
*.tar.gz
196197
*.dsc
197198
*.deb

Documentation/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ MAN1_TXT += git.txt
2222
MAN1_TXT += gitk.txt
2323
MAN1_TXT += gitweb.txt
2424

25+
MAN1_TXT += scalar.txt
26+
2527
# man5 / man7 guides (note: new guides should also be added to command-list.txt)
2628
MAN5_TXT += gitattributes.txt
2729
MAN5_TXT += githooks.txt

contrib/scalar/scalar.txt renamed to Documentation/scalar.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,6 @@ SEE ALSO
162162
--------
163163
linkgit:git-clone[1], linkgit:git-maintenance[1].
164164

165-
Scalar
165+
GIT
166166
---
167-
Associated with the linkgit:git[1] suite
167+
Part of the linkgit:git[1] suite
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

Makefile

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -692,6 +692,11 @@ all:: $(FUZZ_OBJS)
692692

693693
FUZZ_PROGRAMS += $(patsubst %.o,%,$(FUZZ_OBJS))
694694

695+
SCALAR_OBJS := scalar.o
696+
697+
PROGRAMS += scalar$(X)
698+
BINDIR_PROGRAMS_NEED_X += scalar
699+
695700
# Empty...
696701
EXTRA_PROGRAMS =
697702

@@ -2538,17 +2543,14 @@ OBJECTS += $(GIT_OBJS)
25382543
OBJECTS += $(PROGRAM_OBJS)
25392544
OBJECTS += $(TEST_OBJS)
25402545
OBJECTS += $(XDIFF_OBJS)
2546+
OBJECTS += $(SCALAR_OBJS)
25412547
OBJECTS += $(FUZZ_OBJS)
25422548
OBJECTS += $(REFTABLE_OBJS) $(REFTABLE_TEST_OBJS)
25432549

25442550
ifndef NO_CURL
25452551
OBJECTS += http.o http-walker.o remote-curl.o
25462552
endif
25472553

2548-
SCALAR_SOURCES := contrib/scalar/scalar.c
2549-
SCALAR_OBJECTS := $(SCALAR_SOURCES:c=o)
2550-
OBJECTS += $(SCALAR_OBJECTS)
2551-
25522554
.PHONY: objects
25532555
objects: $(OBJECTS)
25542556

@@ -2687,9 +2689,8 @@ $(REMOTE_CURL_PRIMARY): remote-curl.o http.o http-walker.o GIT-LDFLAGS $(GITLIBS
26872689
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
26882690
$(CURL_LIBCURL) $(EXPAT_LIBEXPAT) $(LIBS)
26892691

2690-
contrib/scalar/scalar$X: $(SCALAR_OBJECTS) GIT-LDFLAGS $(GITLIBS)
2691-
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) \
2692-
$(filter %.o,$^) $(LIBS)
2692+
scalar$X: $(SCALAR_OBJS) GIT-LDFLAGS $(GITLIBS)
2693+
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)
26932694

26942695
$(LIB_FILE): $(LIB_OBJS)
26952696
$(QUIET_AR)$(RM) $@ && $(AR) $(ARFLAGS) $@ $^
@@ -3058,7 +3059,7 @@ bin-wrappers/%: wrap-for-bin.sh
30583059
$(call mkdir_p_parent_template)
30593060
$(QUIET_GEN)sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
30603061
-e 's|@@BUILD_DIR@@|$(shell pwd)|' \
3061-
-e 's|@@PROG@@|$(patsubst test-%,t/helper/test-%$(X),$(@F))$(patsubst git%,$(X),$(filter $(@F),$(BINDIR_PROGRAMS_NEED_X)))|' < $< > $@ && \
3062+
-e 's|@@PROG@@|$(patsubst test-%,t/helper/test-%$(X),$(@F))$(patsubst scalar,$(X),$(patsubst git%,$(X),$(filter $(@F),$(BINDIR_PROGRAMS_NEED_X))))|' < $< > $@ && \
30623063
chmod +x $@
30633064

30643065
# GNU make supports exporting all variables by "export" without parameters.

0 commit comments

Comments
 (0)