Date: Mon, 16 Dec 2019 22:05:03 +0000 (UTC) From: Phil Shafer <phil@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r355826 - head/lib/libxo head/lib/libxo/encoder/csv head/lib/libxo/libxo head/lib/libxo/tests head/lib/libxo/tests/encoder head/usr.bin/xo vendor/Juniper/libxo Message-ID: <201912162205.xBGM534s014645@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: phil Date: Mon Dec 16 22:05:03 2019 New Revision: 355826 URL: https://svnweb.freebsd.org/changeset/base/355826 Log: Allow proper builds of libxo's CSV encoder: - Move libxo.a build to subdirectory (lib/libxo/libxo/Makefile) - Add .WAIT target to delay encoder build til after libxo - Use FILES to install encoder library as csv.enc - Update import script to put xo_config.h in new location Added: head/lib/libxo/libxo/ head/lib/libxo/libxo/Makefile (contents, props changed) head/lib/libxo/libxo/xo_config.h - copied unchanged from r355672, head/lib/libxo/xo_config.h Deleted: head/lib/libxo/xo_config.h Modified: head/lib/libxo/Makefile head/lib/libxo/encoder/csv/Makefile head/lib/libxo/tests/Makefile head/lib/libxo/tests/encoder/Makefile head/usr.bin/xo/Makefile Changes in other areas also in this revision: Modified: vendor/Juniper/libxo/.svnignore vendor/Juniper/libxo/import.sh Directory Properties: vendor/Juniper/libxo/ (props changed) Modified: head/lib/libxo/Makefile ============================================================================== --- head/lib/libxo/Makefile Mon Dec 16 21:52:12 2019 (r355825) +++ head/lib/libxo/Makefile Mon Dec 16 22:05:03 2019 (r355826) @@ -1,119 +1,10 @@ # $FreeBSD$ -SHLIBDIR?= /lib - .include <src.opts.mk> -PACKAGE= runtime - -LIBXOSRC= ${SRCTOP}/contrib/libxo - -.PATH: ${LIBXOSRC}/libxo - -LIB= xo -SHLIB_MAJOR=0 - -SRCS= libxo.c xo_encoder.c xo_syslog.c - -CFLAGS+=-I${LIBXOSRC}/libxo -I${.CURDIR} -CFLAGS+=-DXO_ENCODERDIR=\"/usr/lib/libxo/encoder\" - -INCS= xo.h xo_encoder.h -INCSDIR=${INCLUDEDIR}/libxo - -LIBADD= util - -WARNS?= 5 - -MAN+= libxo.3 -MAN+= xo_attr.3 \ - xo_create.3 \ - xo_emit.3 \ - xo_emit_err.3 \ - xo_err.3 \ - xo_error.3 \ - xo_finish.3 \ - xo_flush.3 \ - xo_message.3 \ - xo_no_setlocale.3 \ - xo_open_container.3 \ - xo_open_list.3 \ - xo_open_marker.3 \ - xo_parse_args.3 \ - xo_set_allocator.3 \ - xo_set_flags.3 \ - xo_set_info.3 \ - xo_set_options.3 \ - xo_set_style.3 \ - xo_set_syslog_enterprise_id.3 \ - xo_set_version.3 \ - xo_set_writer.3 \ - xo_syslog.3 - -MAN+= xo_format.5 - -MAN+= xo_options.7 - -MLINKS= xo_attr.3 xo_attr_h.3 \ - xo_attr.3 xo_attr_hv.3 \ - xo_create.3 xo_create_to_file.3 \ - xo_create.3 xo_destroy.3 \ - xo_emit.3 xo_emit_h.3 \ - xo_emit.3 xo_emit_hv.3 \ - xo_emit_err.3 xo_emit_errc.3 \ - xo_emit_err.3 xo_emit_errx.3 \ - xo_emit_err.3 xo_emit_warn.3 \ - xo_emit_err.3 xo_emit_warnx.3 \ - xo_emit_err.3 xo_emit_warn_c.3 \ - xo_emit_err.3 xo_emit_warn_hc.3 \ - xo_err.3 xo_errc.3 \ - xo_err.3 xo_errx.3 \ - xo_err.3 xo_warn.3 \ - xo_err.3 xo_warnx.3 \ - xo_err.3 xo_warn_c.3 \ - xo_err.3 xo_warn_hc.3 \ - xo_finish.3 xo_finish_h.3 \ - xo_flush.3 xo_flush_h.3 \ - xo_message.3 xo_message_c.3 \ - xo_message.3 xo_message_hc.3 \ - xo_message.3 xo_message_hcv.3 \ - xo_open_container.3 xo_open_container_h.3 \ - xo_open_container.3 xo_open_container_hd.3 \ - xo_open_container.3 xo_open_container_d.3 \ - xo_open_container.3 xo_close_container.3 \ - xo_open_container.3 xo_close_container_h.3 \ - xo_open_container.3 xo_close_container_hd.3 \ - xo_open_container.3 xo_close_container_d.3 \ - xo_open_list.3 xo_open_list_h.3 \ - xo_open_list.3 xo_open_list_hd.3 \ - xo_open_list.3 xo_open_list_d.3 \ - xo_open_list.3 xo_open_instance.3 \ - xo_open_list.3 xo_open_instance_h.3 \ - xo_open_list.3 xo_open_instance_hd.3 \ - xo_open_list.3 xo_open_instance_d.3 \ - xo_open_list.3 xo_close_instance.3 \ - xo_open_list.3 xo_close_instance_h.3 \ - xo_open_list.3 xo_close_instance_hd.3 \ - xo_open_list.3 xo_close_instance_d.3 \ - xo_open_list.3 xo_close_list.3 \ - xo_open_list.3 xo_close_list_h.3 \ - xo_open_list.3 xo_close_list_hd.3 \ - xo_open_list.3 xo_close_list_d.3 \ - xo_open_marker.3 xo_open_marker_h.3 \ - xo_open_marker.3 xo_close_marker.3 \ - xo_open_marker.3 xo_close_marker_h.3 \ - xo_parse_args.3 xo_set_program.3 \ - xo_set_flags.3 xo_clear_flags.3 \ - xo_set_style.3 xo_set_style_name.3 \ - xo_set_version.3 xo_set_version_h.3 \ - xo_syslog.3 xo_close_log.3 \ - xo_syslog.3 xo_open_log.3 \ - xo_syslog.3 xo_set_logmask.3 \ - xo_syslog.3 xo_vsyslog.3 - HAS_TESTS= SUBDIR.${MK_TESTS}+= tests -#SUBDIR = encoder +SUBDIR = libxo .WAIT encoder -.include <bsd.lib.mk> +.include <bsd.subdir.mk> Modified: head/lib/libxo/encoder/csv/Makefile ============================================================================== --- head/lib/libxo/encoder/csv/Makefile Mon Dec 16 21:52:12 2019 (r355825) +++ head/lib/libxo/encoder/csv/Makefile Mon Dec 16 22:05:03 2019 (r355826) @@ -1,9 +1,5 @@ # $FreeBSD$ -LIBXODIR= ${STAGEDIR}${PREFIX}/usr/lib/libxo/encoder -SHLIBDIR?= ${LIBXODIR} -LIBDIR?= ${LIBXODIR} - .include <src.opts.mk> PACKAGE= runtime @@ -12,8 +8,16 @@ LIBXOSRC= ${SRCTOP}/contrib/libxo .PATH: ${LIBXOSRC}/encoder/csv +# We use FILES to install the encoder library under the proper/magic +# name, in the proper/magic directory. libxo looks for encoders from +# "--libxo encoder=name" as "${prefix}/lib/libxo/encoder/${name}.enc" +FILES = libenc_csv.so +FILESNAME_libenc_csv.so= csv.enc +FILESDIR = /usr/lib/libxo/encoder + LIB= enc_csv SHLIB_MAJOR=0 +SHLIB_NAME= lib${LIB}.so SRCS= enc_csv.c @@ -21,10 +25,13 @@ CFLAGS+=-I${LIBXOSRC}/libxo -I${.CURDIR} CFLAGS+=-DXO_ENCODERDIR=\"/usr/lib/libxo/encoder\" LIBADD= util xo -LDFLAGS += -L${.OBJDIR}/../../wildebeast +LDFLAGS += -L${.OBJDIR:H:H}/libxo WARNS?= 5 -SYMLINKS+= ${SHLIB_NAME} ${LIBXODIR}/csv.enc +# Need to define a fake "install" target to block the one in bsd.lib.mk, +# since that one will install our lib in the wrong place (/usr/lib/). +install: realinstall .include <bsd.lib.mk> +.include <bsd.files.mk> Added: head/lib/libxo/libxo/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libxo/libxo/Makefile Mon Dec 16 22:05:03 2019 (r355826) @@ -0,0 +1,114 @@ +# $FreeBSD$ + +SHLIBDIR?= /lib + +.include <src.opts.mk> + +PACKAGE= runtime + +LIBXOSRC= ${SRCTOP}/contrib/libxo + +.PATH: ${LIBXOSRC}/libxo + +LIB= xo +SHLIB_MAJOR=0 + +SRCS= libxo.c xo_encoder.c xo_syslog.c + +CFLAGS+=-I${LIBXOSRC}/libxo -I${.CURDIR} +CFLAGS+=-DXO_ENCODERDIR=\"/usr/lib/libxo/encoder\" + +INCS= xo.h xo_encoder.h +INCSDIR=${INCLUDEDIR}/libxo + +LIBADD= util + +WARNS?= 5 + +MAN+= libxo.3 +MAN+= xo_attr.3 \ + xo_create.3 \ + xo_emit.3 \ + xo_emit_err.3 \ + xo_err.3 \ + xo_error.3 \ + xo_finish.3 \ + xo_flush.3 \ + xo_message.3 \ + xo_no_setlocale.3 \ + xo_open_container.3 \ + xo_open_list.3 \ + xo_open_marker.3 \ + xo_parse_args.3 \ + xo_set_allocator.3 \ + xo_set_flags.3 \ + xo_set_info.3 \ + xo_set_options.3 \ + xo_set_style.3 \ + xo_set_syslog_enterprise_id.3 \ + xo_set_version.3 \ + xo_set_writer.3 \ + xo_syslog.3 + +MAN+= xo_format.5 + +MAN+= xo_options.7 + +MLINKS= xo_attr.3 xo_attr_h.3 \ + xo_attr.3 xo_attr_hv.3 \ + xo_create.3 xo_create_to_file.3 \ + xo_create.3 xo_destroy.3 \ + xo_emit.3 xo_emit_h.3 \ + xo_emit.3 xo_emit_hv.3 \ + xo_emit_err.3 xo_emit_errc.3 \ + xo_emit_err.3 xo_emit_errx.3 \ + xo_emit_err.3 xo_emit_warn.3 \ + xo_emit_err.3 xo_emit_warnx.3 \ + xo_emit_err.3 xo_emit_warn_c.3 \ + xo_emit_err.3 xo_emit_warn_hc.3 \ + xo_err.3 xo_errc.3 \ + xo_err.3 xo_errx.3 \ + xo_err.3 xo_warn.3 \ + xo_err.3 xo_warnx.3 \ + xo_err.3 xo_warn_c.3 \ + xo_err.3 xo_warn_hc.3 \ + xo_finish.3 xo_finish_h.3 \ + xo_flush.3 xo_flush_h.3 \ + xo_message.3 xo_message_c.3 \ + xo_message.3 xo_message_hc.3 \ + xo_message.3 xo_message_hcv.3 \ + xo_open_container.3 xo_open_container_h.3 \ + xo_open_container.3 xo_open_container_hd.3 \ + xo_open_container.3 xo_open_container_d.3 \ + xo_open_container.3 xo_close_container.3 \ + xo_open_container.3 xo_close_container_h.3 \ + xo_open_container.3 xo_close_container_hd.3 \ + xo_open_container.3 xo_close_container_d.3 \ + xo_open_list.3 xo_open_list_h.3 \ + xo_open_list.3 xo_open_list_hd.3 \ + xo_open_list.3 xo_open_list_d.3 \ + xo_open_list.3 xo_open_instance.3 \ + xo_open_list.3 xo_open_instance_h.3 \ + xo_open_list.3 xo_open_instance_hd.3 \ + xo_open_list.3 xo_open_instance_d.3 \ + xo_open_list.3 xo_close_instance.3 \ + xo_open_list.3 xo_close_instance_h.3 \ + xo_open_list.3 xo_close_instance_hd.3 \ + xo_open_list.3 xo_close_instance_d.3 \ + xo_open_list.3 xo_close_list.3 \ + xo_open_list.3 xo_close_list_h.3 \ + xo_open_list.3 xo_close_list_hd.3 \ + xo_open_list.3 xo_close_list_d.3 \ + xo_open_marker.3 xo_open_marker_h.3 \ + xo_open_marker.3 xo_close_marker.3 \ + xo_open_marker.3 xo_close_marker_h.3 \ + xo_parse_args.3 xo_set_program.3 \ + xo_set_flags.3 xo_clear_flags.3 \ + xo_set_style.3 xo_set_style_name.3 \ + xo_set_version.3 xo_set_version_h.3 \ + xo_syslog.3 xo_close_log.3 \ + xo_syslog.3 xo_open_log.3 \ + xo_syslog.3 xo_set_logmask.3 \ + xo_syslog.3 xo_vsyslog.3 + +.include <bsd.lib.mk> Copied: head/lib/libxo/libxo/xo_config.h (from r355672, head/lib/libxo/xo_config.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libxo/libxo/xo_config.h Mon Dec 16 22:05:03 2019 (r355826, copy of r355672, head/lib/libxo/xo_config.h) @@ -0,0 +1,257 @@ +/* $FreeBSD$ */ +/* libxo/xo_config.h. Generated from xo_config.h.in by configure. */ +/* libxo/xo_config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP + systems. This function is required for `alloca.c' support on those systems. + */ +/* #undef CRAY_STACKSEG_END */ + +/* Define to 1 if using `alloca.c'. */ +/* #undef C_ALLOCA */ + +/* Define to 1 if you have `alloca', as a function or macro. */ +#define HAVE_ALLOCA 1 + +/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix). + */ +/* #undef HAVE_ALLOCA_H */ + +/* Define to 1 if you have the `asprintf' function. */ +#define HAVE_ASPRINTF 1 + +/* Define to 1 if you have the `bzero' function. */ +#define HAVE_BZERO 1 + +/* Define to 1 if you have the `ctime' function. */ +#define HAVE_CTIME 1 + +/* Define to 1 if you have the <ctype.h> header file. */ +#define HAVE_CTYPE_H 1 + +/* Define to 1 if you have the declaration of `__isthreaded', and to 0 if you + don't. */ +#define HAVE_DECL___ISTHREADED 1 + +/* Define to 1 if you have the <dlfcn.h> header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the `dlfunc' function. */ +#define HAVE_DLFUNC 1 + +/* Define to 1 if you have the <errno.h> header file. */ +#define HAVE_ERRNO_H 1 + +/* Define to 1 if you have the `fdopen' function. */ +#define HAVE_FDOPEN 1 + +/* Define to 1 if you have the `flock' function. */ +#define HAVE_FLOCK 1 + +/* Define to 1 if you have the `getpass' function. */ +#define HAVE_GETPASS 1 + +/* Define to 1 if you have the `getprogname' function. */ +#define HAVE_GETPROGNAME 1 + +/* Define to 1 if you have the `getrusage' function. */ +#define HAVE_GETRUSAGE 1 + +/* gettext(3) */ +/* #undef HAVE_GETTEXT */ + +/* Define to 1 if you have the `gettimeofday' function. */ +#define HAVE_GETTIMEOFDAY 1 + +/* humanize_number(3) */ +#define HAVE_HUMANIZE_NUMBER 1 + +/* Define to 1 if you have the <inttypes.h> header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the `crypto' library (-lcrypto). */ +#define HAVE_LIBCRYPTO 1 + +/* Define to 1 if you have the `m' library (-lm). */ +#define HAVE_LIBM 1 + +/* Define to 1 if you have the <libutil.h> header file. */ +#define HAVE_LIBUTIL_H 1 + +/* Define to 1 if your system has a GNU libc compatible `malloc' function, and + to 0 otherwise. */ +#define HAVE_MALLOC 1 + +/* Define to 1 if you have the `memmove' function. */ +#define HAVE_MEMMOVE 1 + +/* Define to 1 if you have the <memory.h> header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the <monitor.h> header file. */ +/* #undef HAVE_MONITOR_H */ + +/* Support printflike */ +/* #undef HAVE_PRINTFLIKE */ + +/* Define to 1 if your system has a GNU libc compatible `realloc' function, + and to 0 otherwise. */ +#define HAVE_REALLOC 1 + +/* Define to 1 if you have the `srand' function. */ +#define HAVE_SRAND 1 + +/* Define to 1 if you have the `sranddev' function. */ +#define HAVE_SRANDDEV 1 + +/* Define to 1 if you have the <stdint.h> header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the <stdio_ext.h> header file. */ +/* #undef HAVE_STDIO_EXT_H */ + +/* Define to 1 if you have the <stdio.h> header file. */ +#define HAVE_STDIO_H 1 + +/* Define to 1 if you have the <stdlib.h> header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the <stdtime/tzfile.h> header file. */ +/* #undef HAVE_STDTIME_TZFILE_H */ + +/* Define to 1 if you have the `strchr' function. */ +#define HAVE_STRCHR 1 + +/* Define to 1 if you have the `strcspn' function. */ +#define HAVE_STRCSPN 1 + +/* Define to 1 if you have the `strerror' function. */ +#define HAVE_STRERROR 1 + +/* Define to 1 if you have the <strings.h> header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the <string.h> header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strlcpy' function. */ +#define HAVE_STRLCPY 1 + +/* Define to 1 if you have the `strspn' function. */ +#define HAVE_STRSPN 1 + +/* Have struct sockaddr_un.sun_len */ +#define HAVE_SUN_LEN 1 + +/* Define to 1 if you have the `sysctlbyname' function. */ +#define HAVE_SYSCTLBYNAME 1 + +/* Define to 1 if you have the <sys/param.h> header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the <sys/stat.h> header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the <sys/sysctl.h> header file. */ +#define HAVE_SYS_SYSCTL_H 1 + +/* Define to 1 if you have the <sys/time.h> header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the <sys/types.h> header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the <threads.h> header file. */ +#define HAVE_THREADS_H 1 + +/* thread-local setting */ +#define HAVE_THREAD_LOCAL THREAD_LOCAL_before + +/* Define to 1 if you have the <tzfile.h> header file. */ +/* #undef HAVE_TZFILE_H */ + +/* Define to 1 if you have the <unistd.h> header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the `__flbf' function. */ +/* #undef HAVE___FLBF */ + +/* Enable debugging */ +/* #undef LIBXO_DEBUG */ + +/* Enable text-only rendering */ +/* #undef LIBXO_TEXT_ONLY */ + +/* Version number as dotted value */ +#define LIBXO_VERSION "1.3.1" + +/* Version number extra information */ +#define LIBXO_VERSION_EXTRA "" + +/* Version number as a number */ +#define LIBXO_VERSION_NUMBER 1003001 + +/* Version number as string */ +#define LIBXO_VERSION_STRING "1003001" + +/* Enable local wcwidth implementation */ +#define LIBXO_WCWIDTH 1 + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "libxo" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "phil@juniper.net" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "libxo" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "libxo 1.3.1" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "libxo" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "1.3.1" + +/* If using the C implementation of alloca, define if you know the + direction of stack growth for your system; otherwise it will be + automatically deduced at runtime. + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown */ +/* #undef STACK_DIRECTION */ + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Use int return codes */ +/* #undef USE_INT_RETURN_CODES */ + +/* Version number of package */ +#define VERSION "1.3.1" + +/* Retain hash bucket size */ +/* #undef XO_RETAIN_SIZE */ + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +/* #undef inline */ +#endif + +/* Define to rpl_malloc if the replacement function should be used. */ +/* #undef malloc */ + +/* Define to rpl_realloc if the replacement function should be used. */ +/* #undef realloc */ + +/* Define to `unsigned int' if <sys/types.h> does not define. */ +/* #undef size_t */ Modified: head/lib/libxo/tests/Makefile ============================================================================== --- head/lib/libxo/tests/Makefile Mon Dec 16 21:52:12 2019 (r355825) +++ head/lib/libxo/tests/Makefile Mon Dec 16 22:05:03 2019 (r355826) @@ -240,7 +240,7 @@ PROGS+= test_09 PROGS+= test_10 PROGS+= test_11 -CFLAGS+= -I${LIBXOSRC}/libxo -I${.CURDIR:H} +CFLAGS+= -I${LIBXOSRC}/libxo -I${.CURDIR:H}/libxo LIBADD= xo util Modified: head/lib/libxo/tests/encoder/Makefile ============================================================================== --- head/lib/libxo/tests/encoder/Makefile Mon Dec 16 21:52:12 2019 (r355825) +++ head/lib/libxo/tests/encoder/Makefile Mon Dec 16 22:05:03 2019 (r355826) @@ -12,7 +12,7 @@ SYMLINKS+= ${LIBDIR}/${SHLIB_NAME} /usr/lib/libxo/enco SRCS= enc_test.c -CFLAGS+= -I${LIBXOSRC}/libxo +CFLAGS+= -I${LIBXOSRC}/libxo -I${.CURDIR:H:H}/libxo LIBADD= xo Modified: head/usr.bin/xo/Makefile ============================================================================== --- head/usr.bin/xo/Makefile Mon Dec 16 21:52:12 2019 (r355825) +++ head/usr.bin/xo/Makefile Mon Dec 16 22:05:03 2019 (r355826) @@ -14,7 +14,7 @@ MAN= xo.1 CFLAGS+=-I${LIBXOSRC}/libxo # XXX For xo_config.h -CFLAGS+=-I${SRCTOP}/lib/libxo +CFLAGS+=-I${SRCTOP}/lib/libxo/libxo LIBADD= xo util
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201912162205.xBGM534s014645>