Fix build system so it works on Gentoo portage easily.
authorRoy Marples <roy@marples.name>
Mon, 24 May 2010 14:02:40 +0000 (14:02 +0000)
committerRoy Marples <roy@marples.name>
Mon, 24 May 2010 14:02:40 +0000 (14:02 +0000)
Makefile
configure
src/dhcpcd-gtk/Makefile

index 81f50c26c99cd5fc4525f625eb22aeaa7116b7ca..4880876a96de02bf71f2def83cd7a2fb6d7f269f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -24,7 +24,7 @@ SNAPFILE=     ${SNAPDIR}.tar.bz2
 dist:
        mkdir /tmp/${DISTPREFIX}
        cp -RPp * /tmp/${DISTPREFIX}
-       (cd /tmp/${DISTPREFIX}; make clean icons)
+       (cd /tmp/${DISTPREFIX}; make clean icons; rm config.h config.mk)
        find /tmp/${DISTPREFIX} -name .gitignore -delete
        tar -cvjpf ${DISTFILE} -C /tmp ${DISTPREFIX}
        rm -rf /tmp/${DISTPREFIX}
@@ -33,7 +33,7 @@ dist:
 snapshot: icons
        mkdir /tmp/${SNAPDIR}
        cp -RPp * /tmp/${SNAPDIR}
-       (cd /tmp/${SNAPDIR}; make clean)
+       (cd /tmp/${SNAPDIR}; make clean; rm config.h config.mk)
        find /tmp/${SNAPDIR} -name .gitignore -delete
        tar -cvjpf ${SNAPFILE} -C /tmp ${SNAPDIR}
        rm -rf /tmp/${SNAPDIR}
index fc16fce0bf4ef2abeefd5b2a389fa2fa4a1b628f..e1c35412c3d4363fd8fd331e923ec58b0431dc9b 100755 (executable)
--- a/configure
+++ b/configure
@@ -10,6 +10,7 @@ NOTIFY=yes
 for x; do
        opt=${x%%=*}
        var=${x#*=}
+       [ "$var" = "$opt" ] && var=
        case "$opt" in
        --os|OS) OS=$var;;
        --with-cc|CC) CC=$var;;
@@ -96,12 +97,12 @@ if [ -z "$OS" ]; then
        KERNEL=${REST%%-*}
 fi
 
-echo "Configuring dhcpcd-dbus for ... $OS"
+echo "Configuring dhcpcd-ui for ... $OS"
 rm -f $CONFIG_H $CONFIG_MK
 echo "# $OS" >$CONFIG_MK
 echo "/* $OS */" >$CONFIG_H
 
-for x in PREFIX SYSCONFDIR BINDIRi ICONDIR; do
+for x in PREFIX SYSCONFDIR BINDIR ICONDIR; do
        eval v=\$$x
        # Make files look nice for import
        l=$((10 - ${#x}))
@@ -135,7 +136,7 @@ else
 fi
 echo "CC=              $CC" >>$CONFIG_MK
 
-if [ -z "$CFLAGS"]; then
+if [ -z "$CFLAGS" ]; then
        CFLAGS="-O2"
 fi
 echo "CFLAGS=          $CFLAGS" >>$CONFIG_MK
index 40db36a3e4bd158ba07f9c9b1bc3b4e988026b85..1946f91e70074333ec4e1c37aca9e9e0d62f3c40 100644 (file)
@@ -5,8 +5,8 @@ TOPDIR=         ../..
 include ${TOPDIR}/config.mk
 
 ICONDIR?=      ${PREFIX}/share/dhcpcd/icons
-SYSCONFDIR?=   ${PREFIX}/etc/xdg/autostart
-FILESDIR?=     ${SYSCONFDIR}
+XDGDIR?=       ${SYSCONFDIR}/xdg/autostart
+FILESDIR=      ${XDGDIR}
 FILES=         dhcpcd-gtk.desktop
 
 CPPFLAGS+=     ${NOTIFY} -I${TOPDIR}