X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/27b0c1ee1d85c53f1d11bb2b8e539cd76e4cf437..9a01538f6933774c3dc6816482324b61efa9cdaf:/tools/smpi/generate_smpi_defines.pl?ds=sidebyside diff --git a/tools/smpi/generate_smpi_defines.pl b/tools/smpi/generate_smpi_defines.pl index 0bd941b171..9ce19221ca 100755 --- a/tools/smpi/generate_smpi_defines.pl +++ b/tools/smpi/generate_smpi_defines.pl @@ -1,4 +1,10 @@ #!/usr/bin/env perl +# +# Copyright (c) 2016-2022. The SimGrid Team. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the license (GNU LGPL) which comes with this package. +# # Copyright 2016 Vincent Danjean # Christian Heinrich # @@ -25,9 +31,15 @@ if (defined $options{f}) { $commentChar="!" } +print "$commentChar Copyright (c) 2016-2022. The SimGrid Team. All rights reserved.\n"; +print "\n"; +print "$commentChar This program is free software; you can redistribute it and/or modify it\n"; +print "$commentChar under the terms of the license (GNU LGPL) which comes with this package.\n"; +print "\n"; print "$commentChar This file has been automatically generated by the script\n"; print "$commentChar in tools/smpi/generate_smpi_defines.pl\n"; print "$commentChar DO NOT EDIT MANUALLY. ALL CHANGES WILL BE OVERWRITTEN!\n"; +print "\n"; # Formatting of the output sub output_macro { @@ -42,12 +54,7 @@ sub output_macro { print "#define ". uc($id) ." smpi_trace_set_call_location(__FILE__,__LINE__); call ". ucfirst $id ."\n"; } else { - if ($id eq "MPI_Init") { - print "#define MPI_Init(...) ({ smpi_process_init(__VA_ARGS__); smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Init(NULL, NULL); })\n"; - } - else { - print "#define $id(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); $id(__VA_ARGS__); })\n"; - } + print "#define $id(...) (smpi_trace_set_call_location(__FILE__, __LINE__), $id(__VA_ARGS__))\n"; } }