Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/file Finish version auto-setting.
details: https://anonhg.NetBSD.org/src/rev/0d71f29e16d8
branches: trunk
changeset: 325050:0d71f29e16d8
user: christos <christos%NetBSD.org@localhost>
date: Sun Dec 01 20:15:42 2013 +0000
description:
Finish version auto-setting.
diffstat:
external/bsd/file/Makefile.inc | 10 +++++++---
external/bsd/file/include/config.h | 4 ++++
external/bsd/file/lib/Makefile | 6 ++----
3 files changed, 13 insertions(+), 7 deletions(-)
diffs (75 lines):
diff -r 57dd51dd8948 -r 0d71f29e16d8 external/bsd/file/Makefile.inc
--- a/external/bsd/file/Makefile.inc Sun Dec 01 20:02:43 2013 +0000
+++ b/external/bsd/file/Makefile.inc Sun Dec 01 20:15:42 2013 +0000
@@ -1,7 +1,9 @@
-# $NetBSD: Makefile.inc,v 1.3 2009/05/08 23:36:42 christos Exp $
+# $NetBSD: Makefile.inc,v 1.4 2013/12/01 20:15:42 christos Exp $
-DIST=${.CURDIR}/../dist
WARNS=4
+DIST=${NETBSDSRCDIR}/external/bsd/file/dist
+
+.include <bsd.own.mk>
BINDIR?= /usr/bin
USE_FORT?= yes # data-driven bugs?
@@ -12,8 +14,10 @@
MFILES?= magic.mgc
MAGIC?= ${MFILESDIR}/magic
+VERSION != ${TOOL_SED} -ne "s/^PACKAGE_VERSION='\([^']*\)'/\1/p" ${DIST}/configure
+
CPPFLAGS+= -DMAGIC='"${MAGIC}"' -DHAVE_CONFIG_H -DQUICK -DBUILTIN_ELF \
- -DELFCORE
+ -DELFCORE -DVERSION='"${VERSION}"'
CPPFLAGS+= -I${.CURDIR}/../include -I${DIST}/src
.PATH: ${DIST}/src ${DIST}/doc
diff -r 57dd51dd8948 -r 0d71f29e16d8 external/bsd/file/include/config.h
--- a/external/bsd/file/include/config.h Sun Dec 01 20:02:43 2013 +0000
+++ b/external/bsd/file/include/config.h Sun Dec 01 20:15:42 2013 +0000
@@ -245,7 +245,9 @@
#define PACKAGE_URL ""
/* Define to the version of this package. */
+#if 0
#define PACKAGE_VERSION "5.14"
+#endif
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
@@ -275,8 +277,10 @@
#endif
+#if 0
/* Version number of package */
#define VERSION "5.14"
+#endif
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
diff -r 57dd51dd8948 -r 0d71f29e16d8 external/bsd/file/lib/Makefile
--- a/external/bsd/file/lib/Makefile Sun Dec 01 20:02:43 2013 +0000
+++ b/external/bsd/file/lib/Makefile Sun Dec 01 20:15:42 2013 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 2013/12/01 20:01:14 christos Exp $
+# $NetBSD: Makefile,v 1.6 2013/12/01 20:15:42 christos Exp $
#
USE_FORT?= yes # data driven bugs?
@@ -33,13 +33,11 @@
INCS= magic.h
INCSDIR= /usr/include
-VERSION != ${TOOL_SED} -ne "s/^PACKAGE_VERSION='\([0-9]*\)\.\([0-9]*\)'/\1\2/p" ${DIST}/configure
-
COPTS.softmagic.c = -Wno-format-nonliteral
magic.c: magic.h
magic.h: magic.h.in
- ${TOOL_SED} -e "s/X.YY/${VERSION}/" < ${.ALLSRC} > ${.TARGET}
+ ${TOOL_SED} -e "s/X.YY/${VERSION:S/.//g}/" < ${.ALLSRC} > ${.TARGET}
CLEANFILES+= magic.h
.include <bsd.lib.mk>
Home |
Main Index |
Thread Index |
Old Index