summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2014-08-06 22:46:15 +0000
committerbapt <bapt@FreeBSD.org>2014-08-06 22:46:15 +0000
commit5e19a8e83a130961d9e8360925c875b5794e355d (patch)
tree85d632bec68258f342fc79fc09305932a9468a5a
parent8a9380f42cca5e897a1ccdfa1d7a4d0e624e4864 (diff)
downloadFreeBSD-src-5e19a8e83a130961d9e8360925c875b5794e355d.zip
FreeBSD-src-5e19a8e83a130961d9e8360925c875b5794e355d.tar.gz
Make libohash a proper internallib instead of hidding it in m4
mandoc development seems to be also using ohash so prepare to share the code when needed
-rw-r--r--lib/Makefile1
-rw-r--r--lib/libohash/Makefile9
-rw-r--r--lib/libohash/ohash.c (renamed from usr.bin/m4/lib/ohash.c)0
-rw-r--r--lib/libohash/ohash.h (renamed from usr.bin/m4/lib/ohash.h)0
-rw-r--r--lib/libohash/ohash_init.3 (renamed from usr.bin/m4/lib/ohash_init.3)0
-rw-r--r--lib/libohash/ohash_interval.3 (renamed from usr.bin/m4/lib/ohash_interval.3)0
-rw-r--r--share/mk/src.libnames.mk4
-rw-r--r--usr.bin/m4/Makefile9
8 files changed, 17 insertions, 6 deletions
diff --git a/lib/Makefile b/lib/Makefile
index 05fab01..a5ab970 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -69,6 +69,7 @@ SUBDIR= ${SUBDIR_ORDERED} \
${_libnetgraph} \
${_libngatm} \
libnv \
+ libohash \
libopie \
libpam \
libpcap \
diff --git a/lib/libohash/Makefile b/lib/libohash/Makefile
new file mode 100644
index 0000000..198093e
--- /dev/null
+++ b/lib/libohash/Makefile
@@ -0,0 +1,9 @@
+# $FreeBSD$
+
+LIB= ohash
+SRCS= ohash.c
+INTERNALLIB=
+
+WARNS= 3
+
+.include <bsd.lib.mk>
diff --git a/usr.bin/m4/lib/ohash.c b/lib/libohash/ohash.c
index 3a0f5dd..3a0f5dd 100644
--- a/usr.bin/m4/lib/ohash.c
+++ b/lib/libohash/ohash.c
diff --git a/usr.bin/m4/lib/ohash.h b/lib/libohash/ohash.h
index 03de431..03de431 100644
--- a/usr.bin/m4/lib/ohash.h
+++ b/lib/libohash/ohash.h
diff --git a/usr.bin/m4/lib/ohash_init.3 b/lib/libohash/ohash_init.3
index 184c4e3..184c4e3 100644
--- a/usr.bin/m4/lib/ohash_init.3
+++ b/lib/libohash/ohash_init.3
diff --git a/usr.bin/m4/lib/ohash_interval.3 b/lib/libohash/ohash_interval.3
index 3809c34..3809c34 100644
--- a/usr.bin/m4/lib/ohash_interval.3
+++ b/lib/libohash/ohash_interval.3
diff --git a/share/mk/src.libnames.mk b/share/mk/src.libnames.mk
index a366420..09a44ee 100644
--- a/share/mk/src.libnames.mk
+++ b/share/mk/src.libnames.mk
@@ -44,3 +44,7 @@ LIBUCL?= ${LIBUCLDIR}/libucl.a
LIBREADLINEDIR= ${ROOTOBJDIR}/gnu/lib/libreadline/readline
LDREADLINE?= ${LIBREADLINEDIR}/libreadline.a
LIBREADLINE?= ${LIBREADLINEDIR}/libreadline.a
+
+LIBOHASHDIR= ${ROOTOBJDIR}/lib/libohash
+LDOHASH?= ${LIBOHASHDIR}/libohash.a
+LIBOHASH?= ${LIBOHASHDIR}/libohash.a
diff --git a/usr.bin/m4/Makefile b/usr.bin/m4/Makefile
index 4f71244..47cbe3e 100644
--- a/usr.bin/m4/Makefile
+++ b/usr.bin/m4/Makefile
@@ -7,16 +7,13 @@
.include <src.opts.mk>
PROG= m4
-CFLAGS+=-DEXTENDED -I${.CURDIR} -I${.CURDIR}/lib
-DPADD= ${LIBY} ${LIBL} ${LIBM}
-LDADD= -ly -ll -lm
+CFLAGS+=-DEXTENDED -I${.CURDIR} -I${.CURDIR}/../../lib/libohash
+DPADD= ${LIBY} ${LIBL} ${LIBM} ${LIBOHASH}
+LDADD= -ly -ll -lm ${LDOHASH}
NO_WMISSING_VARIABLE_DECLARATIONS=
SRCS= eval.c expr.c look.c main.c misc.c gnum4.c trace.c parser.y tokenizer.l
-.PATH: ${.CURDIR}/lib
-SRCS+= ohash.c
-WARNS= 3
tokenizer.o: parser.h
OpenPOWER on IntegriCloud