Brad Fitzpatrick (brad) wrote,
Brad Fitzpatrick

memcached autoconf/automake help

I don't want this to turn into an "Autotools sucks!" thread. I just want help....

  • I want "make test" to run against a binary that has assert() enabled (AM_CFLAGS not containing "-DNDEBUG").
  • I want users to have a choice to run a binary with asserts on or off. CPU vs. paranoia trade-off. Whether this is building two binaries and installing them both on the system, or letting them choose with --without-asserts or --with-asserts, I don't care.
What's the best way to do this?
Are there best practices regarding similar things? (testing with asserts on, regardless of their ultimate choice)

Here's my current
bin_PROGRAMS = memcached memcached_SOURCES = memcached.c slabs.c items.c memcached.h assoc.c memcached_LDADD = @LIBOBJS@ SUBDIRS = doc DIST_DIRS = scripts EXTRA_DIST = doc scripts TODO t test: memcached prove t # Uncomment the following to save some CPU (by disabling assertions) #AM_CFLAGS=-DNDEBUG dist-hook: rm -rf $(distdir)/doc/.svn/ rm -rf $(distdir)/scripts/.svn/ rm -rf $(distdir)/t/.svn/ rm -rf $(distdir)/t/lib/.svn/
Tags: lazyweb, tech

  • Happy Birthday!

    Happy 20th Birthday, LiveJournal! 🐐🎂🎉

  • hi

    Posting from the iPhone app. Maybe I'm unblocked now.

  • Why, hello...

    Long time no see. How's my baby doing?

  • Post a new comment


    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.