OISF / libhtp

LibHTP is a security-aware parser for the HTTP protocol and the related bits and pieces.
BSD 3-Clause "New" or "Revised" License
289 stars 115 forks source link

test/Makefile.am causes automake warnings #62

Closed calfeld-zz closed 10 years ago

calfeld-zz commented 11 years ago

Automake is moving towards a different default for subdirs-objects (off vs on) and issuing warnings for any Makefile that would be impacted and doesn't explicitly set it. This includes libhtp. To fix, change test/Makefile.am to:

LDADD = $(top_builddir)/htp/.libs/libhtp.a -lz @LIBICONV@ 
AM_CFLAGS = -g -std=gnu99
AM_CPPFLAGS = -I$(top_srcdir) -I$(top_builddir)/htp -Wno-write-strings
EXTRA_DIST = files
AUTOMAKE_OPTIONS = subdir-objects

check_PROGRAMS = test_all
check_LIBRARIES = libgtest.a

test_all_SOURCES = test_bstr.cpp test_gunzip.cpp test_hybrid.cpp test_main.cpp test_multipart.cpp test.c test.h test_utils.cpp
test_all_LDADD = libgtest.a -lpthread $(LDADD)

libgtest_a_SOURCES = gtest/gtest-all.cc gtest/gtest_main.cc gtest/gtest.h

TESTS_ENVIRONMENT = srcdir=$(srcdir)/files
TESTS = test_all

test: check
    @echo

test-compile-only: all-am
    $(MAKE) $(AM_MAKEFLAGS) $(check_LIBRARIES)
    $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)

check-compile-only: all-am
    $(MAKE) $(AM_MAKEFLAGS) $(check_LIBRARIES)
    $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)

That is, add AUTOMAKE_OPTIONS = subdir-objects and remove the unnecessary $(srcdir)/ before each libgtest_a_SOURCES.

ivanr commented 10 years ago

Hi Chris,

I had fixed that about a month ago, and before you opened the issue:

https://github.com/ironbee/libhtp/commit/b4a6f97825b27194fe37cc073dd365a135a31ae8

Can you please check that the latest from the 0.5.x branch work for you? Or is there something else wrong?

ironbee commented 10 years ago

Hi Ivan,

My bad. 0.5.x master looks good.

Thanks, c.

Christopher Alfeld | calfeld@qualys.com Director of Research Qualys, Inc. | Continuous Security | www.qualys.com http://www.qualys.comDirect: 650.801.7776 | Mobile: 608.628.4512

On Mon, Nov 18, 2013 at 11:01 AM, Ivan Ristić notifications@github.comwrote:

Hi Chris,

I had fixed that about a month ago, and before you opened the issue:

b4a6f97https://github.com/ironbee/libhtp/commit/b4a6f97825b27194fe37cc073dd365a135a31ae8

Can you please check that the latest from the 0.5.x branch work for you? Or is there something else wrong?

— Reply to this email directly or view it on GitHubhttps://github.com/ironbee/libhtp/issues/62#issuecomment-28716295 .