Browse Source

[master] Hopefully fix Makefile

It failed to build a test, because the file was generated in another
directory and probably didn't yet exist at the time.
Michal 'vorner' Vaner 14 years ago
parent
commit
86ab4d3fab
1 changed files with 7 additions and 0 deletions
  1. 7 0
      src/bin/auth/tests/Makefile.am

+ 7 - 0
src/bin/auth/tests/Makefile.am

@@ -16,6 +16,12 @@ CLEANFILES = *.gcno *.gcda
 
 
 TESTS =
 TESTS =
 if HAVE_GTEST
 if HAVE_GTEST
+../spec_config.h: ../spec_config.h.pre
+	$(SED) -e "s|@@LOCALSTATEDIR@@|$(localstatedir)|" spec_config.h.pre >$@
+
+CLEANFILES += ../spec_config.h
+
+BUILT_SOURCES = ../spec_config.h
 TESTS += run_unittests
 TESTS += run_unittests
 run_unittests_SOURCES = $(top_srcdir)/src/lib/dns/tests/unittest_util.h
 run_unittests_SOURCES = $(top_srcdir)/src/lib/dns/tests/unittest_util.h
 run_unittests_SOURCES += $(top_srcdir)/src/lib/dns/tests/unittest_util.cc
 run_unittests_SOURCES += $(top_srcdir)/src/lib/dns/tests/unittest_util.cc
@@ -25,6 +31,7 @@ run_unittests_SOURCES += ../change_user.h ../change_user.cc
 run_unittests_SOURCES += ../auth_config.h ../auth_config.cc
 run_unittests_SOURCES += ../auth_config.h ../auth_config.cc
 run_unittests_SOURCES += ../command.h ../command.cc
 run_unittests_SOURCES += ../command.h ../command.cc
 run_unittests_SOURCES += ../common.h ../common.cc
 run_unittests_SOURCES += ../common.h ../common.cc
+run_unittests_SOURCES += ../spec_config.h
 run_unittests_SOURCES += ../statistics.h ../statistics.cc
 run_unittests_SOURCES += ../statistics.h ../statistics.cc
 run_unittests_SOURCES += auth_srv_unittest.cc
 run_unittests_SOURCES += auth_srv_unittest.cc
 run_unittests_SOURCES += config_unittest.cc
 run_unittests_SOURCES += config_unittest.cc