From: mquinson Date: Tue, 7 Aug 2007 21:27:44 +0000 (+0000) Subject: This one is maybe unused since 2 years or more X-Git-Tag: v3.3~1322 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/24a392be46c1272f7478e7dc80f3c74d7c21b881 This one is maybe unused since 2 years or more git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@4038 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/examples/gras/gras_stub_generator b/examples/gras/gras_stub_generator deleted file mode 100755 index 2791ff51ed..0000000000 --- a/examples/gras/gras_stub_generator +++ /dev/null @@ -1,215 +0,0 @@ -#! /usr/bin/perl - -# gras_stub_generator - creates the main() to use a GRAS program - -# Authors: Martin Quinson -# Copyright (C) 2003 the OURAGAN project. - -# 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. - -use strict; -eval qq{ - use warnings; -}; # warnings not defined in 5.00503/sun4-solaris - -sub usage { - my ($msg)=@_; - die ($msg? "gras_stub_generator: $msg\n":""). - "gras_stub_generator: USAGE\n". - " gras_stub_generator project_name deployment_file\n" -} - -my ($project,$deploy_file)=@ARGV; - -$project && $deploy_file || usage(); - -my (%process); - -open (DEPLOY, $deploy_file) || usage("Cannot open $deploy_file: $!"); -my $linenum=0; -while () { - $linenum++; - /^\W*\w*\W*(\w*)/ || usage("$deploy_file:$linenum: Parse error"); - $process{$1}=1; -} - -my $warn="/***********\n * DO NOT EDIT! THIS FILE WERE AUTOMATICALLY GENERATED FROM $deploy_file BY gras_stub_generator\n ***********/\n"; - -##### -# Generate the file for the simulator -##### - -open (OUT,">_${project}_simulator.c") || die "Cannot open _${project}_simulator,c: $!"; -print OUT < -#include -#include "msg/msg.h" -#include - -char *gras_log=NULL; - -EOF - ; -foreach (keys %process) { print OUT "int $_(int argc,char *argv[]);\n"; } -print OUT "\n"; -foreach (keys %process) { print OUT "int launch_$_(int argc,char *argv[]);\n"; } -print OUT "\n$warn\n"; - -foreach (keys %process) { - print OUT<_${project}_$pname.c") || die "Cannot open _${project}_$pname,c: $!"; - print OUT < -#include -#include - -/* user code */ -int $pname(int argc, char *argv[]); - -$warn - -int main(int argc, char *argv[]){ - int errcode; - - errcode=$pname(argc,argv); - - return errcode; -} - -$warn -EOF -; - close OUT || die "Cannot write _${project}_$pname,c: $!"; -} - -##### -# Outputs the Makefile.am snippet -##### - -print ">>> Files for project '$project' successfully generated.\n"; -print ">>> Add (and edit) the following to you Makefile.am:\n\n"; - -print "# AUTOMAKE variable definition\n"; -print "INCLUDES= \@CFLAGS_GRAS\@ \@CFLAGS_XML\@ \@CFLAGS_SimGrid\@\n\n"; -print "PROGRAMS=${project}_simulator "; - -foreach (keys %process) { - print "${project}_$_ "; -} -print "\n\n${project}_simulator_SOURCES=\t_${project}_simulator.c $project.c\n"; -foreach (keys %process) { - print "${project}_${_}_SOURCES=\t_${project}_${_}.c $project.c\n"; -} - -print "\n\n${project}_simulator_LDADD=\tpath/to/libgrassg.a \@LIBS_SimGrid\@ \@LIBS_XML\@\n"; -foreach (keys %process) { - print "${project}_${_}_LDADD=\tpath/to/libgrasrl.a\n"; -} - -print "\n# cleanup temps\n"; -print "CLEANFILES= _${project}_simulator.c "; -foreach (keys %process) { - print "_${project}_$_.c "; -} -print "\n"; - -print "\n# generate temps\n"; -# A rule to generate the source file each time the deployment file changes -foreach (keys %process) { - print "_${project}_$_.c "; -} -print "_${project}_simulator.c: $deploy_file\n"; -print "\tgras_stub_generator $project $deploy_file >/dev/null\n"; - - -print "\n>>> Bye.\n"