From c17ecc6134b5126f45b3fdd8072b732a87c249fa Mon Sep 17 00:00:00 2001 From: bangerth Date: Thu, 15 Apr 2010 15:21:15 +0000 Subject: [PATCH] Compile .cc files using their full path on the command line. This makes it simpler for debuggers and other tools like valgrind to find the sources. git-svn-id: https://svn.dealii.org/trunk@20992 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/base/Makefile | 4 ++-- deal.II/deal.II/Makefile | 9 +++++---- deal.II/doc/news/changes.h | 13 ++++++++++++- deal.II/lac/Makefile | 4 ++-- 4 files changed, 21 insertions(+), 9 deletions(-) diff --git a/deal.II/base/Makefile b/deal.II/base/Makefile index 1d4b54bede..fc7a0f8060 100644 --- a/deal.II/base/Makefile +++ b/deal.II/base/Makefile @@ -8,8 +8,8 @@ D=.. # create lists of file names -cc-files = $(shell echo source/*.cc) -o-files-base = $(addprefix $(LIBDIR)/base/, $(patsubst source/%,%,$(cc-files:.cc=.$(OBJEXT)))) +cc-files = $(shell echo $D/base/source/*.cc) +o-files-base = $(addprefix $(LIBDIR)/base/, $(patsubst $D/base/source/%,%,$(cc-files:.cc=.$(OBJEXT)))) o-files = $(sort $(o-files-base)) go-files = $(o-files:.$(OBJEXT)=.g.$(OBJEXT)) h-files = $(sort $(shell echo include/base/*.h)) diff --git a/deal.II/deal.II/Makefile b/deal.II/deal.II/Makefile index 787f1b98a2..1792e6b881 100644 --- a/deal.II/deal.II/Makefile +++ b/deal.II/deal.II/Makefile @@ -26,8 +26,8 @@ debug: 2dg 3dg 1dg # create lists of file names. compile vectors.cc first because it is # one of the files that takes the longest -cc-files = source/numerics/vectors.cc \ - $(filter-out source/numerics/vectors.cc, $(shell echo source/*/*.cc)) +cc-files = $D/deal.II/source/numerics/vectors.cc \ + $(filter-out $D/deal.II/source/numerics/vectors.cc, $(shell echo $D/deal.II/source/*/*.cc)) h-files = $(sort $(shell echo include/*/*.h)) inst-in-files= $(shell echo source/*/*.inst.in) @@ -36,7 +36,7 @@ inst-files = $(inst-in-files:%.in=%) # replace subdirectories in cc file names by a prefix, preprend a "lib/[g]o" # and change the suffix -tmp1 = $(shell echo $(cc-files) | $(PERL) -pi -e 's,source/,,g; s,/,_,g;') +tmp1 = $(shell echo $(cc-files) | $(PERL) -pi -e 's,$D/deal.II/source/,,g; s,/,_,g;') o-files-1d = $(addprefix $(LIBDIR)/1d/, $(tmp1:.cc=_1d.$(OBJEXT)) ) go-files-1d = $(addprefix $(LIBDIR)/1d/, $(tmp1:.cc=_1d.g.$(OBJEXT))) o-files-2d = $(addprefix $(LIBDIR)/2d/, $(tmp1:.cc=_2d.$(OBJEXT)) ) @@ -201,7 +201,8 @@ Makefile.dep: $(cc-files) $(h-files) \ $(inst-files) \ Makefile $D/common/Make.global_options @echo "===================================== Remaking deal.II/Makefile" - @(for dir in dofs fe grid hp multigrid numerics ; do $D/common/scripts/make_dependencies $(INCLUDE) "-B\$$(LIBDIR)" `echo source/$$dir/*cc` \ + @(for dir in dofs fe grid hp multigrid numerics ; do \ + $D/common/scripts/make_dependencies $(INCLUDE) "-B\$$(LIBDIR)" `echo $D/deal.II/source/$$dir/*cc` \ | $(PERL) -p -e 's!LIBDIR\)/(.*):!LIBDIR)/DIM_PLACEHOLDER/$$1:!g;' \ | $(PERL) -pe 's!((\.g)?.$(OBJEXT)):!_DIM_PLACEHOLDER$$1:!g;' \ | $(PERL) -pe 's!^(.*)/DIM_PLACEHOLDER/(.*)_DIM_PLACEHOLDER(\..*):!$$1/1d/DIRPLACEHOLDER_$$2_1d$$3 $$1/2d/DIRPLACEHOLDER_$$2_2d$$3 $$1/3d/DIRPLACEHOLDER_$$2_3d$$3:!g;'\ diff --git a/deal.II/doc/news/changes.h b/deal.II/doc/news/changes.h index cac052f26e..6920ed2b82 100644 --- a/deal.II/doc/news/changes.h +++ b/deal.II/doc/news/changes.h @@ -81,6 +81,17 @@ inconvenience this causes.

General

    +
  1. +

    + Improved: We now compile all files with their full path name on the command + line. This makes it simpler for tools like debuggers or profilers (e.g. + valgrind) to find the source files that corresponds to an executable. +
    + (WB 2010/04/15) +

    +
  2. + +
  3. Improved: @@ -604,7 +615,7 @@ inconvenience this causes.
    (GK 2010/03/25)

  4. - +
  5. New: The function DoFRenumbering::downstream has now an additional bool diff --git a/deal.II/lac/Makefile b/deal.II/lac/Makefile index 8d1d0eeeae..28817a2fe5 100644 --- a/deal.II/lac/Makefile +++ b/deal.II/lac/Makefile @@ -10,8 +10,8 @@ include $D/common/Make.global_options # create lists of file names -cc-files = $(shell echo source/*.cc) -o-files-base = $(sort $(addprefix $(LIBDIR)/lac/, $(patsubst source/%,%,$(cc-files:.cc=.$(OBJEXT))))) +cc-files = $(shell echo $D/lac/source/*.cc) +o-files-base = $(sort $(addprefix $(LIBDIR)/lac/, $(patsubst $D/lac/source/%,%,$(cc-files:.cc=.$(OBJEXT))))) o-files = $(o-files-base) go-files = $(o-files-base:.$(OBJEXT)=.g.$(OBJEXT)) h-files = $(sort $(shell echo include/lac/*.h)) -- 2.39.5