]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Move the script to generate dependencies to the /common/scripts subdir.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 10 Aug 1999 15:42:17 +0000 (15:42 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 10 Aug 1999 15:42:17 +0000 (15:42 +0000)
git-svn-id: https://svn.dealii.org/trunk@1670 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/source/Makefile
deal.II/deal.II/Make_dep.pl [deleted file]
deal.II/deal.II/source/Makefile
deal.II/lac/source/Makefile

index c48d13c346da54ec56d45aecf1b88e90599766fb..6cc653780152f3513cb0423bee71e8e318bd3788 100644 (file)
@@ -87,7 +87,7 @@ clean:
 ../lib/Makefile.dep: $(cc-files) $(forward-declarations) $(h-files) Makefile
 ifneq (1,${recursive-make-fwd-decl})
        @echo ============================ Remaking Makefile
-       @perl ../Make_dep.pl ../lib/libbase $(INCLUDE) $(cc-files) \
+       @perl $D/common/scripts/Make_dep.pl ../lib/libbase $(INCLUDE) $(cc-files) \
                | perl -p -e 's!^.*\((.*\.(g?o))\):!../lib/$$2/$$1:!g;' \
                | perl -p -e 's!(.*data_out_base)(.g?o)!$$1_1d$$2 $$1_2d$$2 $$1_3d$$2!g;' \
                > ../lib/Makefile.dep
diff --git a/deal.II/deal.II/Make_dep.pl b/deal.II/deal.II/Make_dep.pl
deleted file mode 100644 (file)
index c78f955..0000000
+++ /dev/null
@@ -1,162 +0,0 @@
-# $Id$
-# Copyright W. Bangerth, University of Heidelberg, 1998
-
-
-#Make a dependency file tree
-#usage: make_dep library_base_name -Iinc_path1 -Iinc_path2 ... files
-
-#This program makes for each of the given files a makefile dependency
-#list, also considering nested includes. It only considers included
-#files which are located in the given include pathes (you can give any
-#number of pathes). The output looks like this:
-#
-#lib_base_name.a(.o-file): file included_files
-#
-#secondly, a similar entry is created for the .g.a library with the
-#.go-file.
-
-#Author: Wolfgang Bangerth, March 1998
-
-
-
-
-# list of include pathes (from command line)
-@include_path = ();
-# list of files to be checked (from command line)
-@input_files  = ();
-# associate list of files together with the files they include
-%include_files = ();
-
-
-$library_base_name = shift;
-
-
-# fill include pathes
-while ($ARGV[0] =~ /^-I/) {
-    $_ = shift;
-    /^-I(.*)/;
-    $_ = $1;
-    if (m![^/]$!) {
-       @include_path = (@include_path, $_ . "/");
-    } else {
-       @include_path = (@include_path, $_);
-    }
-}
-
-#fill list of files to be processed
-while ($ARGV[0]) {
-    @input_files = (@input_files, shift);
-}
-
-
-foreach $file (@input_files) {
-    make_include_tree ($file);
-};
-
-
-foreach $file (keys %include_files) {
-    # complete list of included files by nested include files
-    foreach $include (split(' ',$include_files{$file})) {
-       complete ($file, $include);
-    }
-}
-
-# print dependency list
-foreach $file (@input_files) {
-    $file =~ /(.*)\.(cc)/;
-
-    print "$library_base_name.a($1.o):";
-    print "\\\n    $file";
-    foreach $f (split (' ', $include_files{$file})) {
-       print "\\\n    $f";
-    }
-    print "\n";
-
-    print "$library_base_name.g.a($1.go):";
-    print "\\\n    $file";
-    foreach $f (split (' ', $include_files{$file})) {
-       print "\\\n    $f";
-    }
-    print "\n";
-}
-
-
-
-
-
-
-
-
-# complete the list of included files by the files
-# included by a file included by the original one
-sub complete {
-    local ($file, $include) = ($_[0], $_[1]);
-    foreach $second_include (split(' ',$include_files{$include})) {
-       if (! ($include_files{$file} =~ $second_include)) {
-           #second_include not yet in list of included files
-           $include_files{$file} =
-               join(' ', $second_include, $include_files{$file});
-           complete ($file, $second_include);
-       }
-    }
-}
-
-
-
-
-# make the include tree for a file
-sub make_include_tree {
-    local ($filename) = $_[0];
-
-    open (FILE, $filename);
-    while (<FILE>) {
-       # look out for include statements
-       if (/^#\s*include\s*(["<])([^">]*)[">]/) {
-           local($include) = $2;
-           if ($1 =~ /</) {
-               # include by <...>. Try to find real path
-               for $include_dir (@include_path) {
-                   $if = $include_dir . $include;
-                   if (-r $if) {
-                       # file found; delete ./ at beginning
-                       if ($if =~ m!^\./(.*)!) {
-                           $if = $1;
-                       }
-                       $include_files{$filename} =
-                           join (' ', $if, $include_files{$filename});
-                   }
-               }
-           } else {
-               # included by "..."
-               # only append file if it exists or can be found
-
-               # first find out the path of the present file
-               # and then join the path to the included one
-               if ($filename =~ /\//){
-                   $path = $filename;
-                   # strip filename, leave path
-                   $path =~ s!/[^/]*$!/!g;
-               }
-               else
-               {
-                   $path = "./";
-               }
-                   
-               $include = $path . $include;
-
-               if (-r $include) {
-                   $include_files{$filename} =
-                       join (' ', $include, $include_files{$filename});
-               }
-           }
-       }
-    }
-
-    # for each file included here: make up include tree itself
-    for $if (split(/ /,$include_files{$filename})) {
-       # if include file list not yet made up
-       if (! defined ($include_files{$if})) {
-           make_include_tree($if);
-       }
-    }
-}
index 82f164b3a7d7cd97c298a25c0f2ab08dbbeb6311..d0b21e1e7f63a05ac329776dad22426034b19b9c 100644 (file)
@@ -169,7 +169,7 @@ ifneq (1,${recursive-make-fwd-decl})
        @echo "# This Makefile was automatically generated by ../source/Makefile" \
                > ../lib/Makefile.dep
        @echo "# See there for more information." >> ../lib/Makefile.dep
-       @perl ../Make_dep.pl ../lib/libgrid $(INCLUDE) $(cc-files) \
+       @perl $D/common/scripts/Make_dep.pl ../lib/libgrid $(INCLUDE) $(cc-files) \
                | perl -p -e 's!^.*\(.*/(.*)\):!../lib/DIM_PLACEHOLDER/$$1:!g;' \
                | perl -pe 's!(/[^/]+\.(o|go)):!/$$2$$1:!g;' \
                | perl -pe 's!(\.g?o)!_DIM_PLACEHOLDER$$1!g;' \
index 19aaf3aecc2148888f6c14d6a0f857079236c999..d921a3f1e25d1c653394e27e043c411de888e034 100644 (file)
@@ -52,7 +52,7 @@ clean:
 ../lib/Makefile.dep: $(cc-files) $(forward-declarations) $(h-files) Makefile
 ifneq (1,${recursive-make-fwd-decl})
        @echo ============================ Remaking Makefile
-       @perl ../Make_dep.pl ../lib/liblac $(INCLUDE) $(cc-files)               \
+       @perl $D/common/scripts/Make_dep.pl ../lib/liblac $(INCLUDE) $(cc-files)               \
                | perl -p -e 's!^.*\((.*\.(g?o))\):!../lib/$$2/$$1:!g;' \
                > ../lib/Makefile.dep
 else

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.