Commit 8cbdaab6 authored by John van Groningen's avatar John van Groningen
Browse files

refactor clm.c, remove unused function print_version, define function assemble only if it is used

parent 02a7fd41
Pipeline #50762 passed with stage
in 17 seconds
......@@ -2240,6 +2240,7 @@ static int generate_code_for_project_node (P_NODE project_node,char *file_name)
}
}
#if !defined (NO_ASSEMBLE)
static int assemble (P_NODE project_node,char *file_name)
{
int pid,r,status;
......@@ -2260,13 +2261,13 @@ static int assemble (P_NODE project_node,char *file_name)
}
strcat (o_file_name,OBJECT_FILE_EXTENSION);
#if !(defined (_WINDOWS_))
# if !(defined (_WINDOWS_))
pid=fork();
if (pid<0)
error ("Fork failed");
if (!pid)
#endif
# endif
{
char *argv[16],**arg;
......@@ -2277,7 +2278,7 @@ static int assemble (P_NODE project_node,char *file_name)
*arg++="-o";
*arg++=o_file_name;
*arg=0;
#if defined (_WINDOWS_)
# if defined (_WINDOWS_)
# ifdef _WINDOWS_
# ifdef SPAWNVP_AND_WAIT
{
......@@ -2297,7 +2298,7 @@ static int assemble (P_NODE project_node,char *file_name)
# endif
return r==0;
}
#else
# else
execv (assembler_file_name,argv);
error ("Can't execute the assembler");
......@@ -2305,8 +2306,9 @@ static int assemble (P_NODE project_node,char *file_name)
r=wait_for_child (pid, "Assembler",&status);
return r>=0 && status==0;
#endif
# endif
}
#endif
static void get_dependencies (P_NODE project_node)
{
......@@ -3986,14 +3988,6 @@ static int link_project (P_NODE first_project_node,char *options_file_name,char
#endif
}
static void print_version (void)
{
printf (
"Clean Compiler 1.2.6/0.%03d/1.2\n"
,VERSION
);
}
static void print_clm_version (void)
{
printf ("clm - Clean make - version %s\n", CLM_VERSION);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment