Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixup various bits of incorrect automake usage #393

Merged
merged 1 commit into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion cbt/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ sbin_PROGRAMS = cbt-util
noinst_LTLIBRARIES = libcbtutil.la

libcbtutil_la_SOURCES = cbt-util.c
libcbtutil_la_LIBADD = -luuid

cbt_util_SOURCES = main.c
cbt_util_LDADD = libcbtutil.la -lrt -luuid
cbt_util_LDADD = libcbtutil.la

clean-local:
-rm -rf *.gc??
5 changes: 3 additions & 2 deletions mockatests/cbt/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/cbt -I../include
check_PROGRAMS = test-cbt-util
TESTS = test-cbt-util

test_cbt_util_LDADD = $(top_srcdir)/cbt/libcbtutil.la ../wrappers/libwrappers.la

test_cbt_util_SOURCES = test-cbt-util.c test-cbt-util-commands.c test-cbt-util-set.c test-cbt-util-get.c test-cbt-util-create.c test-cbt-util-coalesce.c
test_cbt_util_LDFLAGS = $(top_srcdir)/cbt/libcbtutil.la -lcmocka -luuid
test_cbt_util_LDFLAGS += ../wrappers/libwrappers.la
test_cbt_util_LDFLAGS = -lcmocka
test_cbt_util_LDFLAGS += -Wl,--wrap=fopen,--wrap=fclose
test_cbt_util_LDFLAGS += -Wl,--wrap=malloc,--wrap=free,--wrap=calloc
# Need to wrap both of these as rpmbuild/mock set -D_FORTIFY_SOURCE=2
Expand Down
6 changes: 3 additions & 3 deletions mockatests/control/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/control -I../include
check_PROGRAMS = test-control
TESTS = test-control

test_control_SOURCES = test-control.c test-tap-ctl-free.c test-tap-ctl-allocate.c test-tap-ctl-close.c test-tap-ctl-list.c control-wrappers.c util.c
test_control_LDFLAGS = $(top_srcdir)/control/libblktapctl.la -lcmocka -luuid
test_control_LDADD = $(top_srcdir)/control/libblktapctl.la ../wrappers/libwrappers.la

test_control_SOURCES = test-control.c test-tap-ctl-free.c test-tap-ctl-allocate.c test-tap-ctl-close.c test-tap-ctl-list.c control-wrappers.c util.c
test_control_LDFLAGS = -lcmocka
test_control_LDFLAGS += -static-libtool-libs
test_control_LDFLAGS += ../wrappers/libwrappers.la
# Would be good to use the cmocka malloc wraps but looks like maybe strdup doesn't call malloc
#test_control_LDFLAGS += -Wl,--wrap=malloc,--wrap=free
test_control_LDFLAGS += -Wl,--wrap=socket,--wrap=connect,--wrap=read,--wrap=select,--wrap=write,--wrap=fdopen
Expand Down
4 changes: 3 additions & 1 deletion mockatests/drivers/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/drivers -I../include
check_PROGRAMS = test-drivers
TESTS = test-drivers

test_drivers_LDADD = $(top_srcdir)/drivers/libtapdisk.la

test_drivers_SOURCES = test-drivers.c test-tapdisk-stats.c test-tapdisk-vbd.c vbd-wrappers.c test-tapdisk-nbdserver.c
test_drivers_LDFLAGS = $(top_srcdir)/drivers/libtapdisk.la -lcmocka -luuid
test_drivers_LDFLAGS = -lcmocka
test_drivers_LDFLAGS += -Wl,--wrap=tapdisk_image_check_request
test_drivers_LDFLAGS += -Wl,--wrap=td_queue_block_status
test_drivers_LDFLAGS += -Wl,--wrap=send
Expand Down
4 changes: 3 additions & 1 deletion mockatests/vhd/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/cbt -I../include
check_PROGRAMS = test-vhd-util
TESTS = test-vhd-util

test_vhd_util_LDADD = $(top_srcdir)/vhd/lib/libvhd.la

test_vhd_util_SOURCES = test-vhd-util.c test-vhd-util-snapshot.c test-canonpath.c test-vhd-util-utilities.c vhd-wrappers.c
test_vhd_util_LDFLAGS = $(top_srcdir)/vhd/lib/libvhd.la -lcmocka -luuid
test_vhd_util_LDFLAGS = -lcmocka
test_vhd_util_LDFLAGS += -static-libtool-libs
test_vhd_util_LDFLAGS += -Wl,--wrap=free,--wrap=malloc,--wrap=realloc
test_vhd_util_LDFLAGS += -Wl,--wrap=canonpath
Expand Down