#include #include #include "projet.h" /* ComplŠte le makefile.dat avec les fichiers du r‚pertoire \kit\build\... Balaye le r‚pertoire correspondant au projet dans l'environnement d'int‚gration (e:\kit\build\...) et ajoute tous les fichiers trouv‚ sauf lui-mˆme. Le makefile.dat sera r‚‚cris sur disque dans l'environnement usager mˆme si aucun ajout. addbuild agit comme un module de copie. Ces fichiers sont produit lors de la recompilation. On retrouve les fichier .p .nas ... qui ne sont pas normalement archiv‚s. L'op‚ration n'est pas faite si le makefile.dat est dans l'environnement d'int‚gration. Retourne -1 si erreur. */ PUBLIC int MAKEFILE::addbuild() { int ret = 0; char usrpath[MAXSIZ_PATH]; user->makusrpath (projet,usrpath); path_make (usrpath,moi->getnom(),usrpath); if (user->isbuild() || user->nobuild()){ ret = ecrit(usrpath,0); }else{ char bpath[MAXSIZ_PATH]; user->makbldpath (projet,bpath); SAVEPATH save; ret = -1; if (path_pushdir (user,bpath,&save) != -1){ char *tb[400]; int nb = dir_getlistp(WILD_ALLFILE,0,tb,400); // Fabrique le path qui sera associ‚ … chaque fichiers trouv‚s. REVISION brev = *user->getrevdst(); brev.strip(); char tmp[MAXSIZ_PATH]; brev.formatpath(tmp); path_make(tmp,projet,tmp); // Utilise sprintf plutot que path_make parce que path_make // convertit en minuscule. sprintf (bpath,"$(KITBUILD)/%s",tmp); for (int i=0; inom)!=0){ sprintf (tmp,"%s/%s",bpath,fname); MAKEFILE_FILE *file = locate(fname); if (file == NULL || brev.cmp(&file->rev) >= 0){ setrev (fname,&brev,tmp,file_dosdate(fname),0); } } } path_popdir (&save); ret = ecrit(usrpath,0); tbstr_free (tb,nb); } } return ret; } /* Obtient la r‚visiond du makefile.dat */ PUBLIC const REVISION *MAKEFILE::getrev() { return moi->getrev(); }