]> git.alsa-project.org Git - alsa-tools.git/commitdiff
hdajackretask: Use autotools
authorDavid Henningsson <david.henningsson@canonical.com>
Fri, 13 Apr 2012 09:49:21 +0000 (11:49 +0200)
committerDavid Henningsson <david.henningsson@canonical.com>
Fri, 13 Apr 2012 10:42:38 +0000 (12:42 +0200)
Start to use autotools as build system, just like the other programs
in the alsa-tools suite.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
hdajackretask/AUTHORS [new file with mode: 0644]
hdajackretask/ChangeLog [new file with mode: 0644]
hdajackretask/Makefile [deleted file]
hdajackretask/Makefile.am [new file with mode: 0644]
hdajackretask/NEWS [new file with mode: 0644]
hdajackretask/configure.in [new file with mode: 0644]
hdajackretask/gitcompile

diff --git a/hdajackretask/AUTHORS b/hdajackretask/AUTHORS
new file mode 100644 (file)
index 0000000..9f136d8
--- /dev/null
@@ -0,0 +1 @@
+David Henningsson <david.henningsson@canonical.com>
diff --git a/hdajackretask/ChangeLog b/hdajackretask/ChangeLog
new file mode 100644 (file)
index 0000000..70c7475
--- /dev/null
@@ -0,0 +1 @@
+For news and changelog, refer to git repository history. This file is only present because autotools requires it.
diff --git a/hdajackretask/Makefile b/hdajackretask/Makefile
deleted file mode 100644 (file)
index c9c4043..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-SOURCES = main-gtk.c sysfs-pin-configs.c apply-changes.c
-
-build:
-       $(shell sed 's/\\/\\\\/g;s/"/\\"/g;s/^/"/;s/$$/\\n"/;' < README > README.generated.h)
-       gcc -g -O0 -Wall -o hda-jack-retask $(SOURCES) $(shell pkg-config --cflags --libs gtk+-3.0) 
-
-clean:
-       -rm hda-jack-retask
-       -rm README.generated.h
-
-install:
-       install -Dm755 hda-jack-retask $(DESTDIR)/usr/bin/hda-jack-retask
-       install -Dm644 README $(DESTDIR)/usr/share/doc/hda-jack-retask/README
-
-uninstall:
-       -rm $(DESTDIR)/usr/bin/hda-jack-retask
-
-.PHONY: build install uninstall
diff --git a/hdajackretask/Makefile.am b/hdajackretask/Makefile.am
new file mode 100644 (file)
index 0000000..e0204bc
--- /dev/null
@@ -0,0 +1,20 @@
+EXTRA_DIST = gitcompile README
+AM_CFLAGS = @GTK3_CFLAGS@
+bin_PROGRAMS = hdajackretask
+man_MANS =
+hdajackretask_SOURCES = main-gtk.c sysfs-pin-configs.c apply-changes.c 
+hdajackretask_LDADD = @GTK3_LIBS@
+
+BUILT_SOURCES = README.generated.h
+nodist_hdajackretask_SOURCES = README.generated.h
+CLEANFILES = README.generated.h
+
+README.generated.h:
+       sed 's/\\/\\\\/g;s/"/\\"/g;s/^/"/;s/$$/\\n"/;' README >$@
+
+alsa-dist: distdir
+       @rm -rf ../distdir/hdajackretask
+       @mkdir -p ../distdir/hdajackretask
+       @cp -RLpv $(distdir)/* ../distdir/hdajackretask
+       @rm -rf $(distdir)
+
diff --git a/hdajackretask/NEWS b/hdajackretask/NEWS
new file mode 100644 (file)
index 0000000..70c7475
--- /dev/null
@@ -0,0 +1 @@
+For news and changelog, refer to git repository history. This file is only present because autotools requires it.
diff --git a/hdajackretask/configure.in b/hdajackretask/configure.in
new file mode 100644 (file)
index 0000000..f839af3
--- /dev/null
@@ -0,0 +1,10 @@
+AC_INIT([hdajackretask], [0.20120413])
+AC_CONFIG_SRCDIR([main-gtk.c])
+AM_INIT_AUTOMAKE
+AC_PROG_CC
+AC_PROG_INSTALL
+AC_HEADER_STDC
+
+PKG_CHECK_MODULES(GTK3, gtk+-3.0)
+
+AC_OUTPUT(Makefile)
index acc8825c2785414e2bc21321ba96557f7788f7e9..10e057c27bc05a218b1de9476ad95ccfafbd6ee8 100755 (executable)
@@ -1,3 +1,30 @@
-#!/bin/sh
+#!/bin/bash
 
-make GITCOMPILE_ARGS="$*"
+if test -z "$AUTOMAKE_DIR"; then
+  if test -d /usr/local/share/automake; then
+    AUTOMAKE_DIR=/usr/local/share/automake
+  fi
+  if test -d /usr/share/automake; then
+    AUTOMAKE_DIR="/usr/share/automake"
+  fi
+  if test -z "$AUTOMAKE_DIR"; then
+    AUTOMAKE_DIR=/usr/share/`ls /usr/share | grep automake | tail -n 1`
+  fi
+fi
+
+for f in install-sh mkinstalldirs missing; do
+  cp -av $AUTOMAKE_DIR/$f . || exit 1
+done
+
+aclocal $ACLOCAL_FLAGS || exit 1
+automake --add-missing --copy || exit 1
+touch depcomp || exit 1
+autoconf || exit 1
+export CFLAGS='-O2 -Wall -pipe -g'
+echo "CFLAGS=$CFLAGS"
+echo "./configure $@"
+./configure $@ || exit 1
+unset CFLAGS
+if [ -z "$GITCOMPILE_NO_MAKE" ]; then
+  make || exit 1
+fi