Skip to content

Commit 4f9e786

Browse files
committed
Change makefile order to only update submodules on 'all' target
insterad of always update the submodules, now only "make all" will run that, thus an "make jquery" will not update them
1 parent 22738e0 commit 4f9e786

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Makefile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,13 @@ VER = sed "s/@VERSION/${JQ_VER}/"
4242

4343
DATE=$(shell git log -1 --pretty=format:%ad)
4444

45-
all: jquery min lint
45+
all: update_submodules jquery min lint
4646
@@echo "jQuery build complete."
4747

4848
${DIST_DIR}:
4949
@@mkdir -p ${DIST_DIR}
5050

51-
init:
52-
@@if [ -d .git ]; then git submodule update --init --recursive --merge; fi
53-
54-
jquery: init ${JQ}
51+
jquery: ${JQ}
5552

5653
${JQ}: ${MODULES} | ${DIST_DIR}
5754
@@echo "Building" ${JQ}
@@ -98,6 +95,10 @@ distclean: clean
9895
@@echo "Removing submodules"
9996
@@rm -rf test/qunit src/sizzle
10097

98+
# change pointers for submodules and update them to what is specified in jQuery
99+
update_submodules:
100+
@@if [ -d .git ]; then git submodule update --init --recursive --merge; fi
101+
101102
# update the submodules to the latest at the most logical branch
102103
pull_submodules:
103104
@@git submodule foreach "git pull origin \$$(git branch --no-color --contains \$$(git rev-parse HEAD) | grep -v \( | head -1)"

0 commit comments

Comments
 (0)