Skip to content

Commit

Permalink
Don't use top_srcdir but srcdir. More portable to be included as subm…
Browse files Browse the repository at this point in the history
…odule.
  • Loading branch information
Guillaume Marçais committed Jun 27, 2015
1 parent b245689 commit cf5e936
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = jellyfish-2.0.pc

AM_LDFLAGS = -lpthread # $(VALGRIND_LIBS)
AM_CPPFLAGS = -Wall -Wnon-virtual-dtor -I$(top_srcdir) -I$(top_srcdir)/include -g -O3 $(VALGRIND_CFLAGS)
AM_CPPFLAGS = -Wall -Wnon-virtual-dtor -I$(srcdir) -I$(srcdir)/include -g -O3 $(VALGRIND_CFLAGS)
AM_CXXFLAGS = $(ALL_CXXFLAGS) -g -O3

noinst_HEADERS = $(YAGGO_SOURCES)
Expand Down Expand Up @@ -204,13 +204,13 @@ bin_test_all_SOURCES = unit_tests/test_main.cc \
bin_test_all_SOURCES += jellyfish/backtrace.cc

bin_test_all_CPPFLAGS = -Dprotected=public -Dprivate=public -DJSON_IS_AMALGAMATION=1
bin_test_all_CXXFLAGS = $(AM_CXXFLAGS) -I$(top_srcdir)/unit_tests/gtest/include -I$(top_srcdir)/unit_tests -I$(top_srcdir)/include
bin_test_all_CXXFLAGS = $(AM_CXXFLAGS) -I$(srcdir)/unit_tests/gtest/include -I$(srcdir)/unit_tests -I$(srcdir)/include
bin_test_all_LDADD = libgtest.la $(LDADD)
YAGGO_SOURCES += unit_tests/test_main_cmdline.hpp
noinst_HEADERS += unit_tests/test_main.hpp

include gtest.mk
-include $(top_srcdir)/development.mk
-include $(srcdir)/development.mk

# Print the value of a variable
print-%:
Expand Down
8 changes: 4 additions & 4 deletions development.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ AM_CXXFLAGS += -Werror
cloc:
cloc --force-lang="Ruby,yaggo" --force-lang="make,am" --force-lang="make,mk" \
--exclude-dir="gtest" --ignored=cloc_ignored_src_files \
$(top_srcdir)/jellyfish $(top_srcdir)/include $(top_srcdir)/lib $(top_srcdir)/sub_commands $(top_srcdir)/tests $(top_srcdir)/unit_tests \
$(top_srcdir)/Makefile.am $(top_srcdir)/*.mk
$(srcdir)/jellyfish $(srcdir)/include $(srcdir)/lib $(srcdir)/sub_commands $(srcdir)/tests $(srcdir)/unit_tests \
$(srcdir)/Makefile.am $(srcdir)/*.mk

cloc_jellyfish:
cloc $(top_srcdir)/jellyfish $(top_srcdir)/include $(top_srcdir)/lib $(top_srcdir)/sub_commands
cloc $(srcdir)/jellyfish $(srcdir)/include $(srcdir)/lib $(srcdir)/sub_commands

cloc_library:
cloc $(top_srcdir)/include $(top_srcdir)/lib
cloc $(srcdir)/include $(srcdir)/lib

# Make a dependency on yaggo the software
$(YAGGO_SOURCES): $(YAGGO)
Expand Down
4 changes: 2 additions & 2 deletions gtest.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ check_LTLIBRARIES = libgtest.la libgtest_main.la
libgtest_la_SOURCES = unit_tests/gtest/src/gtest-all.cc
libgtest_main_la_SOURCES = unit_tests/gtest/src/gtest_main.cc
libgtest_main_la_LIBADD = libgtest.la
libgtest_la_CXXFLAGS = -I$(top_srcdir)/unit_tests
libgtest_main_la_CXXFLAGS = -I$(top_srcdir)/unit_tests
libgtest_la_CXXFLAGS = -I$(srcdir)/unit_tests
libgtest_main_la_CXXFLAGS = -I$(srcdir)/unit_tests

GTEST_SRC = unit_tests/gtest/src/gtest-all.cc \
unit_tests/gtest/src/gtest_main.cc \
Expand Down

0 comments on commit cf5e936

Please sign in to comment.