Skip to content

Commit 4331ea8

Browse files
felipecgitster
authored andcommitted
build: add NO_INSTALL variable
So that we can specify which scripts we do not want to install (they are for testing). Signed-off-by: Felipe Contreras <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent f530aa9 commit 4331ea8

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

Makefile

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,10 @@ SCRIPT_SH_GEN = $(patsubst %.sh,%,$(SCRIPT_SH))
492492
SCRIPT_PERL_GEN = $(patsubst %.perl,%,$(SCRIPT_PERL))
493493
SCRIPT_PYTHON_GEN = $(patsubst %.py,%,$(SCRIPT_PYTHON))
494494

495+
SCRIPT_SH_INS = $(filter-out $(NO_INSTALL),$(SCRIPT_SH_GEN))
496+
SCRIPT_PERL_INS = $(filter-out $(NO_INSTALL),$(SCRIPT_PERL_GEN))
497+
SCRIPT_PYTHON_INS = $(filter-out $(NO_INSTALL),$(SCRIPT_PYTHON_GEN))
498+
495499
# Individual rules to allow e.g.
496500
# "make -C ../.. SCRIPT_PERL=contrib/foo/bar.perl build-perl-script"
497501
# from subdirectories like contrib/*/
@@ -501,11 +505,11 @@ build-sh-script: $(SCRIPT_SH_GEN)
501505
build-python-script: $(SCRIPT_PYTHON_GEN)
502506

503507
.PHONY: install-perl-script install-sh-script install-python-script
504-
install-sh-script: $(SCRIPT_SH_GEN)
508+
install-sh-script: $(SCRIPT_SH_INS)
505509
$(INSTALL) $^ '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
506-
install-perl-script: $(SCRIPT_PERL_GEN)
510+
install-perl-script: $(SCRIPT_PERL_INS)
507511
$(INSTALL) $^ '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
508-
install-python-script: $(SCRIPT_PYTHON_GEN)
512+
install-python-script: $(SCRIPT_PYTHON_INS)
509513
$(INSTALL) $^ '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
510514

511515
.PHONY: clean-perl-script clean-sh-script clean-python-script
@@ -516,9 +520,9 @@ clean-perl-script:
516520
clean-python-script:
517521
$(RM) $(SCRIPT_PYTHON_GEN)
518522

519-
SCRIPTS = $(SCRIPT_SH_GEN) \
520-
$(SCRIPT_PERL_GEN) \
521-
$(SCRIPT_PYTHON_GEN) \
523+
SCRIPTS = $(SCRIPT_SH_INS) \
524+
$(SCRIPT_PERL_INS) \
525+
$(SCRIPT_PYTHON_INS) \
522526
git-instaweb
523527

524528
ETAGS_TARGET = TAGS

0 commit comments

Comments
 (0)