Two dist-check related changes:
authorReid Spencer <rspencer@reidspencer.com>
Tue, 24 May 2005 02:33:20 +0000 (02:33 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Tue, 24 May 2005 02:33:20 +0000 (02:33 +0000)
1. Allow DIST_CHECK_CONFIG_OPTION to specify a set of options to be passed
   to the configure script during the dist-check target. This allows things
   to be passed down on a project basis so the configure doesn't fail.

2. Use the tar | (cd ; tar ) idiom to copy files which is more flexible
   than using the cp command. THis allows us to exclude CVS .svn
   directories at source rather than stripping them out of the tar ball.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22166 91177308-0d34-0410-b5e6-96231b3b80d8

Makefile
Makefile.rules

index e9cbc789ced47843fec5283b483579fab0595d63..d221175a98b5b84967ac4f971105bc8c5ceb4d92 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -18,6 +18,10 @@ EXTRA_DIST := test llvm.spec include
 
 include $(LEVEL)/Makefile.common
 
+# Specify options to pass to configure script when we're
+# running the dist-check target
+DIST_CHECK_CONFIG_OPTIONS = --with-llvmgccdir=$(LLVMGCCDIR)
+
 .PHONY: debug-opt-prof
 debug-opt-prof:
        $(Echo) Building Debug Version
index c130368b7539069f061b65439c9b2b2b854e828f..ae4e65247fb9827f19adb246f05efade8fe0f99c 100644 (file)
@@ -1366,7 +1366,7 @@ dist-check:: $(DistTarGZip)
          gunzip -c $(DistTarGZip) | $(TAR) xf - && \
          cd build && \
          ../$(DistName)/configure --prefix="$(DistCheckDir)/install" \
-           --srcdir=../$(DistName) && \
+           --srcdir=../$(DistName) $(DIST_CHECK_CONFIG_OPTIONS) && \
          $(MAKE) all && \
          $(MAKE) check && \
          $(MAKE) install && \
@@ -1432,9 +1432,16 @@ $(DistDir)/.makedistdir: $(DistSources)
          if test -d "$$from_dir/$$file"; then \
            if test -d "$(PROJ_SRC_DIR)/$$file" && \
               test "$$from_dir" != "$(PROJ_SRC_DIR)" ; then \
-             $(CP) -pR "$(PROJ_SRC_DIR)/$$file" "$$to_dir" || exit 1; \
+              cd $(PROJ_SRC_DIR) ; \
+              $(TAR) cf - $$file --exclude .svn --exclude CVS | \
+                ( cd $$to_dir ; $(TAR) xf - ) ; \
+              cd $(PROJ_OBJ_DIR) ; \
+           else \
+              cd $$from_dir ; \
+              $(TAR) cf - $$file --exclude .svn --exclude CVS | \
+                ( cd $$to_dir ; $(TAR) xf - ) ; \
+              cd $(PROJ_OBJ_DIR) ; \
            fi; \
-           $(CP) -pR $$from_dir/$$file $$to_dir || exit 1; \
          elif test -f "$$from_dir/$$file" ; then \
            $(CP) -p "$$from_dir/$$file" "$(DistDir)/$$file" || exit 1; \
          elif test -L "$$from_dir/$$file" ; then \
@@ -1455,8 +1462,8 @@ $(DistDir)/.makedistdir: $(DistSources)
          fi; \
        done
        $(Verb) if test "$(DistDir)" = "$(TopDistDir)" ; then \
-         $(EchoCmd) Eliminating CVS directories from distribution ; \
-         $(RM) -rf `find $(TopDistDir) -type d -name CVS -print` ;\
+         $(EchoCmd) Eliminating CVS/.svn directories from distribution ; \
+         $(RM) -rf `find $(TopDistDir) -type d \( -name CVS -o -name .svn \) -print` ;\
          $(MAKE) dist-hook ; \
          $(FIND) $(TopDistDir) -type d ! -perm -777 -exec chmod a+rwx {} \; \
            -o ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; \