solve the edje_decc file thing

SVN revision: 28525
This commit is contained in:
Carsten Haitzler 2007-03-02 07:24:32 +00:00
parent 7bab06fcb4
commit e10fb8599e
1 changed files with 13 additions and 1 deletions

View File

@ -11,6 +11,7 @@
char *progname = NULL; char *progname = NULL;
char *file_in = NULL; char *file_in = NULL;
char *file_out = NULL;
Edje_File *edje_file = NULL; Edje_File *edje_file = NULL;
SrcFile_List *srcfiles = NULL; SrcFile_List *srcfiles = NULL;
@ -31,7 +32,7 @@ main_help(void)
{ {
printf printf
("Usage:\n" ("Usage:\n"
"\t%s input_file.edj \n" "\t%s input_file.edj [-main-out file.edc]\n"
"\n" "\n"
,progname); ,progname);
} }
@ -48,6 +49,11 @@ main(int argc, char **argv)
{ {
if (!file_in) if (!file_in)
file_in = argv[i]; file_in = argv[i];
else if ((!strcmp(argv[i], "-main-out")) && (i < (argc - 1)))
{
i++;
file_out = argv[i];
}
} }
if (!file_in) if (!file_in)
{ {
@ -286,6 +292,12 @@ output(void)
fprintf(f, "%s $@ -id . -fd . %s -o %s.edj\n", edje_file->compiler, sf->name, outdir); fprintf(f, "%s $@ -id . -fd . %s -o %s.edj\n", edje_file->compiler, sf->name, outdir);
fclose(f); fclose(f);
if (file_out)
{
snprintf(out, sizeof(out), "%s/%s", outdir, file_out);
symlink(sf->name, out);
}
#ifndef WIN32 #ifndef WIN32
chmod(out, S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IWGRP | S_IXGRP); chmod(out, S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IWGRP | S_IXGRP);
#endif #endif