|
91 | 91 | # |
92 | 92 | # Define USE_STDEV below if you want git to care about the underlying device |
93 | 93 | # change being considered an inode change from the update-cache perspective. |
| 94 | +# |
| 95 | +# Define NO_PERL_MAKEMAKER if you cannot use Makefiles generated by perl's |
| 96 | +# MakeMaker (e.g. using ActiveState under Cygwin). |
| 97 | +# |
94 | 98 |
|
95 | 99 | GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE |
96 | 100 | @$(SHELL_PATH) ./GIT-VERSION-GEN |
@@ -323,18 +327,6 @@ ifeq ($(uname_S),Darwin) |
323 | 327 | NEEDS_SSL_WITH_CRYPTO = YesPlease |
324 | 328 | NEEDS_LIBICONV = YesPlease |
325 | 329 | NO_STRLCPY = YesPlease |
326 | | - ifndef NO_FINK |
327 | | - ifeq ($(shell test -d /sw/lib && echo y),y) |
328 | | - BASIC_CFLAGS += -I/sw/include |
329 | | - BASIC_LDFLAGS += -L/sw/lib |
330 | | - endif |
331 | | - endif |
332 | | - ifndef NO_DARWIN_PORTS |
333 | | - ifeq ($(shell test -d /opt/local/lib && echo y),y) |
334 | | - BASIC_CFLAGS += -I/opt/local/include |
335 | | - BASIC_LDFLAGS += -L/opt/local/lib |
336 | | - endif |
337 | | - endif |
338 | 330 | endif |
339 | 331 | ifeq ($(uname_S),SunOS) |
340 | 332 | NEEDS_SOCKET = YesPlease |
@@ -412,6 +404,21 @@ endif |
412 | 404 | -include config.mak.autogen |
413 | 405 | -include config.mak |
414 | 406 |
|
| 407 | +ifeq ($(uname_S),Darwin) |
| 408 | + ifndef NO_FINK |
| 409 | + ifeq ($(shell test -d /sw/lib && echo y),y) |
| 410 | + BASIC_CFLAGS += -I/sw/include |
| 411 | + BASIC_LDFLAGS += -L/sw/lib |
| 412 | + endif |
| 413 | + endif |
| 414 | + ifndef NO_DARWIN_PORTS |
| 415 | + ifeq ($(shell test -d /opt/local/lib && echo y),y) |
| 416 | + BASIC_CFLAGS += -I/opt/local/include |
| 417 | + BASIC_LDFLAGS += -L/opt/local/lib |
| 418 | + endif |
| 419 | + endif |
| 420 | +endif |
| 421 | + |
415 | 422 | ifndef NO_CURL |
416 | 423 | ifdef CURLDIR |
417 | 424 | # This is still problematic -- gcc does not always want -R. |
@@ -540,6 +547,9 @@ endif |
540 | 547 | ifdef NO_ACCURATE_DIFF |
541 | 548 | BASIC_CFLAGS += -DNO_ACCURATE_DIFF |
542 | 549 | endif |
| 550 | +ifdef NO_PERL_MAKEMAKER |
| 551 | + export NO_PERL_MAKEMAKER |
| 552 | +endif |
543 | 553 |
|
544 | 554 | # Shell quote (do not use $(call) to accommodate ancient setups); |
545 | 555 |
|
@@ -569,8 +579,8 @@ export prefix TAR INSTALL DESTDIR SHELL_PATH template_dir |
569 | 579 |
|
570 | 580 | all: $(ALL_PROGRAMS) $(BUILT_INS) git$X gitk gitweb/gitweb.cgi |
571 | 581 |
|
572 | | -all: perl/Makefile |
573 | | - $(MAKE) -C perl |
| 582 | +all: |
| 583 | + $(MAKE) -C perl PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' all |
574 | 584 | $(MAKE) -C templates |
575 | 585 |
|
576 | 586 | strip: $(PROGRAMS) git$X |
@@ -603,7 +613,11 @@ $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh |
603 | 613 | chmod +x $@+ |
604 | 614 | mv $@+ $@ |
605 | 615 |
|
606 | | -$(patsubst %.perl,%,$(SCRIPT_PERL)): perl/Makefile |
| 616 | +$(patsubst %.perl,%,$(SCRIPT_PERL)): perl/perl.mak |
| 617 | + |
| 618 | +perl/perl.mak: GIT-CFLAGS |
| 619 | + $(MAKE) -C perl PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' $(@F) |
| 620 | + |
607 | 621 | $(patsubst %.perl,%,$(SCRIPT_PERL)): % : %.perl |
608 | 622 | rm -f $@ $@+ |
609 | 623 | INSTLIBDIR=`$(MAKE) -C perl -s --no-print-directory instlibdir` && \ |
@@ -798,7 +812,7 @@ install: all |
798 | 812 | $(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(gitexecdir_SQ)' |
799 | 813 | $(INSTALL) git$X gitk '$(DESTDIR_SQ)$(bindir_SQ)' |
800 | 814 | $(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install |
801 | | - $(MAKE) -C perl install |
| 815 | + $(MAKE) -C perl prefix='$(prefix_SQ)' install |
802 | 816 | if test 'z$(bindir_SQ)' != 'z$(gitexecdir_SQ)'; \ |
803 | 817 | then \ |
804 | 818 | ln -f '$(DESTDIR_SQ)$(bindir_SQ)/git$X' \ |
@@ -868,8 +882,7 @@ clean: |
868 | 882 | rm -f $(htmldocs).tar.gz $(manpages).tar.gz |
869 | 883 | rm -f gitweb/gitweb.cgi |
870 | 884 | $(MAKE) -C Documentation/ clean |
871 | | - [ ! -f perl/Makefile ] || $(MAKE) -C perl/ clean || $(MAKE) -C perl/ clean |
872 | | - rm -f perl/ppport.h perl/Makefile.old |
| 885 | + $(MAKE) -C perl clean |
873 | 886 | $(MAKE) -C templates/ clean |
874 | 887 | $(MAKE) -C t/ clean |
875 | 888 | rm -f GIT-VERSION-FILE GIT-CFLAGS |
|
0 commit comments