From b9e4aa54ca55b7ee078f8a6159ed38079c8a0237 Mon Sep 17 00:00:00 2001 From: Stephen Sinclair Date: Thu, 4 Feb 2016 14:35:33 -0300 Subject: Install the pkg-config (.pc) file. Renames it from librtmidi to just rtmidi. --- Makefile.am | 3 +++ configure.ac | 2 +- librtmidi.pc.in | 12 ------------ rtmidi.pc.in | 12 ++++++++++++ 4 files changed, 16 insertions(+), 13 deletions(-) delete mode 100644 librtmidi.pc.in create mode 100644 rtmidi.pc.in diff --git a/Makefile.am b/Makefile.am index 706daf0..2ce8a89 100644 --- a/Makefile.am +++ b/Makefile.am @@ -5,3 +5,6 @@ lib_LTLIBRARIES = %D%/librtmidi.la %D%/RtMidi.h \ %D%/rtmidi_c.cpp \ %D%/rtmidi_c.h + +pkgconfigdatadir = $(libdir)/pkgconfig +pkgconfigdata_DATA = rtmidi.pc diff --git a/configure.ac b/configure.ac index a52ddb0..f789e5e 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_INIT(RtMidi, 2.1.0, gary@music.mcgill.ca, rtmidi) AC_CONFIG_AUX_DIR(config) AC_CONFIG_SRCDIR(RtMidi.cpp) -AC_CONFIG_FILES([rtmidi-config librtmidi.pc Makefile tests/Makefile]) +AC_CONFIG_FILES([rtmidi-config rtmidi.pc Makefile tests/Makefile]) AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects]) # Enable some nice automake features if they are available diff --git a/librtmidi.pc.in b/librtmidi.pc.in deleted file mode 100644 index d309906..0000000 --- a/librtmidi.pc.in +++ /dev/null @@ -1,12 +0,0 @@ -prefix=@prefix@ -exec_prefix=${prefix} -libdir=${exec_prefix}/lib -includedir=${prefix}/include - -Name: librtmidi -Description: RtMidi - a set of C++ classes that provide a common API for realtime MIDI input/output -Version: 2.1.0 -Requires: @req@ -Libs: -L${libdir} -lrtmidi -Libs.private: -lpthread -Cflags: -pthread -I${includedir} @CPPFLAGS@ \ No newline at end of file diff --git a/rtmidi.pc.in b/rtmidi.pc.in new file mode 100644 index 0000000..d309906 --- /dev/null +++ b/rtmidi.pc.in @@ -0,0 +1,12 @@ +prefix=@prefix@ +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: librtmidi +Description: RtMidi - a set of C++ classes that provide a common API for realtime MIDI input/output +Version: 2.1.0 +Requires: @req@ +Libs: -L${libdir} -lrtmidi +Libs.private: -lpthread +Cflags: -pthread -I${includedir} @CPPFLAGS@ \ No newline at end of file -- cgit v1.2.3 From e13f84bf098292c7423ee0343a48d8aa63a39128 Mon Sep 17 00:00:00 2001 From: Stephen Sinclair Date: Thu, 4 Feb 2016 14:51:55 -0300 Subject: Install header files. --- Makefile.am | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 2ce8a89..970459d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,8 +2,11 @@ lib_LTLIBRARIES = %D%/librtmidi.la %C%_librtmidi_la_LDFLAGS = -no-undefined %C%_librtmidi_la_SOURCES = \ %D%/RtMidi.cpp \ + %D%/rtmidi_c.cpp + +rtmidi_incdir = $(includedir) +rtmidi_inc_HEADERS = \ %D%/RtMidi.h \ - %D%/rtmidi_c.cpp \ %D%/rtmidi_c.h pkgconfigdatadir = $(libdir)/pkgconfig -- cgit v1.2.3 From 6621cfd22a53a84d1780bfb8543b7e4c81b8363b Mon Sep 17 00:00:00 2001 From: Stephen Sinclair Date: Thu, 4 Feb 2016 15:05:30 -0300 Subject: Move headers install path to ${prefix}/include/rtmidi --- Makefile.am | 2 +- configure.ac | 2 +- rtmidi.pc.in | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile.am b/Makefile.am index 970459d..e71e3cd 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4,7 +4,7 @@ lib_LTLIBRARIES = %D%/librtmidi.la %D%/RtMidi.cpp \ %D%/rtmidi_c.cpp -rtmidi_incdir = $(includedir) +rtmidi_incdir = $(includedir)/rtmidi rtmidi_inc_HEADERS = \ %D%/RtMidi.h \ %D%/rtmidi_c.h diff --git a/configure.ac b/configure.ac index f789e5e..0dd978c 100644 --- a/configure.ac +++ b/configure.ac @@ -38,7 +38,7 @@ AC_ARG_ENABLE(debug, # Set paths if prefix is defined if test "x$prefix" != "x" && test "x$prefix" != "xNONE"; then LIBS="$LIBS -L$prefix/lib" - CPPFLAGS="$CPPFLAGS -I$prefix/include" + CPPFLAGS="$CPPFLAGS -I$prefix/include/rtmidi" fi # For -I and -D flags diff --git a/rtmidi.pc.in b/rtmidi.pc.in index d309906..c94652b 100644 --- a/rtmidi.pc.in +++ b/rtmidi.pc.in @@ -1,7 +1,7 @@ prefix=@prefix@ exec_prefix=${prefix} libdir=${exec_prefix}/lib -includedir=${prefix}/include +includedir=${prefix}/include/rtmidi Name: librtmidi Description: RtMidi - a set of C++ classes that provide a common API for realtime MIDI input/output -- cgit v1.2.3 From f8dac33707c68284be2e1750f08fb11f97e5c4af Mon Sep 17 00:00:00 2001 From: Stephen Sinclair Date: Thu, 4 Feb 2016 18:02:34 -0300 Subject: Build tests and docs via automake and add them to dist. --- Makefile.am | 10 ++++++++++ configure.ac | 6 +++++- doc/Makefile.am | 31 +++++++++++++++++++++++++++++++ tests/Makefile.am | 22 ++++++++++++++++++++++ tests/Makefile.in | 49 ------------------------------------------------- 5 files changed, 68 insertions(+), 50 deletions(-) create mode 100644 doc/Makefile.am create mode 100644 tests/Makefile.am delete mode 100644 tests/Makefile.in diff --git a/Makefile.am b/Makefile.am index e71e3cd..19fbacd 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,3 +1,8 @@ +SUBDIRS = . tests +if MAKE_DOC +SUBDIRS += doc +endif + lib_LTLIBRARIES = %D%/librtmidi.la %C%_librtmidi_la_LDFLAGS = -no-undefined %C%_librtmidi_la_SOURCES = \ @@ -11,3 +16,8 @@ rtmidi_inc_HEADERS = \ pkgconfigdatadir = $(libdir)/pkgconfig pkgconfigdata_DATA = rtmidi.pc + +EXTRA_DIST = autogen.sh readme doc msw + +dist-hook: + $(MAKE) -C doc diff --git a/configure.ac b/configure.ac index 0dd978c..bcaada8 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_INIT(RtMidi, 2.1.0, gary@music.mcgill.ca, rtmidi) AC_CONFIG_AUX_DIR(config) AC_CONFIG_SRCDIR(RtMidi.cpp) -AC_CONFIG_FILES([rtmidi-config rtmidi.pc Makefile tests/Makefile]) +AC_CONFIG_FILES([rtmidi-config rtmidi.pc Makefile tests/Makefile doc/Makefile]) AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects]) # Enable some nice automake features if they are available @@ -55,6 +55,10 @@ fi CXXFLAGS="$CXXFLAGS $cxxflag" +# Checks for doxygen +AC_CHECK_PROG( DOXYGEN, [doxygen], [doxygen] ) +AM_CONDITIONAL( MAKE_DOC, [test "x${DOXYGEN}" != x] ) + # Checks for package options and external software AC_CANONICAL_HOST diff --git a/doc/Makefile.am b/doc/Makefile.am new file mode 100644 index 0000000..6a52d94 --- /dev/null +++ b/doc/Makefile.am @@ -0,0 +1,31 @@ + +MAINTAINERCLEANFILES=Makefile.in + +CLEANFILES=doxygen-build.stamp + +DOX=Doxyfile + +EXTRA_DIST=html + +INSTIMAGES=html/doxygen.png + +DOC_STAMPS=html-build.stamp + +DOC_DIR=$(HTML_DIR) + +all-local: doxygen-build.stamp + +doxygen-build.stamp: doxygen/$(DOX) $(top_srcdir)/RtMidi.h $(top_srcdir)/rtmidi_c.h + @echo '*** Running doxygen ***' + cd doxygen; $(DOXYGEN) $(DOX) + touch doxygen-build.stamp + +clean-local: + rm -f *~ *.bak $(DOC_STAMPS) || true + if test -d html; then rm -fr html; fi + if test -d latex; then rm -fr latex; fi + if test -d man; then rm -fr man; fi + +distclean-local: clean + rm -f *.stamp || true + if test -d html; then rm -rf html; fi diff --git a/tests/Makefile.am b/tests/Makefile.am new file mode 100644 index 0000000..b6bdcec --- /dev/null +++ b/tests/Makefile.am @@ -0,0 +1,22 @@ + +noinst_PROGRAMS = midiprobe midiout qmidiin cmidiin sysextest + +midiprobe_CXXFLAGS = -Wall -I$(top_srcdir) +midiprobe_SOURCES = midiprobe.cpp +midiprobe_LDADD = $(top_builddir)/librtmidi.la + +midiout_CXXFLAGS = -Wall -I$(top_srcdir) +midiout_SOURCES = midiout.cpp +midiout_LDADD = $(top_builddir)/librtmidi.la + +qmidiin_CXXFLAGS = -Wall -I$(top_srcdir) +qmidiin_SOURCES = qmidiin.cpp +qmidiin_LDADD = $(top_builddir)/librtmidi.la + +cmidiin_CXXFLAGS = -Wall -I$(top_srcdir) +cmidiin_SOURCES = cmidiin.cpp +cmidiin_LDADD = $(top_builddir)/librtmidi.la + +sysextest_CXXFLAGS = -Wall -I$(top_srcdir) +sysextest_SOURCES = sysextest.cpp +sysextest_LDADD = $(top_builddir)/librtmidi.la diff --git a/tests/Makefile.in b/tests/Makefile.in deleted file mode 100644 index 42cb354..0000000 --- a/tests/Makefile.in +++ /dev/null @@ -1,49 +0,0 @@ -### Do not edit -- Generated by 'configure --with-whatever' from Makefile.in -### RtMidi tests Makefile - for various flavors of unix - -PROGRAMS = midiprobe midiout qmidiin cmidiin sysextest -RM = /bin/rm -SRC_PATH = .. -INCLUDE = @top_srcdir@ -OBJECT_PATH = @object_path@ -vpath %.o $(OBJECT_PATH) - -OBJECTS = @top_srcdir@/RtMidi.o - -CC = @CXX@ -DEFS = @CPPFLAGS@ -CFLAGS = @CXXFLAGS@ -CFLAGS += -I$(INCLUDE) -I$(INCLUDE)/include -LIBRARY = @LIBS@ - -%.o : $(SRC_PATH)/%.cpp - $(CC) $(CFLAGS) $(DEFS) -c $(<) -o $(OBJECT_PATH)/$@ - -all : $(PROGRAMS) - -midiprobe : @srcdir@/midiprobe.cpp $(OBJECTS) - $(CC) $(CFLAGS) $(DEFS) -o midiprobe $^ $(LIBRARY) - -midiout : @srcdir@/midiout.cpp $(OBJECTS) - $(CC) $(CFLAGS) $(DEFS) -o midiout $^ $(LIBRARY) - -qmidiin : @srcdir@/qmidiin.cpp $(OBJECTS) - $(CC) $(CFLAGS) $(DEFS) -o qmidiin $^ $(LIBRARY) - -cmidiin : @srcdir@/cmidiin.cpp $(OBJECTS) - $(CC) $(CFLAGS) $(DEFS) -o cmidiin $^ $(LIBRARY) - -sysextest : @srcdir@/sysextest.cpp $(OBJECTS) - $(CC) $(CFLAGS) $(DEFS) -o sysextest $^ $(LIBRARY) - -clean : - $(RM) -f $(OBJECT_PATH)/*.o - $(RM) -f $(PROGRAMS) *.exe - $(RM) -f *~ - $(RM) -fR *.dSYM - -distclean: clean - $(RM) -f Makefile - -strip : - strip $(PROGRAMS) -- cgit v1.2.3 From 7bb026ca74f3c9a4308bdb3756a67d2d6a958d99 Mon Sep 17 00:00:00 2001 From: Stephen Sinclair Date: Fri, 5 Feb 2016 12:16:18 -0300 Subject: Run autoreconf instead of running the autotools manually, if possible. --- autogen.sh | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/autogen.sh b/autogen.sh index a8a3046..bf28ad9 100755 --- a/autogen.sh +++ b/autogen.sh @@ -6,12 +6,24 @@ test -z "$srcdir" && srcdir=. DIE=0 +if test -z "$*"; then + echo "**Warning**: I am going to run \`configure' with arguments for" + echo "developer/maintainer mode. If you wish to pass extra arguments," + echo "(such as --prefix), please specify them on the \`$0'" + echo "command line." + echo "If you wish to run configure yourself, please specify --no-configure." + echo +fi + (test -f $srcdir/configure.ac) || { echo -n "**Error**: Directory "\`$srcdir\'" does not look like the" echo " top-level package directory" exit 1 } +if ! autoreconf --version /dev/null 2>&1 +then + (autoconf --version) < /dev/null > /dev/null 2>&1 || { echo echo "**Error**: You must have \`autoconf' installed." @@ -55,13 +67,6 @@ if test "$DIE" -eq 1; then exit 1 fi -if test -z "$*"; then - echo "**Warning**: I am going to run \`configure' with no arguments." - echo "If you wish to pass any to it, please specify them on the" - echo \`$0\'" command line." - echo -fi - # Make some directories required by automake, if they don't exist if ! [ -d config ]; then mkdir -v config; fi if ! [ -d m4 ]; then mkdir -v m4; fi @@ -80,6 +85,13 @@ automake --add-missing --gnu $am_opt || exit 1 echo "Running autoconf ..." autoconf || exit 1 +else # autoreconf instead + + echo "Running autoreconf --verbose --install ..." + autoreconf --verbose --install || exit 1 + +fi + if ( echo "$@" | grep -q -e "--no-configure" ); then NOCONFIGURE=1 fi -- cgit v1.2.3 From e5bd7b5158da18fbc8d986a6a6490234719f2d9d Mon Sep 17 00:00:00 2001 From: Stephen Sinclair Date: Fri, 5 Feb 2016 15:08:42 -0300 Subject: Copy doxyfile before running doxygen, fixes out of tree builds. --- configure.ac | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/configure.ac b/configure.ac index bcaada8..c2f8c4b 100644 --- a/configure.ac +++ b/configure.ac @@ -59,6 +59,14 @@ CXXFLAGS="$CXXFLAGS $cxxflag" AC_CHECK_PROG( DOXYGEN, [doxygen], [doxygen] ) AM_CONDITIONAL( MAKE_DOC, [test "x${DOXYGEN}" != x] ) +# Copy doc files to build dir if necessary +AC_CONFIG_LINKS( [doc/doxygen/Doxyfile:doc/doxygen/Doxyfile] ) +AC_CONFIG_LINKS( [doc/doxygen/footer.html:doc/doxygen/footer.html] ) +AC_CONFIG_LINKS( [doc/doxygen/header.html:doc/doxygen/header.html] ) +AC_CONFIG_LINKS( [doc/doxygen/tutorial.txt:doc/doxygen/tutorial.txt] ) +AC_CONFIG_LINKS( [doc/images/ccrma.gif:doc/images/ccrma.gif] ) +AC_CONFIG_LINKS( [doc/images/mcgill.gif:doc/images/mcgill.gif] ) + # Checks for package options and external software AC_CANONICAL_HOST -- cgit v1.2.3 From d7012fe47f0431d32a0c9ff7ef28783016d106fc Mon Sep 17 00:00:00 2001 From: Stephen Sinclair Date: Fri, 5 Feb 2016 16:36:08 -0300 Subject: Add the required version number to AM_INIT_AUTOMAKE. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index c2f8c4b..140c115 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,7 @@ AC_INIT(RtMidi, 2.1.0, gary@music.mcgill.ca, rtmidi) AC_CONFIG_AUX_DIR(config) AC_CONFIG_SRCDIR(RtMidi.cpp) AC_CONFIG_FILES([rtmidi-config rtmidi.pc Makefile tests/Makefile doc/Makefile]) -AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects]) +AM_INIT_AUTOMAKE([1.14 -Wall -Werror foreign subdir-objects]) # Enable some nice automake features if they are available m4_ifdef([AM_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) -- cgit v1.2.3 From 67049ae194284bbc6771e9e1cdc4912082558e07 Mon Sep 17 00:00:00 2001 From: Stephen Sinclair Date: Wed, 10 Feb 2016 11:15:59 -0300 Subject: Add doc/Makefile.in and tests/Makefile.in to .gitignore. --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 9f747ef..8942477 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,5 @@ /autom4te.cache /configure /m4 +/doc/Makefile.in +/tests/Makefile.in -- cgit v1.2.3 From 58f85d4372c6efbf8974904ed3a5f428248dfdfb Mon Sep 17 00:00:00 2001 From: Stephen Sinclair Date: Wed, 10 Feb 2016 11:39:44 -0300 Subject: Force doxygen to run before making dist. --- Makefile.am | 4 +--- doc/Makefile.am | 4 +++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile.am b/Makefile.am index 19fbacd..2382ae4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -17,7 +17,5 @@ rtmidi_inc_HEADERS = \ pkgconfigdatadir = $(libdir)/pkgconfig pkgconfigdata_DATA = rtmidi.pc -EXTRA_DIST = autogen.sh readme doc msw +EXTRA_DIST = autogen.sh readme msw -dist-hook: - $(MAKE) -C doc diff --git a/doc/Makefile.am b/doc/Makefile.am index 6a52d94..b670116 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -9,7 +9,7 @@ EXTRA_DIST=html INSTIMAGES=html/doxygen.png -DOC_STAMPS=html-build.stamp +DOC_STAMPS=doxygen-build.stamp DOC_DIR=$(HTML_DIR) @@ -29,3 +29,5 @@ clean-local: distclean-local: clean rm -f *.stamp || true if test -d html; then rm -rf html; fi + +html-local: $(DOC_STAMPS) -- cgit v1.2.3