Skip to content

Commit

Permalink
Merge pull request #2 from p4lang/cdodd
Browse files Browse the repository at this point in the history
Include addconfig.ac from backends/extensions directories in configur…
  • Loading branch information
ChrisDodd committed Apr 6, 2016
2 parents 714b9ac + b761ff6 commit 58fb6da
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
6 changes: 5 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ include $(srcdir)/midend/Makefile.am
# The following file is generated by a script.
include $(srcdir)/otherMakefiles.am

$(srcdir)/otherMakefiles.am: $(srcdir)/backends $(srcdir)/extensions $(wildcard $(srcdir)/backends/*/Makefile.am $(srcdir)/extensions/*/Makefile.am)
cd $(srcdir); ./find-makefiles.sh


######## Generate C++ IR files from *.def files using ir-generator

# make is very stupid regarding multiple files generated from the same source
Expand Down Expand Up @@ -76,7 +80,7 @@ clean-local:
-rm -f $(BUILT_SOURCES) $(CLEANFILES)

cpplint:
cd $(srcdir); tools/cpplint.py --extensions=h,hpp,c,cpp,ypp,l $(sort $(cpplint_FILES))
@cd $(srcdir); tools/cpplint.py --extensions=h,hpp,c,cpp,ypp,l $(sort $(cpplint_FILES))

tags:
cd $(srcdir); ctags -R --langmap=C++:+.def,Flex:+.l,YACC:+.ypp \
Expand Down
2 changes: 1 addition & 1 deletion bootstrap.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
set -e
./find-makefiles.sh
mkdir -p extensions
echo "Running autoconf/configure tools"
autoreconf -i
mkdir -p build
Expand Down
8 changes: 8 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,12 @@ AC_CHECK_LIB([gmpxx], [__gmpz_init], [], [AC_MSG_ERROR([GNU MP not found])])
AC_SUBST(P4INCLUDE, $prefix/p4include)

AC_CONFIG_FILES([Makefile setup.h])

m4_foreach_w([ac_file],m4_esyscmd([echo backends/*/addconfig.ac extensions/*/addconfig.ac]),
[[#]] config from ac_file
[sinclude(]ac_file[)]
[[#]] end of ac_file
)
AC_OUTPUT

0 comments on commit 58fb6da

Please sign in to comment.