aboutsummaryrefslogtreecommitdiff
path: root/hello
diff options
context:
space:
mode:
Diffstat (limited to 'hello')
-rw-r--r--hello/Makefile.am8
-rw-r--r--hello/README.pod25
-rw-r--r--hello/goodbye.c2
-rw-r--r--hello/hello.c2
l---------hello/m41
l---------hello/mooPdUtils.h1
l---------hello/pdexternal.am1
-rwxr-xr-xhello/prepare-svn.sh36
8 files changed, 57 insertions, 19 deletions
diff --git a/hello/Makefile.am b/hello/Makefile.am
index 4575483..487aa58 100644
--- a/hello/Makefile.am
+++ b/hello/Makefile.am
@@ -9,14 +9,14 @@
#-----------------------------------------------------------------------
# Includes
#-----------------------------------------------------------------------
-include $(top_srcdir)/pdexternal.am
+include $(top_srcdir)/common/pdexternal.am
##-----------------------------------------------------------------------
## Options & Subdirectories
##-----------------------------------------------------------------------
##-- aclocal options (top level only)
-ACLOCAL_AMFLAGS = -I m4
+ACLOCAL_AMFLAGS = -I common/m4
## --- automake options (top level only)
#AUTOMAKE_OPTIONS = foreign dist-bzip2 dist-zip
@@ -38,8 +38,8 @@ endif
EXTRA_PROGRAMS = goodbye
##-- sources
-hello_SOURCES = hello.c mooPdUtils.h
-goodbye_SOURCES = goodbye.c mooPdUtils.h
+hello_SOURCES = hello.c common/mooPdUtils.h
+goodbye_SOURCES = goodbye.c common/mooPdUtils.h
##-- patches
pdexterns_DATA = heynow.pd
diff --git a/hello/README.pod b/hello/README.pod
index 8941f49..d75eca0 100644
--- a/hello/README.pod
+++ b/hello/README.pod
@@ -68,19 +68,24 @@ how to use GNU autotools to manage your own Pd external package.
=over 4
-=item $(top_srcdir)/m4
+=item $(top_srcdir)/common
-The directory m4/ should be copied to your top-level package directory.
+The directory common/ includes common code for the autotools packages.
+Copy it to your top-level package directory.
+
+=item $(top_srcdir)/common/m4
+
+Contains m4 macros for autotools.
See L</"ax_pd_external.m4"> for details.
-=item $(top_srcdir)/pdexternal.am
+=item $(top_srcdir)/common/pdexternal.am
-The file pdexternal.am should be copied to your top-level package directory
+May be included in your package's Makefile.am.
See L</"pdexternal.am"> for details.
-=item $(srcdir)/mooPdUtils.h (optional)
+=item $(top_srcdir)/common/mooPdUtils.h (optional)
-The file mooPdUtils.h may be copied to your source-level directory.
+The file mooPdUtils.h may be included by your C source files.
Currently, this only provides a PDEXT_UNUSED macro to avoid annoying
gcc warnings under -W.
@@ -89,11 +94,11 @@ gcc warnings under -W.
=head2 Running aclocal
-You must pass the "-I m4" flag to aclocal when you call it.
+You must pass the "-I common/m4" flag to aclocal when you call it.
For maintainer-mode rebuilding and autoreconf, you should add
the following to your top-level Makefile.am:
- ACLOCAL_AMFLAGS = -I m4
+ ACLOCAL_AMFLAGS = -I $(top_srcdir)/common/m4
See the example package's autogen.sh for a useful wrapper script.
@@ -118,7 +123,7 @@ See the example package's configure.ac for a complete working example.
=head2 Makefile.am
-You probably want to include $(top_srcdir)/pdexternal.am in
+You probably want to include $(top_srcdir)/common/pdexternal.am in
your Makefile.am(s). This will allow you to build Pd externals
as "_PROGRAMS" targets. In particular, pdext_PROGRAMS targets
will be built as externals and installed in PDEXT_DIR (see above).
@@ -157,7 +162,7 @@ following to Makefile.am:
=head2 ax_pd_external.m4
-The AX_PD_EXTERNAL macro defined in m4/ax_pd_external.m4
+The AX_PD_EXTERNAL macro defined in common/m4/ax_pd_external.m4
is intended to perform all common autoconf-level
checks and substitutions necessary for building Pd external packages on
various systems. Among other things, this includes:
diff --git a/hello/goodbye.c b/hello/goodbye.c
index b758035..cf5ba25 100644
--- a/hello/goodbye.c
+++ b/hello/goodbye.c
@@ -24,7 +24,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*=============================================================================*/
#include <m_pd.h>
-#include "mooPdUtils.h"
+#include "common/mooPdUtils.h"
#ifdef HAVE_CONFIG_H
# include "config.h"
diff --git a/hello/hello.c b/hello/hello.c
index 1419619..0f3f55f 100644
--- a/hello/hello.c
+++ b/hello/hello.c
@@ -24,7 +24,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*=============================================================================*/
#include <m_pd.h>
-#include "mooPdUtils.h"
+#include "common/mooPdUtils.h"
#ifdef HAVE_CONFIG_H
# include "config.h"
diff --git a/hello/m4 b/hello/m4
deleted file mode 120000
index 83ffc0c..0000000
--- a/hello/m4
+++ /dev/null
@@ -1 +0,0 @@
-../common/m4 \ No newline at end of file
diff --git a/hello/mooPdUtils.h b/hello/mooPdUtils.h
deleted file mode 120000
index 677b39d..0000000
--- a/hello/mooPdUtils.h
+++ /dev/null
@@ -1 +0,0 @@
-../common/mooPdUtils.h \ No newline at end of file
diff --git a/hello/pdexternal.am b/hello/pdexternal.am
deleted file mode 120000
index 914f4be..0000000
--- a/hello/pdexternal.am
+++ /dev/null
@@ -1 +0,0 @@
-../common/pdexternal.am \ No newline at end of file
diff --git a/hello/prepare-svn.sh b/hello/prepare-svn.sh
new file mode 100755
index 0000000..58830ae
--- /dev/null
+++ b/hello/prepare-svn.sh
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+USAGE="$0 {copy|link} [COMMON_SRC=../common] [COMMON_DST=./common]"
+
+if test -n "$1"; then
+ case "$1" in
+ copy)
+ CP="cp -a";
+ ;;
+ link)
+ CP="ln -s";
+ ;;
+ *)
+ echo "Usage: $USAGE"
+ exit 1;
+ ;;
+ esac
+else
+ CP="ln -s"
+fi
+
+if test -n "$2"; then
+ COMMON_SRC="$2";
+else
+ COMMON_SRC="../common";
+fi
+
+if test -n "$3"; then
+ COMMON_DST="$3";
+else
+ COMMON_DST="./common";
+fi
+
+##-- copy or link in common dir
+rm -rf "$COMMON_DST";
+$CP "$COMMON_SRC" "$COMMON_DST";