Fixed the name of the main executable

This commit is contained in:
Pierre Pronchery 2013-06-04 02:30:55 +02:00
parent a7f1692d52
commit a637b82983
3 changed files with 8 additions and 9 deletions

View File

@ -51,7 +51,7 @@ parser.o: parser.c parser.h ../include/CPP.h
scanner.o: scanner.c common.h ../include/CPP.h scanner.o: scanner.c common.h ../include/CPP.h
$(CC) $(libcpp_CFLAGS) -c scanner.c $(CC) $(libcpp_CFLAGS) -c scanner.c
main.o: main.c ../include/CPP.h ../config.h main.o: main.c ../include/CPP.h
$(CC) $(cpp_CFLAGS) -c main.c $(CC) $(cpp_CFLAGS) -c main.c
clean: clean:

View File

@ -1,5 +1,5 @@
/* $Id$ */ /* $Id$ */
/* Copyright (c) 2007-2012 Pierre Pronchery <khorben@defora.org> */ /* Copyright (c) 2007-2013 Pierre Pronchery <khorben@defora.org> */
/* This file is part of DeforaOS Devel cpp */ /* This file is part of DeforaOS Devel cpp */
/* This program is free software: you can redistribute it and/or modify /* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -23,7 +23,6 @@
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include "CPP.h" #include "CPP.h"
#include "../config.h"
/* cpp */ /* cpp */
@ -144,7 +143,7 @@ static void _do_print_token(FILE * fp, Token * token)
/* cpp_error */ /* cpp_error */
static int _cpp_error(void) static int _cpp_error(void)
{ {
return error_print(PACKAGE); return error_print("cpp");
} }
@ -152,7 +151,7 @@ static int _cpp_error(void)
/* FIXME -E prints metadata? */ /* FIXME -E prints metadata? */
static int _usage(void) static int _usage(void)
{ {
fputs("Usage: " PACKAGE " [-D name[=value]]...[-I directory][-o file][-t][-U name]... input...\n" fputs("Usage: cpp [-D name[=value]]...[-I directory][-o file][-t][-U name]... input...\n"
" -D Add a substitution\n" " -D Add a substitution\n"
" -I Add a directory to the search path\n" " -I Add a directory to the search path\n"
" -o Write output to a file\n" " -o Write output to a file\n"
@ -219,7 +218,7 @@ static int _main_add_define(Prefs * prefs, char * define)
value = strtok(define, "="); value = strtok(define, "=");
if((p = realloc(prefs->defines, sizeof(*p) * (prefs->defines_cnt + 1))) if((p = realloc(prefs->defines, sizeof(*p) * (prefs->defines_cnt + 1)))
== NULL) == NULL)
return error_set_print(PACKAGE, 1, "%s", strerror(errno)); return error_set_print("cpp", 1, "%s", strerror(errno));
prefs->defines = p; prefs->defines = p;
prefs->defines[prefs->defines_cnt++] = define; prefs->defines[prefs->defines_cnt++] = define;
return 0; return 0;
@ -231,7 +230,7 @@ static int _main_add_path(Prefs * prefs, char const * path)
if((p = realloc(prefs->paths, sizeof(*p) * (prefs->paths_cnt + 1))) if((p = realloc(prefs->paths, sizeof(*p) * (prefs->paths_cnt + 1)))
== NULL) == NULL)
return error_set_print(PACKAGE, 1, "%s", strerror(errno)); return error_set_print("cpp", 1, "%s", strerror(errno));
prefs->paths = p; prefs->paths = p;
prefs->paths[prefs->paths_cnt++] = path; prefs->paths[prefs->paths_cnt++] = path;
return 0; return 0;
@ -245,7 +244,7 @@ static int _main_add_undefine(Prefs * prefs, char const * undefine)
return 1; return 1;
if((p = realloc(prefs->undefines, sizeof(*p) if((p = realloc(prefs->undefines, sizeof(*p)
* (prefs->undefines_cnt + 1))) == NULL) * (prefs->undefines_cnt + 1))) == NULL)
return error_set_print(PACKAGE, 1, "%s", strerror(errno)); return error_set_print("cpp", 1, "%s", strerror(errno));
prefs->undefines = p; prefs->undefines = p;
prefs->undefines[prefs->undefines_cnt++] = undefine; prefs->undefines[prefs->undefines_cnt++] = undefine;
return 0; return 0;

View File

@ -30,4 +30,4 @@ ldflags=-L. -L$(LIBDIR) -Wl,-rpath,$(LIBDIR) -lcpp
install=$(BINDIR) install=$(BINDIR)
[main.c] [main.c]
depends=../include/CPP.h,../config.h depends=../include/CPP.h