commit 40de210a716dc3b8dd4116cda482c851eac44d4f from: Thomas Adam date: Tue Aug 29 16:31:10 2023 UTC portable: enable gotctl (via --enable-gotd) This builds gotctl, for the moment via --enable-gotd commit - 52daa6ad930882d88e621503559fcb23baad5d7b commit + 40de210a716dc3b8dd4116cda482c851eac44d4f blob - 3e1b5a6503253dd7ff37dc4d1307370d0718aee1 blob + 01a30d765e4c2cfac5ffe27e0d8f3ac9b8a9ebf1 --- .gitignore +++ .gitignore @@ -30,6 +30,7 @@ cvg/cvg etc/* got/got gotadmin/gotadmin +gotctl/gotctl gotd/gotd gotd/parse.c gotsh/gotsh blob - 9ca4c3b786661579be30e922d756cf814b4885e9 blob + 17ea73cf28be7bd7139e31a4f3774bd84830eb25 --- Makefile.am +++ Makefile.am @@ -2,7 +2,7 @@ SUBDIRS = compat libexec got tog gotadmin template got # TODO: gotd gotsh template if GOTD_ENABLED -SUBDIRS += gotd gotsh +SUBDIRS += gotd gotsh gotctl endif include $(top_builddir)/Makefile.common blob - f2a2bfa6532702ab19ed14aa09e496b67ebe6322 blob + 3439c32ecd69b1f62d1db6f70f293597a96be1f4 --- configure.ac +++ configure.ac @@ -902,6 +902,7 @@ AC_CONFIG_FILES([Makefile if test "x$enable_gotd" = "xyes"; then AC_CONFIG_FILES([gotd/Makefile]) AC_CONFIG_FILES([gotsh/Makefile]) + AC_CONFIG_FILES([gotctl/Makefile]) fi AC_OUTPUT blob - b3688e05a41671c5424eccd960798be8f074df6f (mode 644) blob + /dev/null --- gotctl/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -.PATH:${.CURDIR}/../lib ${.CURDIR}/../gotd - -.include "../got-version.mk" - -PROG= gotctl -SRCS= gotctl.c error.c imsg.c object_qid.c path.c \ - pollfd.c hash.c - -MAN = ${PROG}.8 - -CPPFLAGS = -I${.CURDIR}/../include -I${.CURDIR}/../lib -I${.CURDIR}/../gotd - -.if defined(PROFILE) -LDADD = -lutil_p -levent_p -.else -LDADD = -lutil -levent -.endif -DPADD = ${LIBUTIL} ${LIBEVENT} - -.if ${GOT_RELEASE} != "Yes" -NOMAN = Yes -.else -BINDIR = ${PREFIX}/sbin -.endif - -realinstall: - ${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} \ - -m ${BINMODE} ${PROG} ${BINDIR}/${PROG} - -.include blob - /dev/null blob + f4b64e007cfd19651676454bbf4937d33a2a4cda (mode 644) --- /dev/null +++ gotctl/Makefile.am @@ -0,0 +1,26 @@ +bin_PROGRAMS = gotctl + +include $(top_builddir)/Makefile.common + +AM_CPPFLAGS += -I$(top_builddir)/gotd + +gotctl_SOURCES = gotctl.c \ + $(top_srcdir)/gotd/imsg.c \ + $(top_srcdir)/lib/error.c \ + $(top_srcdir)/lib/gitproto.c \ + $(top_srcdir)/lib/path.c \ + $(top_srcdir)/lib/pkt.c \ + $(top_srcdir)/lib/pollfd.c \ + $(top_srcdir)/lib/reference_parse.c \ + $(top_srcdir)/lib/serve.c \ + $(top_srcdir)/lib/sha1.c + +gotctl_DEPENDENCIES = $(top_builddir)/compat/libopenbsd-compat.a +EXTRA_DIST = gotctl.8 + +man8_MANS = gotctl.8 + +LDADD = -L$(top_builddir)/compat -L$(top_builddir)/gotd -lopenbsd-compat -lm +if HOST_FREEBSD +LDADD += -lmd +endif