Skip to content
Makefile.rules 37.1 KiB
Newer Older
Reid Spencer's avatar
Reid Spencer committed
	  elif echo "$(DistAlways)" | grep -v "$$file" >/dev/null ; then \
	    $(ECHO) "===== WARNING: Distribution Source $$from_dir/$$file Not Found!" ; \
	  elif test "$(VERB)" != '@' ; then \
	    $(ECHO) "Skipping non-existent $$from_dir/$$file" ; \
	  fi; \
	done
	$(VERB) for subdir in $(DistSubDirs) ; do \
Reid Spencer's avatar
Reid Spencer committed
	  if test "$$subdir" \!= "." ; then \
	    new_distdir="$(DistDir)/$$subdir" ; \
	    test -d "$$new_distdir" || $(MKDIR) "$$new_distdir" || exit 1; \
	    ( cd $$subdir && $(MAKE) DistDir="$$new_distdir" distdir ) || exit 1; \
Reid Spencer's avatar
Reid Spencer committed
	  fi; \
	done
	$(VERB) $(MAKE) DistDir="$(DistDir)" dist-hook || exit 1
Reid Spencer's avatar
Reid Spencer committed
	-$(VERB) find $(DistDir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
	  ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
	  ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
	  ! -type d ! -perm -444 -exec $(SHELL) $(INSTALL_SH) -c -m a+r {} {} \; \
	|| chmod -R a+r $(DistDir)

dist-hook::


endif

###############################################################################
# TOP LEVEL - targets only to apply at the top level directory
###############################################################################

ifeq ($(LEVEL),.)
Reid Spencer's avatar
Reid Spencer committed

#------------------------------------------------------------------------
# Install support for project's include files:
#------------------------------------------------------------------------
install-local::
	@$(ECHO) Installing include files
	$(VERB) $(MKDIR) $(includedir)
	$(VERB) if [ -d "$(BUILD_SRC_ROOT)/include" ] ; then \
	  cd $(BUILD_SRC_ROOT)/include && \
	    find . -path '*/Internal' -prune -o '(' -type f \
	      '!' '(' -name '*~' -o -name '.cvsignore' -o -name '.#*' ')' \
	      -print ')' | grep -v CVS | pax -rwdvpe $(includedir) ; \
	fi

uninstall-local::
	@$(ECHO) Uninstalling include files
	$(VERB) if [ -d "$(BUILD_SRC_ROOT)/include" ] ; then \
	  cd $(BUILD_SRC_ROOT)/include && \
	    $(RM) -f `find . -path '*/Internal' -prune -o '(' -type f \
	      '!' '(' -name '*~' -o -name '.cvsignore' -o -name '.#*' ')' \
	      -print ')' | grep -v CVS | sed 's#^#$(includedir)/#'` ; \
	fi 

#------------------------------------------------------------------------
# Build tags database for Emacs/Xemacs:
#------------------------------------------------------------------------
Reid Spencer's avatar
Reid Spencer committed
tags:: TAGS
Reid Spencer's avatar
Reid Spencer committed
TAGS: 
Reid Spencer's avatar
Reid Spencer committed
	find include lib tools examples -name '*.cpp' -o -name '*.h' | $(ETAGS) $(ETAGSFLAGS) -

endif

###############################################################################
# MISCELLANEOUS - utility targets
###############################################################################

#------------------------------------------------------------------------
# Print out the directories used for building
Reid Spencer's avatar
Reid Spencer committed
printvars::
	@$(ECHO) "CONFIGURATION  : " '$(CONFIGURATION)'
	@$(ECHO) "BUILD_SRC_ROOT : " '$(BUILD_SRC_ROOT)'
	@$(ECHO) "BUILD_SRC_DIR  : " '$(BUILD_SRC_DIR)'
	@$(ECHO) "BUILD_OBJ_ROOT : " '$(BUILD_OBJ_ROOT)'
	@$(ECHO) "BUILD_OBJ_DIR  : " '$(BUILD_OBJ_DIR)'
	@$(ECHO) "LLVM_SRC_ROOT  : " '$(LLVM_SRC_ROOT)'
	@$(ECHO) "LLVM_OBJ_ROOT  : " '$(LLVM_OBJ_ROOT)'
	@$(ECHO) "libdir         : " '$(libdir)'
	@$(ECHO) "bindir         : " '$(bindir)'
	@$(ECHO) "sysconfdir     : " '$(sysconfdir)'
	@$(ECHO) "bytecode_libdir: " '$(bytecode_libdir)'
	@$(ECHO) "USER_TARGETS   : " '$(USER_TARGETS)'
	@$(ECHO) "OBJMKFILES     : " '$(OBJMKFILES)'
	@$(ECHO) "SRCMKFILES     : " '$(SRCMKFILES)'
	@$(ECHO) "OBJDIR         : " '$(OBJDIR)'
	@$(ECHO) "LIBDIR         : " '$(LIBDIR)'
	@$(ECHO) "TOOLDIR        : " '$(TOOLDIR)'
	@$(ECHO) "TDFILES        : " '$(TDFILES)'
	@$(ECHO) "Compile.CXX    : " '$(Compile.CXX)'
	@$(ECHO) "Compile.C      : " '$(Compile.C)'
	@$(ECHO) "Archive        : " '$(Archive)'