From 061bbdc7218c9abc12b4a6254e39751bd3062595 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Thu, 7 Oct 2004 01:08:06 +0000 Subject: [PATCH] Blow away Makefile.dep if it was created but is empty. This usually indicates a problem with running make_dependencies, but it only shows up by very distracting follow-up problems. git-svn-id: https://svn.dealii.org/trunk@9691 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/base/Makefile | 16 +++++++++++----- deal.II/deal.II/Makefile | 16 +++++++++++----- deal.II/examples/step-1/Makefile | 6 ++++++ deal.II/examples/step-10/Makefile | 6 ++++++ deal.II/examples/step-11/Makefile | 6 ++++++ deal.II/examples/step-12/Makefile | 6 ++++++ deal.II/examples/step-13/Makefile | 6 ++++++ deal.II/examples/step-14/Makefile | 6 ++++++ deal.II/examples/step-15/Makefile | 6 ++++++ deal.II/examples/step-16/Makefile | 6 ++++++ deal.II/examples/step-17/Makefile | 6 ++++++ deal.II/examples/step-2/Makefile | 6 ++++++ deal.II/examples/step-3/Makefile | 6 ++++++ deal.II/examples/step-4/Makefile | 6 ++++++ deal.II/examples/step-5/Makefile | 6 ++++++ deal.II/examples/step-6/Makefile | 6 ++++++ deal.II/examples/step-7/Makefile | 6 ++++++ deal.II/examples/step-8/Makefile | 6 ++++++ deal.II/examples/step-9/Makefile | 6 ++++++ deal.II/lac/Makefile | 16 +++++++++++----- 20 files changed, 135 insertions(+), 15 deletions(-) diff --git a/deal.II/base/Makefile b/deal.II/base/Makefile index e49356fd6d..d3e979d628 100644 --- a/deal.II/base/Makefile +++ b/deal.II/base/Makefile @@ -70,15 +70,21 @@ clean: -rm -f *~ include/*~ include/*/*~ Makefile.dep -#Rule to generate the dependency file. This file is -#automagically remade whenever needed, i.e. whenever -#one of the cc-/h-files changed. Make detects whether -#to remake this file upon inclusion at the bottom -#of this file. +# Rule to generate the dependency file. This file is +# automagically remade whenever needed, i.e. whenever +# one of the cc-/h-files changed. Make detects whether +# to remake this file upon inclusion at the bottom +# of this file. +# +# If the file should turn out to be empty, then blow it +# away to let make issue a proper error message rather than +# some obscure follow-up problems Makefile.dep: $(cc-files) $(h-files) Makefile $D/common/Make.global_options @echo ============================ Remaking base/Makefile @$D/common/scripts/make_dependencies $(INCLUDE) "-B$(LIBDIR)/base" $(cc-files) \ > Makefile.dep + @if test -s $@ ; then : else rm $@ ; fi + # include all the dependencies diff --git a/deal.II/deal.II/Makefile b/deal.II/deal.II/Makefile index e1d8ad4e76..4323b974b5 100644 --- a/deal.II/deal.II/Makefile +++ b/deal.II/deal.II/Makefile @@ -162,11 +162,15 @@ $(LIBDIR)/libdeal_II_3d.so: $(o-files-3d) -#Rule to generate the dependency file. This file is -#automagically remade whenever needed, i.e. whenever -#one of the cc-/h-files changed. Make detects whether -#to remake this file upon inclusion at the bottom -#of this file. +# Rule to generate the dependency file. This file is +# automagically remade whenever needed, i.e. whenever +# one of the cc-/h-files changed. Make detects whether +# to remake this file upon inclusion at the bottom +# of this file. +# +# If the file should turn out to be empty, then blow it +# away to let make issue a proper error message rather than +# some obscure follow-up problems Makefile.dep: $(cc-files) $(h-files) Makefile $D/common/Make.global_options @echo "============================ Remaking deal.II/Makefile" @$D/common/scripts/make_dependencies $(INCLUDE) "-B\$$(LIBDIR)" $(cc-files) \ @@ -174,6 +178,8 @@ Makefile.dep: $(cc-files) $(h-files) Makefile $D/common/Make.global_options | $(PERL) -pe 's!((\.g)?.$(OBJEXT)):!_DIM_PLACEHOLDER$$1:!g;' \ | $(PERL) -pe 's!^(.*)/DIM_PLACEHOLDER/(.*)_DIM_PLACEHOLDER(\..*):!$$1/1d/$$2_1d$$3 $$1/2d/$$2_2d$$3 $$1/3d/$$2_3d$$3:!g;'\ > Makefile.dep + @if test -s $@ ; then : else rm $@ ; fi + # include all the dependencies include Makefile.dep diff --git a/deal.II/examples/step-1/Makefile b/deal.II/examples/step-1/Makefile index 8154cc6545..910356c898 100644 --- a/deal.II/examples/step-1/Makefile +++ b/deal.II/examples/step-1/Makefile @@ -136,11 +136,17 @@ clean: # the executable. This file is automagically remade whenever needed, # i.e. whenever one of the cc-/h-files changed. Make detects whether # to remake this file upon inclusion at the bottom of this file. +# +# If the file should turn out to be empty, then blow it +# away to let make issue a proper error message rather than +# some obscure follow-up problems Makefile.dep: $(target).cc Makefile \ $(shell echo $D/*/include/*/*.h) @echo ============================ Remaking $@ @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \ > Makefile.dep + @if test -s $@ ; then : else rm $@ ; fi + # To make the dependencies known to `make', we finally have to include # them: diff --git a/deal.II/examples/step-10/Makefile b/deal.II/examples/step-10/Makefile index b539fcc427..8350f94975 100644 --- a/deal.II/examples/step-10/Makefile +++ b/deal.II/examples/step-10/Makefile @@ -136,11 +136,17 @@ clean: # the executable. This file is automagically remade whenever needed, # i.e. whenever one of the cc-/h-files changed. Make detects whether # to remake this file upon inclusion at the bottom of this file. +# +# If the file should turn out to be empty, then blow it +# away to let make issue a proper error message rather than +# some obscure follow-up problems Makefile.dep: $(target).cc Makefile \ $(shell echo $D/*/include/*/*.h) @echo ============================ Remaking $@ @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \ > Makefile.dep + @if test -s $@ ; then : else rm $@ ; fi + # To make the dependencies known to `make', we finally have to include # them: diff --git a/deal.II/examples/step-11/Makefile b/deal.II/examples/step-11/Makefile index 8154cc6545..910356c898 100644 --- a/deal.II/examples/step-11/Makefile +++ b/deal.II/examples/step-11/Makefile @@ -136,11 +136,17 @@ clean: # the executable. This file is automagically remade whenever needed, # i.e. whenever one of the cc-/h-files changed. Make detects whether # to remake this file upon inclusion at the bottom of this file. +# +# If the file should turn out to be empty, then blow it +# away to let make issue a proper error message rather than +# some obscure follow-up problems Makefile.dep: $(target).cc Makefile \ $(shell echo $D/*/include/*/*.h) @echo ============================ Remaking $@ @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \ > Makefile.dep + @if test -s $@ ; then : else rm $@ ; fi + # To make the dependencies known to `make', we finally have to include # them: diff --git a/deal.II/examples/step-12/Makefile b/deal.II/examples/step-12/Makefile index 8154cc6545..910356c898 100644 --- a/deal.II/examples/step-12/Makefile +++ b/deal.II/examples/step-12/Makefile @@ -136,11 +136,17 @@ clean: # the executable. This file is automagically remade whenever needed, # i.e. whenever one of the cc-/h-files changed. Make detects whether # to remake this file upon inclusion at the bottom of this file. +# +# If the file should turn out to be empty, then blow it +# away to let make issue a proper error message rather than +# some obscure follow-up problems Makefile.dep: $(target).cc Makefile \ $(shell echo $D/*/include/*/*.h) @echo ============================ Remaking $@ @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \ > Makefile.dep + @if test -s $@ ; then : else rm $@ ; fi + # To make the dependencies known to `make', we finally have to include # them: diff --git a/deal.II/examples/step-13/Makefile b/deal.II/examples/step-13/Makefile index 8154cc6545..910356c898 100644 --- a/deal.II/examples/step-13/Makefile +++ b/deal.II/examples/step-13/Makefile @@ -136,11 +136,17 @@ clean: # the executable. This file is automagically remade whenever needed, # i.e. whenever one of the cc-/h-files changed. Make detects whether # to remake this file upon inclusion at the bottom of this file. +# +# If the file should turn out to be empty, then blow it +# away to let make issue a proper error message rather than +# some obscure follow-up problems Makefile.dep: $(target).cc Makefile \ $(shell echo $D/*/include/*/*.h) @echo ============================ Remaking $@ @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \ > Makefile.dep + @if test -s $@ ; then : else rm $@ ; fi + # To make the dependencies known to `make', we finally have to include # them: diff --git a/deal.II/examples/step-14/Makefile b/deal.II/examples/step-14/Makefile index 8154cc6545..910356c898 100644 --- a/deal.II/examples/step-14/Makefile +++ b/deal.II/examples/step-14/Makefile @@ -136,11 +136,17 @@ clean: # the executable. This file is automagically remade whenever needed, # i.e. whenever one of the cc-/h-files changed. Make detects whether # to remake this file upon inclusion at the bottom of this file. +# +# If the file should turn out to be empty, then blow it +# away to let make issue a proper error message rather than +# some obscure follow-up problems Makefile.dep: $(target).cc Makefile \ $(shell echo $D/*/include/*/*.h) @echo ============================ Remaking $@ @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \ > Makefile.dep + @if test -s $@ ; then : else rm $@ ; fi + # To make the dependencies known to `make', we finally have to include # them: diff --git a/deal.II/examples/step-15/Makefile b/deal.II/examples/step-15/Makefile index aebe1cd809..749b9276bf 100644 --- a/deal.II/examples/step-15/Makefile +++ b/deal.II/examples/step-15/Makefile @@ -136,11 +136,17 @@ clean: # the executable. This file is automagically remade whenever needed, # i.e. whenever one of the cc-/h-files changed. Make detects whether # to remake this file upon inclusion at the bottom of this file. +# +# If the file should turn out to be empty, then blow it +# away to let make issue a proper error message rather than +# some obscure follow-up problems Makefile.dep: $(target).cc Makefile \ $(shell echo $D/*/include/*/*.h) @echo ============================ Remaking $@ @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \ > Makefile.dep + @if test -s $@ ; then : else rm $@ ; fi + # To make the dependencies known to `make', we finally have to include # them: diff --git a/deal.II/examples/step-16/Makefile b/deal.II/examples/step-16/Makefile index 6038d092ad..fac1a71a83 100644 --- a/deal.II/examples/step-16/Makefile +++ b/deal.II/examples/step-16/Makefile @@ -135,11 +135,17 @@ clean: # the executable. This file is automagically remade whenever needed, # i.e. whenever one of the cc-/h-files changed. Make detects whether # to remake this file upon inclusion at the bottom of this file. +# +# If the file should turn out to be empty, then blow it +# away to let make issue a proper error message rather than +# some obscure follow-up problems Makefile.dep: $(target).cc Makefile \ $(shell echo $D/*/include/*/*.h) @echo ============================ Remaking $@ @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \ > Makefile.dep + @if test -s $@ ; then : else rm $@ ; fi + # To make the dependencies known to `make', we finally have to include # them: diff --git a/deal.II/examples/step-17/Makefile b/deal.II/examples/step-17/Makefile index 8a0690f41c..f74a8d921c 100644 --- a/deal.II/examples/step-17/Makefile +++ b/deal.II/examples/step-17/Makefile @@ -155,11 +155,17 @@ clean: # the executable. This file is automagically remade whenever needed, # i.e. whenever one of the cc-/h-files changed. Make detects whether # to remake this file upon inclusion at the bottom of this file. +# +# If the file should turn out to be empty, then blow it +# away to let make issue a proper error message rather than +# some obscure follow-up problems Makefile.dep: $(target).cc Makefile \ $(shell echo $D/*/include/*/*.h) @echo ============================ Remaking $@ @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \ > Makefile.dep + @if test -s $@ ; then : else rm $@ ; fi + # To make the dependencies known to `make', we finally have to include # them: diff --git a/deal.II/examples/step-2/Makefile b/deal.II/examples/step-2/Makefile index dfa815e67a..dbd6066cb6 100644 --- a/deal.II/examples/step-2/Makefile +++ b/deal.II/examples/step-2/Makefile @@ -136,11 +136,17 @@ clean: # the executable. This file is automagically remade whenever needed, # i.e. whenever one of the cc-/h-files changed. Make detects whether # to remake this file upon inclusion at the bottom of this file. +# +# If the file should turn out to be empty, then blow it +# away to let make issue a proper error message rather than +# some obscure follow-up problems Makefile.dep: $(target).cc Makefile \ $(shell echo $D/*/include/*/*.h) @echo ============================ Remaking $@ @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \ > Makefile.dep + @if test -s $@ ; then : else rm $@ ; fi + # To make the dependencies known to `make', we finally have to include # them: diff --git a/deal.II/examples/step-3/Makefile b/deal.II/examples/step-3/Makefile index 8154cc6545..910356c898 100644 --- a/deal.II/examples/step-3/Makefile +++ b/deal.II/examples/step-3/Makefile @@ -136,11 +136,17 @@ clean: # the executable. This file is automagically remade whenever needed, # i.e. whenever one of the cc-/h-files changed. Make detects whether # to remake this file upon inclusion at the bottom of this file. +# +# If the file should turn out to be empty, then blow it +# away to let make issue a proper error message rather than +# some obscure follow-up problems Makefile.dep: $(target).cc Makefile \ $(shell echo $D/*/include/*/*.h) @echo ============================ Remaking $@ @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \ > Makefile.dep + @if test -s $@ ; then : else rm $@ ; fi + # To make the dependencies known to `make', we finally have to include # them: diff --git a/deal.II/examples/step-4/Makefile b/deal.II/examples/step-4/Makefile index f12f835d33..ba429f5d42 100644 --- a/deal.II/examples/step-4/Makefile +++ b/deal.II/examples/step-4/Makefile @@ -138,11 +138,17 @@ clean: # the executable. This file is automagically remade whenever needed, # i.e. whenever one of the cc-/h-files changed. Make detects whether # to remake this file upon inclusion at the bottom of this file. +# +# If the file should turn out to be empty, then blow it +# away to let make issue a proper error message rather than +# some obscure follow-up problems Makefile.dep: $(target).cc Makefile \ $(shell echo $D/*/include/*/*.h) @echo ============================ Remaking $@ @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \ > Makefile.dep + @if test -s $@ ; then : else rm $@ ; fi + # To make the dependencies known to `make', we finally have to include # them: diff --git a/deal.II/examples/step-5/Makefile b/deal.II/examples/step-5/Makefile index 8154cc6545..910356c898 100644 --- a/deal.II/examples/step-5/Makefile +++ b/deal.II/examples/step-5/Makefile @@ -136,11 +136,17 @@ clean: # the executable. This file is automagically remade whenever needed, # i.e. whenever one of the cc-/h-files changed. Make detects whether # to remake this file upon inclusion at the bottom of this file. +# +# If the file should turn out to be empty, then blow it +# away to let make issue a proper error message rather than +# some obscure follow-up problems Makefile.dep: $(target).cc Makefile \ $(shell echo $D/*/include/*/*.h) @echo ============================ Remaking $@ @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \ > Makefile.dep + @if test -s $@ ; then : else rm $@ ; fi + # To make the dependencies known to `make', we finally have to include # them: diff --git a/deal.II/examples/step-6/Makefile b/deal.II/examples/step-6/Makefile index 8154cc6545..910356c898 100644 --- a/deal.II/examples/step-6/Makefile +++ b/deal.II/examples/step-6/Makefile @@ -136,11 +136,17 @@ clean: # the executable. This file is automagically remade whenever needed, # i.e. whenever one of the cc-/h-files changed. Make detects whether # to remake this file upon inclusion at the bottom of this file. +# +# If the file should turn out to be empty, then blow it +# away to let make issue a proper error message rather than +# some obscure follow-up problems Makefile.dep: $(target).cc Makefile \ $(shell echo $D/*/include/*/*.h) @echo ============================ Remaking $@ @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \ > Makefile.dep + @if test -s $@ ; then : else rm $@ ; fi + # To make the dependencies known to `make', we finally have to include # them: diff --git a/deal.II/examples/step-7/Makefile b/deal.II/examples/step-7/Makefile index 3b93e6e3e5..f9b252c42f 100644 --- a/deal.II/examples/step-7/Makefile +++ b/deal.II/examples/step-7/Makefile @@ -136,11 +136,17 @@ clean: # the executable. This file is automagically remade whenever needed, # i.e. whenever one of the cc-/h-files changed. Make detects whether # to remake this file upon inclusion at the bottom of this file. +# +# If the file should turn out to be empty, then blow it +# away to let make issue a proper error message rather than +# some obscure follow-up problems Makefile.dep: $(target).cc Makefile \ $(shell echo $D/*/include/*/*.h) @echo ============================ Remaking $@ @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \ > Makefile.dep + @if test -s $@ ; then : else rm $@ ; fi + # To make the dependencies known to `make', we finally have to include # them: diff --git a/deal.II/examples/step-8/Makefile b/deal.II/examples/step-8/Makefile index 8154cc6545..910356c898 100644 --- a/deal.II/examples/step-8/Makefile +++ b/deal.II/examples/step-8/Makefile @@ -136,11 +136,17 @@ clean: # the executable. This file is automagically remade whenever needed, # i.e. whenever one of the cc-/h-files changed. Make detects whether # to remake this file upon inclusion at the bottom of this file. +# +# If the file should turn out to be empty, then blow it +# away to let make issue a proper error message rather than +# some obscure follow-up problems Makefile.dep: $(target).cc Makefile \ $(shell echo $D/*/include/*/*.h) @echo ============================ Remaking $@ @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \ > Makefile.dep + @if test -s $@ ; then : else rm $@ ; fi + # To make the dependencies known to `make', we finally have to include # them: diff --git a/deal.II/examples/step-9/Makefile b/deal.II/examples/step-9/Makefile index 8154cc6545..910356c898 100644 --- a/deal.II/examples/step-9/Makefile +++ b/deal.II/examples/step-9/Makefile @@ -136,11 +136,17 @@ clean: # the executable. This file is automagically remade whenever needed, # i.e. whenever one of the cc-/h-files changed. Make detects whether # to remake this file upon inclusion at the bottom of this file. +# +# If the file should turn out to be empty, then blow it +# away to let make issue a proper error message rather than +# some obscure follow-up problems Makefile.dep: $(target).cc Makefile \ $(shell echo $D/*/include/*/*.h) @echo ============================ Remaking $@ @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \ > Makefile.dep + @if test -s $@ ; then : else rm $@ ; fi + # To make the dependencies known to `make', we finally have to include # them: diff --git a/deal.II/lac/Makefile b/deal.II/lac/Makefile index 0e614ae912..e037e23269 100644 --- a/deal.II/lac/Makefile +++ b/deal.II/lac/Makefile @@ -95,15 +95,21 @@ clean: -rm -f *~ include/*~ include/*/*~ Makefile.dep -#Rule to generate the dependency file. This file is -#automagically remade whenever needed, i.e. whenever -#one of the cc-/h-files changed. Make detects whether -#to remake this file upon inclusion at the bottom -#of this file. +# Rule to generate the dependency file. This file is +# automagically remade whenever needed, i.e. whenever +# one of the cc-/h-files changed. Make detects whether +# to remake this file upon inclusion at the bottom +# of this file. +# +# If the file should turn out to be empty, then blow it +# away to let make issue a proper error message rather than +# some obscure follow-up problems Makefile.dep: $(cc-files) $(h-files) Makefile $D/common/Make.global_options @echo ============================ Remaking lac/Makefile @$D/common/scripts/make_dependencies $(INCLUDE) "-B$(LIBDIR)/lac" $(cc-files) \ > Makefile.dep + @if test -s $@ ; then : else rm $@ ; fi + # include all the dependencies include Makefile.dep -- 2.39.5