Skip to content

Commit

Permalink
Refactor Makefile.am files even more
Browse files Browse the repository at this point in the history
  • Loading branch information
kcudnik committed Aug 21, 2021
1 parent c91b117 commit f40a168
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 21 deletions.
7 changes: 2 additions & 5 deletions saiasiccmp/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@ saiasiccmp_SOURCES = main.cpp
saiasiccmp_CPPFLAGS = $(CODE_COVERAGE_CPPFLAGS)
saiasiccmp_CXXFLAGS = $(DBGFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS_COMMON) $(CODE_COVERAGE_CXXFLAGS)
saiasiccmp_LDADD = libAsicCmp.a \
-lsaimetadata -lsaimeta -ldl -lhiredis -lswsscommon -lpthread -lzmq \
-L$(top_srcdir)/meta/.libs \
$(top_srcdir)/syncd/libSyncd.a \
$(top_srcdir)/lib/src/libSaiRedis.a \
$(CODE_COVERAGE_LIBS)
-ldl -lhiredis -lswsscommon -lpthread -L$(top_srcdir)/meta/.libs -lsaimetadata -lsaimeta -lzmq \
$(top_srcdir)/syncd/libSyncd.a $(top_srcdir)/lib/src/libSaiRedis.a $(CODE_COVERAGE_LIBS)

TESTS = test.sh
3 changes: 2 additions & 1 deletion saidiscovery/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ saidiscovery_SOURCES = saidiscovery.cpp

saidiscovery_CPPFLAGS = $(CODE_COVERAGE_CPPFLAGS)
saidiscovery_CXXFLAGS = $(DBGFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS_COMMON) $(CODE_COVERAGE_CXXFLAGS)
saidiscovery_LDADD = -lhiredis -lswsscommon $(top_srcdir)/syncd/libSyncd.a $(SAILIB) -lpthread -L$(top_srcdir)/meta/.libs -lsaimetadata -lsaimeta -lzmq $(CODE_COVERAGE_LIBS)
saidiscovery_LDADD = -lhiredis -lswsscommon $(top_srcdir)/syncd/libSyncd.a $(SAILIB) -lpthread \
-L$(top_srcdir)/meta/.libs -lsaimetadata -lsaimeta -lzmq $(CODE_COVERAGE_LIBS)
3 changes: 2 additions & 1 deletion saidump/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ bin_PROGRAMS = saidump
saidump_SOURCES = saidump.cpp
saidump_CPPFLAGS = $(CODE_COVERAGE_CPPFLAGS)
saidump_CXXFLAGS = $(DBGFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS_COMMON) $(CODE_COVERAGE_CXXFLAGS)
saidump_LDADD = -lhiredis -lswsscommon -lpthread -L$(top_srcdir)/meta/.libs -lsaimetadata -lsaimeta -L$(top_srcdir)/lib/src/.libs -lsairedis -lzmq $(CODE_COVERAGE_LIBS)
saidump_LDADD = -lhiredis -lswsscommon -lpthread -L$(top_srcdir)/meta/.libs -lsaimetadata -lsaimeta \
-L$(top_srcdir)/lib/src/.libs -lsairedis -lzmq $(CODE_COVERAGE_LIBS)
6 changes: 4 additions & 2 deletions syncd/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ libSyncd_a_CXXFLAGS = $(DBGFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS_COMMON) $(CODE_COVER
syncd_SOURCES = main.cpp
syncd_CPPFLAGS = $(CODE_COVERAGE_CPPFLAGS)
syncd_CXXFLAGS = $(DBGFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS_COMMON) $(CODE_COVERAGE_CXXFLAGS)
syncd_LDADD = libSyncd.a $(top_srcdir)/lib/src/libSaiRedis.a -L$(top_srcdir)/meta/.libs -lsaimetadata -lsaimeta -ldl -lhiredis -lswsscommon $(SAILIB) -lpthread -lzmq $(CODE_COVERAGE_LIBS)
syncd_LDADD = libSyncd.a $(top_srcdir)/lib/src/libSaiRedis.a -L$(top_srcdir)/meta/.libs -lsaimetadata -lsaimeta \
-ldl -lhiredis -lswsscommon $(SAILIB) -lpthread -lzmq $(CODE_COVERAGE_LIBS)

if SAITHRIFT
libSyncd_a_CXXFLAGS += -DSAITHRIFT=yes
Expand Down Expand Up @@ -86,6 +87,7 @@ syncd_request_shutdown_LDADD = libSyncdRequestShutdown.a $(top_srcdir)/lib/src/l

tests_SOURCES = tests.cpp
tests_CXXFLAGS = $(DBGFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS_COMMON)
tests_LDADD = libSyncd.a -lhiredis -lswsscommon -lpthread -L$(top_srcdir)/lib/src/.libs -lsairedis -L$(top_srcdir)/meta/.libs -lsaimetadata -lsaimeta -lzmq $(CODE_COVERAGE_LIBS)
tests_LDADD = libSyncd.a -lhiredis -lswsscommon -lpthread -L$(top_srcdir)/lib/src/.libs -lsairedis \
-L$(top_srcdir)/meta/.libs -lsaimetadata -lsaimeta -lzmq $(CODE_COVERAGE_LIBS)

TESTS = tests
18 changes: 7 additions & 11 deletions tests/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ SAILIB=-L$(top_srcdir)/vslib/src/.libs -lsaivs
vssyncd_SOURCES = main.cpp
vssyncd_CPPFLAGS = $(CODE_COVERAGE_CPPFLAGS)
vssyncd_CXXFLAGS = $(DBGFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS_COMMON) $(CODE_COVERAGE_CXXFLAGS)
vssyncd_LDADD = $(top_srcdir)/syncd/libSyncd.a $(top_srcdir)/lib/src/libSaiRedis.a \
-lhiredis -lswsscommon $(SAILIB) -lpthread \
-L$(top_srcdir)/meta/.libs -lsaimetadata -lsaimeta -ldl -lzmq $(CODE_COVERAGE_LIBS)
vssyncd_LDADD = $(top_srcdir)/syncd/libSyncd.a $(top_srcdir)/lib/src/libSaiRedis.a \
-lhiredis -lswsscommon $(SAILIB) -lpthread \
-L$(top_srcdir)/meta/.libs -lsaimetadata -lsaimeta -ldl -lzmq $(CODE_COVERAGE_LIBS)

if SAITHRIFT
vssyncd_LDADD += -lrpcserver -lthrift
Expand All @@ -18,17 +18,13 @@ endif
tests_SOURCES = tests.cpp
tests_CXXFLAGS = $(DBGFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS_COMMON)
tests_LDADD = -lhiredis -lswsscommon -lpthread \
$(top_srcdir)/lib/src/libsairedis.la \
$(top_srcdir)/syncd/libSyncd.a \
-L$(top_srcdir)/meta/.libs \
-lsaimetadata -lsaimeta -lzmq $(CODE_COVERAGE_LIBS)
$(top_srcdir)/lib/src/libsairedis.la $(top_srcdir)/syncd/libSyncd.a \
-L$(top_srcdir)/meta/.libs -lsaimetadata -lsaimeta -lzmq $(CODE_COVERAGE_LIBS)

testclient_SOURCES = testclient.cpp
testclient_CXXFLAGS = $(DBGFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS_COMMON)
testclient_LDADD = -lhiredis -lswsscommon -lpthread \
$(top_srcdir)/lib/src/libsairedis.la \
$(top_srcdir)/syncd/libSyncd.a \
-L$(top_srcdir)/meta/.libs \
-lsaimetadata -lsaimeta -lzmq $(CODE_COVERAGE_LIBS)
$(top_srcdir)/lib/src/libsairedis.la $(top_srcdir)/syncd/libSyncd.a \
-L$(top_srcdir)/meta/.libs -lsaimetadata -lsaimeta -lzmq $(CODE_COVERAGE_LIBS)

TESTS = aspellcheck.pl conflictnames.pl swsslogentercheck.sh checkwhitespace.sh tests BCM56850.pl MLNX2700.pl
2 changes: 1 addition & 1 deletion tests/checkwhitespace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

echo Checkig for white spaces ...

find .. -type f | grep -v SAI/ | perl -ne 'print if /\.(c|cpp|h|hpp|am|sh|pl|pm|install|dirs|links|json|ini|yml|pws|md|py|cfg|conf|i|ac)$/' | xargs grep -P "\\s\$"
find .. -type f | grep -v SAI/ |grep -f _wrap.cpp| perl -ne 'print if /\.(c|cpp|h|hpp|am|sh|pl|pm|install|dirs|links|json|ini|yml|pws|md|py|cfg|conf|i|ac)$/' | xargs grep -P "\\s\$"

if [ $? -eq 0 ]; then
echo ERROR: some files contain white spaces at the end of line, please fix
Expand Down

0 comments on commit f40a168

Please sign in to comment.