~ubuntu-branches/ubuntu/intrepid/git-core/intrepid-security

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: Package Import Robot
  • Author(s): Gerrit Pape
  • Date: 2007-10-04 08:27:01 UTC
  • mfrom: (1.1.23)
  • Revision ID: package-import@ubuntu.com-20071004082701-rsd058ontoqz4i30
Tags: 1:1.5.3.4-1
new upstream point release (closes: #445188).

Show diffs side-by-side

added added

removed removed

Lines of Context:
112
112
# Define NO_PERL_MAKEMAKER if you cannot use Makefiles generated by perl's
113
113
# MakeMaker (e.g. using ActiveState under Cygwin).
114
114
#
115
 
# Define WITH_P4IMPORT to build and install Python git-p4import script.
116
 
#
117
115
# Define NO_TCLTK if you do not want Tcl/Tk GUI.
118
116
#
119
117
# The TCL_PATH variable governs the location of the Tcl interpreter
146
144
prefix = $(HOME)
147
145
bindir = $(prefix)/bin
148
146
gitexecdir = $(bindir)
149
 
sharedir = $(prefix)/share/
150
 
template_dir = $(sharedir)/git-core/templates/
 
147
sharedir = $(prefix)/share
 
148
template_dir = $(sharedir)/git-core/templates
151
149
ifeq ($(prefix),/usr)
152
150
sysconfdir = /etc
153
151
else
154
152
sysconfdir = $(prefix)/etc
155
153
endif
 
154
lib = lib
156
155
ETC_GITCONFIG = $(sysconfdir)/gitconfig
157
156
# DESTDIR=
158
157
 
176
175
 
177
176
CC = gcc
178
177
AR = ar
 
178
RM = rm -f
179
179
TAR = tar
 
180
FIND = find
180
181
INSTALL = install
181
182
RPMBUILD = rpmbuild
182
183
TCL_PATH = tclsh
204
205
        git-fetch.sh \
205
206
        git-ls-remote.sh \
206
207
        git-merge-one-file.sh git-mergetool.sh git-parse-remote.sh \
207
 
        git-pull.sh git-rebase.sh \
 
208
        git-pull.sh git-rebase.sh git-rebase--interactive.sh \
208
209
        git-repack.sh git-request-pull.sh git-reset.sh \
209
210
        git-sh-setup.sh \
210
 
        git-tag.sh git-verify-tag.sh \
211
 
        git-applymbox.sh git-applypatch.sh git-am.sh \
 
211
        git-am.sh \
212
212
        git-merge.sh git-merge-stupid.sh git-merge-octopus.sh \
213
213
        git-merge-resolve.sh git-merge-ours.sh \
214
 
        git-lost-found.sh git-quiltimport.sh
 
214
        git-lost-found.sh git-quiltimport.sh git-submodule.sh \
 
215
        git-filter-branch.sh \
 
216
        git-stash.sh
215
217
 
216
218
SCRIPT_PERL = \
217
219
        git-add--interactive.perl \
220
222
        git-svnimport.perl git-cvsexportcommit.perl \
221
223
        git-send-email.perl git-svn.perl
222
224
 
223
 
SCRIPT_PYTHON = \
224
 
        git-p4import.py
225
 
 
226
 
ifdef WITH_P4IMPORT
227
 
SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \
228
 
          $(patsubst %.perl,%,$(SCRIPT_PERL)) \
229
 
          $(patsubst %.py,%,$(SCRIPT_PYTHON)) \
230
 
          git-status git-instaweb
231
 
else
232
 
SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \
233
 
          $(patsubst %.perl,%,$(SCRIPT_PERL)) \
234
 
          git-status git-instaweb
235
 
endif
236
 
 
 
225
SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \
 
226
          $(patsubst %.perl,%,$(SCRIPT_PERL)) \
 
227
          git-status git-instaweb
237
228
 
238
229
# ... and all the rest that could be moved out of bindir to gitexecdir
239
230
PROGRAMS = \
240
231
        git-convert-objects$X git-fetch-pack$X \
241
232
        git-hash-object$X git-index-pack$X git-local-fetch$X \
242
233
        git-fast-import$X \
243
 
        git-merge-base$X \
244
234
        git-daemon$X \
245
235
        git-merge-index$X git-mktag$X git-mktree$X git-patch-id$X \
246
236
        git-peek-remote$X git-receive-pack$X \
284
274
ifndef PERL_PATH
285
275
        PERL_PATH = /usr/bin/perl
286
276
endif
287
 
ifndef PYTHON_PATH
288
 
        PYTHON_PATH = /usr/local/bin/python
289
 
endif
290
277
 
291
278
export PERL_PATH
292
279
 
294
281
XDIFF_LIB=xdiff/lib.a
295
282
 
296
283
LIB_H = \
297
 
        archive.h blob.h cache.h commit.h csum-file.h delta.h grep.h \
 
284
        archive.h blob.h cache.h cache-tree.h commit.h csum-file.h delta.h grep.h \
298
285
        diff.h object.h pack.h pkt-line.h quote.h refs.h list-objects.h sideband.h \
299
286
        run-command.h strbuf.h tag.h tree.h git-compat-util.h revision.h \
300
287
        tree-walk.h log-tree.h dir.h path-list.h unpack-trees.h builtin.h \
301
 
        utf8.h reflog-walk.h patch-ids.h attr.h decorate.h progress.h mailmap.h
 
288
        utf8.h reflog-walk.h patch-ids.h attr.h decorate.h progress.h \
 
289
        mailmap.h remote.h
302
290
 
303
291
DIFF_OBJS = \
304
292
        diff.o diff-lib.o diffcore-break.o diffcore-order.o \
320
308
        write_or_die.o trace.o list-objects.o grep.o match-trees.o \
321
309
        alloc.o merge-file.o path-list.o help.o unpack-trees.o $(DIFF_OBJS) \
322
310
        color.o wt-status.o archive-zip.o archive-tar.o shallow.o utf8.o \
323
 
        convert.o attr.o decorate.o progress.o mailmap.o symlinks.o
 
311
        convert.o attr.o decorate.o progress.o mailmap.o symlinks.o remote.o
324
312
 
325
313
BUILTIN_OBJS = \
326
314
        builtin-add.o \
374
362
        builtin-show-branch.o \
375
363
        builtin-stripspace.o \
376
364
        builtin-symbolic-ref.o \
 
365
        builtin-tag.o \
377
366
        builtin-tar-tree.o \
378
367
        builtin-unpack-objects.o \
379
368
        builtin-update-index.o \
380
369
        builtin-update-ref.o \
381
370
        builtin-upload-archive.o \
382
371
        builtin-verify-pack.o \
 
372
        builtin-verify-tag.o \
383
373
        builtin-write-tree.o \
384
374
        builtin-show-ref.o \
385
375
        builtin-pack-refs.o
386
376
 
387
377
GITLIBS = $(LIB_FILE) $(XDIFF_LIB)
388
 
EXTLIBS = -lz
 
378
EXTLIBS =
389
379
 
390
380
#
391
381
# Platform specific tweaks
469
459
        NO_STRLCPY = YesPlease
470
460
        NEEDS_LIBICONV=YesPlease
471
461
endif
 
462
ifeq ($(uname_S),GNU)
 
463
        # GNU/Hurd
 
464
        NO_STRLCPY=YesPlease
 
465
endif
472
466
ifeq ($(uname_S),IRIX64)
473
467
        NO_IPV6=YesPlease
474
468
        NO_SETENV=YesPlease
512
506
 
513
507
ifndef NO_CURL
514
508
        ifdef CURLDIR
515
 
                # Try "-Wl,-rpath=$(CURLDIR)/lib" in such a case.
 
509
                # Try "-Wl,-rpath=$(CURLDIR)/$(lib)" in such a case.
516
510
                BASIC_CFLAGS += -I$(CURLDIR)/include
517
 
                CURL_LIBCURL = -L$(CURLDIR)/lib $(CC_LD_DYNPATH)$(CURLDIR)/lib -lcurl
 
511
                CURL_LIBCURL = -L$(CURLDIR)/$(lib) $(CC_LD_DYNPATH)$(CURLDIR)/$(lib) -lcurl
518
512
        else
519
513
                CURL_LIBCURL = -lcurl
520
514
        endif
530
524
        endif
531
525
endif
532
526
 
 
527
ifdef ZLIB_PATH
 
528
        BASIC_CFLAGS += -I$(ZLIB_PATH)/include
 
529
        EXTLIBS += -L$(ZLIB_PATH)/$(lib) $(CC_LD_DYNPATH)$(ZLIB_PATH)/$(lib)
 
530
endif
 
531
EXTLIBS += -lz
 
532
 
533
533
ifndef NO_OPENSSL
534
534
        OPENSSL_LIBSSL = -lssl
535
535
        ifdef OPENSSLDIR
536
536
                BASIC_CFLAGS += -I$(OPENSSLDIR)/include
537
 
                OPENSSL_LINK = -L$(OPENSSLDIR)/lib $(CC_LD_DYNPATH)$(OPENSSLDIR)/lib
 
537
                OPENSSL_LINK = -L$(OPENSSLDIR)/$(lib) $(CC_LD_DYNPATH)$(OPENSSLDIR)/$(lib)
538
538
        else
539
539
                OPENSSL_LINK =
540
540
        endif
551
551
ifdef NEEDS_LIBICONV
552
552
        ifdef ICONVDIR
553
553
                BASIC_CFLAGS += -I$(ICONVDIR)/include
554
 
                ICONV_LINK = -L$(ICONVDIR)/lib $(CC_LD_DYNPATH)$(ICONVDIR)/lib
 
554
                ICONV_LINK = -L$(ICONVDIR)/$(lib) $(CC_LD_DYNPATH)$(ICONVDIR)/$(lib)
555
555
        else
556
556
                ICONV_LINK =
557
557
        endif
708
708
 
709
709
SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
710
710
PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH))
711
 
PYTHON_PATH_SQ = $(subst ','\'',$(PYTHON_PATH))
712
711
TCLTK_PATH_SQ = $(subst ','\'',$(TCLTK_PATH))
713
712
 
714
713
LIBS = $(GITLIBS) $(EXTLIBS)
727
726
 
728
727
all:: $(ALL_PROGRAMS) $(BUILT_INS) $(OTHER_PROGRAMS)
729
728
ifneq (,$X)
730
 
        $(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) git$X)), rm -f '$p';)
 
729
        $(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) git$X)), $(RM) '$p';)
731
730
endif
732
731
 
733
732
all::
741
740
        $(STRIP) $(STRIP_OPTS) $(PROGRAMS) git$X
742
741
 
743
742
gitk-wish: gitk GIT-GUI-VARS
744
 
        $(QUIET_GEN)rm -f $@ $@+ && \
 
743
        $(QUIET_GEN)$(RM) $@ $@+ && \
745
744
        sed -e '1,3s|^exec .* "$$0"|exec $(subst |,'\|',$(TCLTK_PATH_SQ)) "$$0"|' <gitk >$@+ && \
746
745
        chmod +x $@+ && \
747
746
        mv -f $@+ $@
748
747
 
749
 
git$X: git.c common-cmds.h $(BUILTIN_OBJS) $(GITLIBS) GIT-CFLAGS
750
 
        $(QUIET_LINK)$(CC) -DGIT_VERSION='"$(GIT_VERSION)"' \
751
 
                $(ALL_CFLAGS) -o $@ $(filter %.c,$^) \
 
748
git.o: git.c common-cmds.h GIT-CFLAGS
 
749
        $(QUIET_CC)$(CC) -DGIT_VERSION='"$(GIT_VERSION)"' \
 
750
                $(ALL_CFLAGS) -c $(filter %.c,$^)
 
751
 
 
752
git$X: git.o $(BUILTIN_OBJS) $(GITLIBS)
 
753
        $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ git.o \
752
754
                $(BUILTIN_OBJS) $(ALL_LDFLAGS) $(LIBS)
753
755
 
754
756
help.o: common-cmds.h
755
757
 
756
758
git-merge-subtree$X: git-merge-recursive$X
757
 
        $(QUIET_BUILT_IN)rm -f $@ && ln git-merge-recursive$X $@
 
759
        $(QUIET_BUILT_IN)$(RM) $@ && ln git-merge-recursive$X $@
758
760
 
759
761
$(BUILT_INS): git$X
760
 
        $(QUIET_BUILT_IN)rm -f $@ && ln git$X $@
 
762
        $(QUIET_BUILT_IN)$(RM) $@ && ln git$X $@
 
763
 
 
764
common-cmds.h: ./generate-cmdlist.sh
761
765
 
762
766
common-cmds.h: $(wildcard Documentation/git-*.txt)
763
767
        $(QUIET_GEN)./generate-cmdlist.sh > $@+ && mv $@+ $@
764
768
 
765
769
$(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh
766
 
        $(QUIET_GEN)rm -f $@ $@+ && \
 
770
        $(QUIET_GEN)$(RM) $@ $@+ && \
767
771
        sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
768
772
            -e 's|@@PERL@@|$(PERL_PATH_SQ)|g' \
769
773
            -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
774
778
 
775
779
$(patsubst %.perl,%,$(SCRIPT_PERL)): perl/perl.mak
776
780
 
777
 
$(patsubst %.py,%,$(SCRIPT_PYTHON)) : % : %.py
778
 
        rm -f $@ $@+
779
 
        sed -e '1s|#!.*/python|#!$(PYTHON_PATH_SQ)|' \
780
 
            -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
781
 
            -e 's/@@NO_CURL@@/$(NO_CURL)/g' \
782
 
            $@.py >$@+
783
 
        chmod +x $@+
784
 
        mv $@+ $@
785
 
 
786
781
perl/perl.mak: GIT-CFLAGS
787
782
        $(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' $(@F)
788
783
 
789
784
$(patsubst %.perl,%,$(SCRIPT_PERL)): % : %.perl
790
 
        $(QUIET_GEN)rm -f $@ $@+ && \
791
 
        INSTLIBDIR=`$(MAKE) -C perl -s --no-print-directory instlibdir` && \
 
785
        $(QUIET_GEN)$(RM) $@ $@+ && \
 
786
        INSTLIBDIR=`MAKEFLAGS= $(MAKE) -C perl -s --no-print-directory instlibdir` && \
792
787
        sed -e '1{' \
793
788
            -e '        s|#!.*perl|#!$(PERL_PATH_SQ)|' \
794
789
            -e '        h' \
806
801
        $(QUIET_GEN)cp $< $@+ && mv $@+ $@
807
802
 
808
803
gitweb/gitweb.cgi: gitweb/gitweb.perl
809
 
        $(QUIET_GEN)rm -f $@ $@+ && \
 
804
        $(QUIET_GEN)$(RM) $@ $@+ && \
810
805
        sed -e '1s|#!.*perl|#!$(PERL_PATH_SQ)|' \
811
806
            -e 's|++GIT_VERSION++|$(GIT_VERSION)|g' \
812
807
            -e 's|++GIT_BINDIR++|$(bindir)|g' \
829
824
        mv $@+ $@
830
825
 
831
826
git-instaweb: git-instaweb.sh gitweb/gitweb.cgi gitweb/gitweb.css
832
 
        $(QUIET_GEN)rm -f $@ $@+ && \
 
827
        $(QUIET_GEN)$(RM) $@ $@+ && \
833
828
        sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
834
829
            -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
835
830
            -e 's/@@NO_CURL@@/$(NO_CURL)/g' \
842
837
        mv $@+ $@
843
838
 
844
839
configure: configure.ac
845
 
        $(QUIET_GEN)rm -f $@ $<+ && \
 
840
        $(QUIET_GEN)$(RM) $@ $<+ && \
846
841
        sed -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
847
842
            $< > $<+ && \
848
843
        autoconf -o $@ $<+ && \
849
 
        rm -f $<+
 
844
        $(RM) $<+
850
845
 
851
846
# These can record GIT_VERSION
852
 
git$X git.spec \
 
847
git.o git.spec \
853
848
        $(patsubst %.sh,%,$(SCRIPT_SH)) \
854
849
        $(patsubst %.perl,%,$(SCRIPT_PERL)) \
855
850
        : GIT-VERSION-FILE
856
851
 
857
852
%.o: %.c GIT-CFLAGS
858
853
        $(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) $<
 
854
%.s: %.c GIT-CFLAGS
 
855
        $(QUIET_CC)$(CC) -S $(ALL_CFLAGS) $<
859
856
%.o: %.S
860
857
        $(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) $<
861
858
 
899
896
$(DIFF_OBJS): diffcore.h
900
897
 
901
898
$(LIB_FILE): $(LIB_OBJS)
902
 
        $(QUIET_AR)rm -f $@ && $(AR) rcs $@ $(LIB_OBJS)
 
899
        $(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(LIB_OBJS)
903
900
 
904
901
XDIFF_OBJS=xdiff/xdiffi.o xdiff/xprepare.o xdiff/xutils.o xdiff/xemit.o \
905
902
        xdiff/xmerge.o
907
904
        xdiff/xutils.h xdiff/xprepare.h xdiff/xdiffi.h xdiff/xemit.h
908
905
 
909
906
$(XDIFF_LIB): $(XDIFF_OBJS)
910
 
        $(QUIET_AR)rm -f $@ && $(AR) rcs $@ $(XDIFF_OBJS)
 
907
        $(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(XDIFF_OBJS)
911
908
 
912
909
 
913
910
perl/Makefile: perl/Git.pm perl/Makefile.PL GIT-CFLAGS
917
914
doc:
918
915
        $(MAKE) -C Documentation all
919
916
 
 
917
info:
 
918
        $(MAKE) -C Documentation info
 
919
 
920
920
TAGS:
921
 
        rm -f TAGS
922
 
        find . -name '*.[hcS]' -print | xargs etags -a
 
921
        $(RM) TAGS
 
922
        $(FIND) . -name '*.[hcS]' -print | xargs etags -a
923
923
 
924
924
tags:
925
 
        rm -f tags
926
 
        find . -name '*.[hcS]' -print | xargs ctags -a
 
925
        $(RM) tags
 
926
        $(FIND) . -name '*.[hcS]' -print | xargs ctags -a
927
927
 
928
928
### Detect prefix changes
929
929
TRACK_CFLAGS = $(subst ','\'',$(ALL_CFLAGS)):\
952
952
 
953
953
### Testing rules
954
954
 
955
 
TEST_PROGRAMS = test-chmtime$X test-genrandom$X
 
955
TEST_PROGRAMS = test-chmtime$X test-genrandom$X test-date$X test-delta$X test-sha1$X test-match-trees$X test-absolute-path$X
956
956
 
957
957
all:: $(TEST_PROGRAMS)
958
958
 
965
965
test: all
966
966
        $(MAKE) -C t/ all
967
967
 
968
 
test-date$X: test-date.c date.o ctype.o
969
 
        $(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) test-date.c date.o ctype.o
970
 
 
971
 
test-delta$X: test-delta.o diff-delta.o patch-delta.o $(GITLIBS)
972
 
        $(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)
973
 
 
974
 
test-dump-cache-tree$X: dump-cache-tree.o $(GITLIBS)
975
 
        $(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)
976
 
 
977
 
test-sha1$X: test-sha1.o $(GITLIBS)
978
 
        $(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)
979
 
 
980
 
test-match-trees$X: test-match-trees.o $(GITLIBS)
981
 
        $(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)
982
 
 
983
 
test-chmtime$X: test-chmtime.c
984
 
        $(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $<
985
 
 
986
 
test-genrandom$X: test-genrandom.c
987
 
        $(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $<
 
968
test-date$X: date.o ctype.o
 
969
 
 
970
test-delta$X: diff-delta.o patch-delta.o
 
971
 
 
972
.PRECIOUS: $(patsubst test-%$X,test-%.o,$(TEST_PROGRAMS))
 
973
 
 
974
test-%$X: test-%.o $(GITLIBS)
 
975
        $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)
988
976
 
989
977
check-sha1:: test-sha1$X
990
978
        ./test-sha1.sh
992
980
check: common-cmds.h
993
981
        for i in *.c; do sparse $(ALL_CFLAGS) $(SPARSE_FLAGS) $$i || exit; done
994
982
 
995
 
 
 
983
remove-dashes:
 
984
        ./fixup-builtins $(BUILT_INS)
996
985
 
997
986
### Installation rules
998
987
 
1014
1003
                cp '$(DESTDIR_SQ)$(bindir_SQ)/git$X' \
1015
1004
                        '$(DESTDIR_SQ)$(gitexecdir_SQ)/git$X'; \
1016
1005
        fi
1017
 
        $(foreach p,$(BUILT_INS), rm -f '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' && ln '$(DESTDIR_SQ)$(gitexecdir_SQ)/git$X' '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' ;)
 
1006
        $(foreach p,$(BUILT_INS), $(RM) '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' && ln '$(DESTDIR_SQ)$(gitexecdir_SQ)/git$X' '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' ;)
1018
1007
ifneq (,$X)
1019
 
        $(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) git$X)), rm -f '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p';)
 
1008
        $(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) git$X)), $(RM) '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p';)
1020
1009
endif
1021
1010
 
1022
1011
install-doc:
1023
1012
        $(MAKE) -C Documentation install
1024
1013
 
 
1014
install-info:
 
1015
        $(MAKE) -C Documentation install-info
 
1016
 
1025
1017
quick-install-doc:
1026
1018
        $(MAKE) -C Documentation quick-install
1027
1019
 
1034
1026
        mv $@+ $@
1035
1027
 
1036
1028
GIT_TARNAME=git-$(GIT_VERSION)
1037
 
dist: git.spec git-archive
 
1029
dist: git.spec git-archive configure
1038
1030
        ./git-archive --format=tar \
1039
1031
                --prefix=$(GIT_TARNAME)/ HEAD^{tree} > $(GIT_TARNAME).tar
1040
1032
        @mkdir -p $(GIT_TARNAME)
1041
 
        @cp git.spec $(GIT_TARNAME)
 
1033
        @cp git.spec configure $(GIT_TARNAME)
1042
1034
        @echo $(GIT_VERSION) > $(GIT_TARNAME)/version
1043
1035
        @$(MAKE) -C git-gui TARDIR=../$(GIT_TARNAME)/git-gui dist-version
1044
1036
        $(TAR) rf $(GIT_TARNAME).tar \
1045
1037
                $(GIT_TARNAME)/git.spec \
 
1038
                $(GIT_TARNAME)/configure \
1046
1039
                $(GIT_TARNAME)/version \
1047
1040
                $(GIT_TARNAME)/git-gui/version
1048
 
        @rm -rf $(GIT_TARNAME)
 
1041
        @$(RM) -r $(GIT_TARNAME)
1049
1042
        gzip -f -9 $(GIT_TARNAME).tar
1050
1043
 
1051
1044
rpm: dist
1054
1047
htmldocs = git-htmldocs-$(GIT_VERSION)
1055
1048
manpages = git-manpages-$(GIT_VERSION)
1056
1049
dist-doc:
1057
 
        rm -fr .doc-tmp-dir
 
1050
        $(RM) -r .doc-tmp-dir
1058
1051
        mkdir .doc-tmp-dir
1059
1052
        $(MAKE) -C Documentation WEBDOC_DEST=../.doc-tmp-dir install-webdoc
1060
1053
        cd .doc-tmp-dir && $(TAR) cf ../$(htmldocs).tar .
1061
1054
        gzip -n -9 -f $(htmldocs).tar
1062
1055
        :
1063
 
        rm -fr .doc-tmp-dir
 
1056
        $(RM) -r .doc-tmp-dir
1064
1057
        mkdir -p .doc-tmp-dir/man1 .doc-tmp-dir/man5 .doc-tmp-dir/man7
1065
1058
        $(MAKE) -C Documentation DESTDIR=./ \
1066
1059
                man1dir=../.doc-tmp-dir/man1 \
1069
1062
                install
1070
1063
        cd .doc-tmp-dir && $(TAR) cf ../$(manpages).tar .
1071
1064
        gzip -n -9 -f $(manpages).tar
1072
 
        rm -fr .doc-tmp-dir
 
1065
        $(RM) -r .doc-tmp-dir
1073
1066
 
1074
1067
### Cleaning rules
1075
1068
 
1076
1069
clean:
1077
 
        rm -f *.o mozilla-sha1/*.o arm/*.o ppc/*.o compat/*.o xdiff/*.o \
1078
 
                test-chmtime$X test-genrandom$X $(LIB_FILE) $(XDIFF_LIB)
1079
 
        rm -f $(ALL_PROGRAMS) $(BUILT_INS) git$X
1080
 
        rm -f *.spec *.pyc *.pyo */*.pyc */*.pyo common-cmds.h TAGS tags
1081
 
        rm -rf autom4te.cache
1082
 
        rm -f configure config.log config.mak.autogen config.mak.append config.status config.cache
1083
 
        rm -rf $(GIT_TARNAME) .doc-tmp-dir
1084
 
        rm -f $(GIT_TARNAME).tar.gz git-core_$(GIT_VERSION)-*.tar.gz
1085
 
        rm -f $(htmldocs).tar.gz $(manpages).tar.gz
1086
 
        rm -f gitweb/gitweb.cgi
 
1070
        $(RM) *.o mozilla-sha1/*.o arm/*.o ppc/*.o compat/*.o xdiff/*.o \
 
1071
                $(LIB_FILE) $(XDIFF_LIB)
 
1072
        $(RM) $(ALL_PROGRAMS) $(BUILT_INS) git$X
 
1073
        $(RM) $(TEST_PROGRAMS)
 
1074
        $(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo common-cmds.h TAGS tags
 
1075
        $(RM) -r autom4te.cache
 
1076
        $(RM) configure config.log config.mak.autogen config.mak.append config.status config.cache
 
1077
        $(RM) -r $(GIT_TARNAME) .doc-tmp-dir
 
1078
        $(RM) $(GIT_TARNAME).tar.gz git-core_$(GIT_VERSION)-*.tar.gz
 
1079
        $(RM) $(htmldocs).tar.gz $(manpages).tar.gz
 
1080
        $(RM) gitweb/gitweb.cgi
1087
1081
        $(MAKE) -C Documentation/ clean
1088
1082
        $(MAKE) -C perl clean
1089
1083
        $(MAKE) -C templates/ clean
1090
1084
        $(MAKE) -C t/ clean
1091
1085
ifndef NO_TCLTK
1092
 
        rm -f gitk-wish
 
1086
        $(RM) gitk-wish
1093
1087
        $(MAKE) -C git-gui clean
1094
1088
endif
1095
 
        rm -f GIT-VERSION-FILE GIT-CFLAGS GIT-GUI-VARS
 
1089
        $(RM) GIT-VERSION-FILE GIT-CFLAGS GIT-GUI-VARS
1096
1090
 
1097
1091
.PHONY: all install clean strip
1098
1092
.PHONY: .FORCE-GIT-VERSION-FILE TAGS tags .FORCE-GIT-CFLAGS