diff options
author | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2001-01-14 21:55:41 +0000 |
---|---|---|
committer | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2001-01-14 21:55:41 +0000 |
commit | 843ef5bb31cd02fbc73360b52f0e8d9db8667b49 (patch) | |
tree | 7de3a5522a26b45ad5d13b937d9c8889cf1a196e /lib/sbin | |
parent | 47be5986b7e69d19ec0d173b85fe91af3a20c44d (diff) |
If $source_file_name is set (e.g. from the command line) output a c preprocessor
line of the form
# 1 "source file name"
as the first line of the file. This allows __FILE__ directives to give correct
path to file, and also allows the compiler to give correct paths for warning/error
messages.
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@1991 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/sbin')
-rw-r--r-- | lib/sbin/c_file_processor.pl | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/sbin/c_file_processor.pl b/lib/sbin/c_file_processor.pl index da94fe1c..266e8293 100644 --- a/lib/sbin/c_file_processor.pl +++ b/lib/sbin/c_file_processor.pl @@ -29,6 +29,11 @@ if (! -e "$fortran_name_file" ) require "$fortran_name_file"; +if($source_file_name) +{ + print "# 1 $source_file_name\n"; +} + $checkfor1 = "DECLARE_CCTK_PARAMETERS"; $addmacro1 = "USE_CCTK_PARAMETERS"; $domacro1 = 0; |