]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Tweak stuff for importing
authorRoy Marples <roy@marples.name>
Fri, 31 Jan 2014 15:55:16 +0000 (15:55 +0000)
committerRoy Marples <roy@marples.name>
Fri, 31 Jan 2014 15:55:16 +0000 (15:55 +0000)
Makefile
configure

index b6fe6dea2c97bd8764bd5b53d6bb9f4d8036fa40..c672f235b124613f9e3889d302f34db97db2a42b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -17,10 +17,11 @@ SRCS+=              ${DHCPCD_SRCS}
 
 VPATH= . ./crypt
 
+SRCS+=         auth.c
 CPPFLAGS+=     -I./crypt
-SRCS+=         auth.c hmac_md5.c ${MD5_SRC}
+CRYPT_SRCS=    hmac_md5.c ${MD5_SRC}
 
-OBJS+=         ${SRCS:.c=.o} ${COMPAT_SRCS:.c=.o}
+OBJS+=         ${SRCS:.c=.o} ${COMPAT_SRCS:.c=.o} ${CRYPT_SRCS:.c=.o}
 
 SCRIPT=                ${LIBEXECDIR}/dhcpcd-run-hooks
 HOOKDIR=       ${LIBEXECDIR}/dhcpcd-hooks
@@ -156,18 +157,28 @@ import: ${SRCS}
                sed -e 's/^.*\.c //g' -e 's/.*\.c$$//g' -e 's/\\//g' | \
                tr ' ' '\n' | \
                sed -e '/^compat\//d' | \
-               sort -u) /tmp/${DISTPREFIX}
+               sed -e '/^crypt\//d' | \
+               sort -u) /tmp/${DISTPREFIX}; \
+       if test -n "${CRYPT_SRCS}"; then \
+               ${INSTALL} -d /tmp/${DISTPREFIX}/crypt; \
+               cp crypt/${CRYPT_SRCS} /tmp/${DISTPREFIX}/crypt; \
+               cp $$(cd crypt && ${CC} ${CPPFLAGS} -MM ${CRYPT_SRCS} | \
+                       sed -e 's/^.*c //g' -e 's/.*\.c$$//g' -e 's/\\//g' | \
+                       tr ' ' '\n' | sed -e 's:^:crypt/:g' | \
+                       sort -u) /tmp/${DISTPREFIX}/crypt; \
+       fi;
        if test -n "${COMPAT_SRCS}"; then \
                ${INSTALL} -d /tmp/${DISTPREFIX}/compat; \
-               cp ${COMPAT_SRCS} /tmp/${DISTPREFIX}/compat; \
-               cp $$(${CC} ${CPPFLAGS} -MM ${COMPAT_SRCS} | \
+               cp compat/${COMPAT_SRCS} /tmp/${DISTPREFIX}/compat; \
+               cp $$(cd compat && ${CC} ${CPPFLAGS} -MM ${COMPAT_SRCS} | \
                        sed -e 's/^.*c //g' -e 's/.*\.c$$//g' -e 's/\\//g' | \
-                       tr ' ' '\n' | \
+                       tr ' ' '\n' | sed -e 's:^:compat/:g' | \
                        sort -u) /tmp/${DISTPREFIX}/compat; \
        fi;
        if test -n "${IMPORT_RCSID}"; then \
                for x in \
                    /tmp/${DISTPREFIX}/*.c \
+                   /tmp/${DISTPREFIX}/crypt/*.c \
                    /tmp/${DISTPREFIX}/compat/*.c \
                ; do \
                        if test -e "$$x"; then \
@@ -180,6 +191,7 @@ import: ${SRCS}
        if test -n "${IMPORT_HID}"; then \
                for x in \
                    /tmp/${DISTPREFIX}/*.h \
+                   /tmp/${DISTPREFIX}/crypt/*.h \
                    /tmp/${DISTPREFIX}/compat/*.h \
                ; do \
                        if test -e "$$x"; then \
index a7116ac2a23be810d12114d385c10e99db725822..92cca512d18a159bd0b373f3ac375750022c5c13 100755 (executable)
--- a/configure
+++ b/configure
@@ -648,7 +648,7 @@ if [ "$MD5" = no ]; then
        echo "MD5_SRC=  md5.c" >>$CONFIG_MK
 else
        echo "MD5_SRC=" >>$CONFIG_MK
-       echo "#define HAVE_MD5H" >>$CONFIG_H
+       echo "CPPFLAGS+=        -DHAVE_MD5_H" >>$CONFIG_MK
 fi
 
 if [ "$DEV" != no -a "$UDEV" != no ]; then