ref: a6b244b12efa63e8f6afd8bf4b933482e4270116
parent: ceabbeaa2f22e5249a680a315cca7960b00e7524
author: Antonio Niño Díaz <antonio_nd@outlook.com>
date: Sun Jan 28 08:07:21 EST 2018
Move version files out of extern folder The folder extern is reserved for external contributions, not common files. Signed-off-by: Antonio Niño Díaz <antonio_nd@outlook.com>
--- a/Makefile
+++ b/Makefile
@@ -58,7 +58,7 @@
src/asm/symbol.o \
src/extern/err.o \
src/extern/utf8decoder.o \
- src/extern/version.o
+ src/version.o
src/asm/asmy.h: src/asm/asmy.c
src/asm/locallex.o src/asm/globlex.o src/asm/lexer.o: src/asm/asmy.h
@@ -76,7 +76,7 @@
src/link/script.o \
src/link/symbol.o \
src/extern/err.o \
- src/extern/version.o
+ src/version.o
src/link/parser.h: src/link/parser.c
src/link/lexer.o: src/link/parser.h
@@ -84,7 +84,7 @@
rgbfix_obj := \
src/fix/main.o \
src/extern/err.o \
- src/extern/version.o
+ src/version.o
rgbgfx_obj := \
src/gfx/gb.o \
@@ -91,7 +91,7 @@
src/gfx/main.o \
src/gfx/makepng.o \
src/extern/err.o \
- src/extern/version.o
+ src/version.o
rgbasm: ${rgbasm_obj}
$Q${CC} ${REALCFLAGS} -o $@ ${rgbasm_obj} -lm
--- a/include/extern/version.h
+++ /dev/null
@@ -1,18 +1,0 @@
-/*
- * This file is part of RGBDS.
- *
- * Copyright (c) 2017-2018, Antonio Nino Diaz and RGBDS contributors.
- *
- * SPDX-License-Identifier: MIT
- */
-
-#ifndef EXTERN_VERSION_H
-#define EXTERN_VERSION_H
-
-#define PACKAGE_VERSION_MAJOR (0)
-#define PACKAGE_VERSION_MINOR (3)
-#define PACKAGE_VERSION_PATCH (4)
-
-const char *get_package_version_string(void);
-
-#endif /* EXTERN_VERSION_H */
--- /dev/null
+++ b/include/version.h
@@ -1,0 +1,18 @@
+/*
+ * This file is part of RGBDS.
+ *
+ * Copyright (c) 2017-2018, Antonio Nino Diaz and RGBDS contributors.
+ *
+ * SPDX-License-Identifier: MIT
+ */
+
+#ifndef EXTERN_VERSION_H
+#define EXTERN_VERSION_H
+
+#define PACKAGE_VERSION_MAJOR (0)
+#define PACKAGE_VERSION_MINOR (3)
+#define PACKAGE_VERSION_PATCH (4)
+
+const char *get_package_version_string(void);
+
+#endif /* EXTERN_VERSION_H */
--- a/src/asm/main.c
+++ b/src/asm/main.c
@@ -22,7 +22,8 @@
#include "asm/main.h"
#include "extern/err.h"
-#include "extern/version.h"
+
+#include "version.h"
extern int yyparse(void);
--- a/src/asm/symbol.c
+++ b/src/asm/symbol.c
@@ -24,7 +24,8 @@
#include "asm/output.h"
#include "extern/err.h"
-#include "extern/version.h"
+
+#include "version.h"
struct sSymbol *tHashedSymbols[HASHSIZE];
static struct sSymbol *pScope; /* Current section symbol scope */
--- a/src/extern/version.c
+++ /dev/null
@@ -1,26 +1,0 @@
-/*
- * This file is part of RGBDS.
- *
- * Copyright (c) 2017-2018, Antonio Nino Diaz and RGBDS contributors.
- *
- * SPDX-License-Identifier: MIT
- */
-
-#include <stdio.h>
-#include <string.h>
-
-#include "extern/version.h"
-
-const char *get_package_version_string(void)
-{
- static char s[50];
-
- /* The following conditional should be simplified by the compiler. */
- if (strlen(BUILD_VERSION_STRING) == 0) {
- snprintf(s, sizeof(s), "v%d.%d.%d", PACKAGE_VERSION_MAJOR,
- PACKAGE_VERSION_MINOR, PACKAGE_VERSION_PATCH);
- return s;
- } else {
- return BUILD_VERSION_STRING;
- }
-}
--- a/src/fix/main.c
+++ b/src/fix/main.c
@@ -14,7 +14,8 @@
#include <unistd.h>
#include "extern/err.h"
-#include "extern/version.h"
+
+#include "version.h"
static void print_usage(void)
{
--- a/src/gfx/main.c
+++ b/src/gfx/main.c
@@ -10,9 +10,9 @@
#include <string.h>
#include <unistd.h>
-#include "extern/version.h"
-
#include "gfx/main.h"
+
+#include "version.h"
static void print_usage(void)
{
--- a/src/link/main.c
+++ b/src/link/main.c
@@ -13,7 +13,6 @@
#include <unistd.h>
#include "extern/err.h"
-#include "extern/version.h"
#include "link/object.h"
#include "link/output.h"
@@ -23,6 +22,8 @@
#include "link/mapfile.h"
#include "link/main.h"
#include "link/library.h"
+
+#include "version.h"
enum eBlockType {
BLOCK_COMMENT,
--- /dev/null
+++ b/src/version.c
@@ -1,0 +1,26 @@
+/*
+ * This file is part of RGBDS.
+ *
+ * Copyright (c) 2017-2018, Antonio Nino Diaz and RGBDS contributors.
+ *
+ * SPDX-License-Identifier: MIT
+ */
+
+#include <stdio.h>
+#include <string.h>
+
+#include "version.h"
+
+const char *get_package_version_string(void)
+{
+ static char s[50];
+
+ /* The following conditional should be simplified by the compiler. */
+ if (strlen(BUILD_VERSION_STRING) == 0) {
+ snprintf(s, sizeof(s), "v%d.%d.%d", PACKAGE_VERSION_MAJOR,
+ PACKAGE_VERSION_MINOR, PACKAGE_VERSION_PATCH);
+ return s;
+ } else {
+ return BUILD_VERSION_STRING;
+ }
+}