Makefile pour developpement multi-OS, multi-variants

crabs_makefile-5.2 ©2003-2008 - Christophe Cazajus (crabs-mettre_le_signe_at-crabs-world.com)

~~ / PrelativePath.c
Makefile include.LINUX include.SOLARIS include.CGI include.CGI_BIN include.XPI xpi_rdf.xsl Pdepend.c Pinfo.c PrelativeHome.c PrelativePath.c Pprojetgpl.c Prelative.c PinfoGPL.sh PgenInfo_c.sh PenvProjet.sh Pinfo2html.sh Pinstall.sh PgenInfo_include.sh projet.env crabs_mk.sh crabs_mk.csh fr/crabs_makefile.po Makefile.SOLARIS
    1 /*
    2 **=============================================================================
    3 ** crabs_makefile-5.2 : Makefile pour developpement multi-OS, multi-variants
    4 ** Copyright (C) 2003-2008 : Christophe Cazajus (crabs-mettre_le_signe_at-crabs-world.com)
    5 **
    6 ** Ce source fait partie d'un projet logiciel libre. Vous pouvez le distribuer
    7 ** et/ou le modifier en respectant les termes de la GNU General Public License
    8 ** version 2 ou (suite a votre propre choix) une version ulterieure.
    9 **
   10 ** Ce programme est distribue dans l'espoir qu'il puisse etre utile, mais
   11 ** sans aucune garantie, meme si il est associe a un produit qui vous en
   12 ** propose une. Conformez-vous a la GNU General Public License pour avoir
   13 ** plus de precisions.
   14 **
   15 ** L'auteur ne peut etre tenu responsable de l'utilisation faite des
   16 ** composantes associees a ce projet (en partie ou dans leur totalite).
   17 **
   18 ** Une copie du fichier de la GNU GPL est fournie dans le repertoire DOC
   19 ** de ce projet sous le nom gnu_gpl.txt
   20 **
   21 **=============================================================================
   22 */
   23 #include <locale.h>
   24 #include <libintl.h>
   25 #include <unistd.h>
   26 #include <stdio.h>
   27 #include <stdlib.h>
   28 #include <string.h>
   29 
   30 int main( int argc, char **argv )
   31     {
   32     char        pwd     [1024]  ;
   33     char        real    [1024]  ;
   34     char    *   projet          ;
   35     size_t      len_projet      ;
   36 
   37     setlocale( LC_ALL, "" ) ; textdomain( "libc" ) ;
   38 
   39     if ( argv[1] )
   40         strcpy( pwd, argv[1] ) ;
   41     else
   42         if ( ! getcwd ( pwd , sizeof(pwd) ) )
   43             {
   44             perror ( "getcwd" ) ;
   45             return 1;
   46             }
   47     projet = getenv( "PROJET" ) ;
   48     if ( !projet )
   49         {
   50         write( 1, pwd, strlen( pwd ) ) ;
   51         return 0;
   52         }
   53     len_projet = strlen( projet ) ;
   54     if ( strncmp( pwd, projet, len_projet ) )
   55         {
   56         write( 1, pwd, strlen( pwd ) ) ;
   57         return 0;
   58         }
   59     strcpy( real, "~~" ) ;
   60     strcat( real, pwd+len_projet ) ;
   61     write( 1, real, strlen( real ) ) ;
   62     return 0;
   63     }
   64 
Makefile include.LINUX include.SOLARIS include.CGI include.CGI_BIN include.XPI xpi_rdf.xsl Pdepend.c Pinfo.c PrelativeHome.c PrelativePath.c Pprojetgpl.c Prelative.c PinfoGPL.sh PgenInfo_c.sh PenvProjet.sh Pinfo2html.sh Pinstall.sh PgenInfo_include.sh projet.env crabs_mk.sh crabs_mk.csh fr/crabs_makefile.po Makefile.SOLARIS
~~ / PrelativePath.c

Haut de page

Contacter crabs

Date de génération : 22/09/2011 21:47