[BACK]Return to Makefile CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / regress / buildlink-transform

Annotation of pkgsrc/regress/buildlink-transform/Makefile, Revision 1.18

1.18    ! jlam        1: # $NetBSD: Makefile,v 1.17 2005/12/17 05:20:23 jlam Exp $
1.5       jlam        2: #
                      3: # Run many buildlink transform tests in a single regression test to avoid
                      4: # having to keep creating the wrapper scripts over and over again.
                      5: #
1.1       jlam        6: DISTNAME=      regress-buildlink-transform-0.0
                      7: CATEGORIES=    regress
                      8: MASTER_SITES=  # empty
                      9: DISTFILES=     # empty
                     10:
1.17      jlam       11: MAINTAINER=    jlam@pkgsrc.org
1.1       jlam       12: COMMENT=       test buildlink wrapper transformation
                     13:
                     14: .include "../../mk/bsd.prefs.mk"
                     15:
1.5       jlam       16: EXTRACT_ONLY=  # empty
1.1       jlam       17: NO_CONFIGURE=  yes
                     18: NO_INSTALL=    yes
                     19: NO_PACKAGE=    yes
                     20:
1.6       jlam       21: # Remove GCC optimization options.
                     22: BUILDLINK_TRANSFORM+=  rm:-O[0-9]*
                     23:
1.10      jlam       24: # Remove /opt/schily.
                     25: .if ${LOCALBASE} != "/opt/schily"
1.16      rillig     26: BUILDLINK_TRANSFORM+=  rmdir:/opt/schily
                     27: .endif
1.10      jlam       28:
1.6       jlam       29: # Convert "-lreadline" into "-ledit -ltermcap -lm".
                     30: BUILDLINK_TRANSFORM+=  l:readline:edit:termcap:m
                     31:
1.1       jlam       32: REGRESS_ENV=           PATH=${PATH}
1.7       jlam       33: REGRESS_ENV+=          WRAPPER_DEBUG=yes
1.1       jlam       34:
1.5       jlam       35: # Create a "regress" script in the wrapper directory that just echoes its
                     36: # arguments.
                     37: #
1.1       jlam       38: REGRESS=               ${ECHO}
1.11      jlam       39: WRAPPEES+=             REGRESS
1.7       jlam       40: _WRAP_ALIASES.REGRESS= regress
1.1       jlam       41:
1.11      jlam       42: post-wrapper:
                     43:        @${RM} -f ${WRAPPER_BINDIR}/${REGRESS}
1.1       jlam       44:
                     45: .PHONY: regress do-regress
                     46:
1.11      jlam       47: regress: wrapper do-regress
1.8       jlam       48:
                     49: FAILED_TESTS=  ${WRKDIR}/failed
1.9       jlam       50: PASSED_TESTS=  ${WRKDIR}/passed
1.1       jlam       51:
                     52: do-regress:
1.8       jlam       53:        @if [ -f ${FAILED_TESTS} ]; then                                \
                     54:                ${ECHO} "FAILED:";                                      \
                     55:                ${CAT} ${FAILED_TESTS} | while read test; do            \
                     56:                        ${ECHO} "       $$test";                        \
                     57:                done;                                                   \
1.9       jlam       58:                exit 1;                                                 \
1.8       jlam       59:        else                                                            \
                     60:                ${DO_NADA};                                             \
                     61:        fi
1.1       jlam       62:
1.9       jlam       63: report-failed:
                     64:        @if [ -f "${FAILED_TESTS}" ]; then                              \
                     65:                ${ECHO} `${CAT} ${FAILED_TESTS} | ${WC} -l`;            \
                     66:        else                                                            \
                     67:                ${ECHO} "0";                                            \
                     68:        fi
                     69:
                     70: report-passed:
                     71:        @if [ -f "${PASSED_TESTS}" ]; then                              \
                     72:                ${ECHO} `${CAT} ${PASSED_TESTS} | ${WC} -l`;            \
                     73:        else                                                            \
                     74:                ${ECHO} "0";                                            \
                     75:        fi
                     76:
1.1       jlam       77: TEST_RESULT=   runtest=`${SETENV} ${REGRESS_ENV} regress $$test`;      \
                     78:                ${ECHO} "(${.TARGET}) saw:      $$test";                \
                     79:                ${ECHO} "(${.TARGET}) got:      $$runtest";             \
                     80:                ${ECHO} "(${.TARGET}) expected: $$expected";            \
                     81:                case $$runtest in                                       \
1.6       jlam       82:                $$expected)                                             \
                     83:                        ${ECHO} "(${.TARGET}) result:   PASS";          \
1.9       jlam       84:                        ${ECHO} "${.TARGET}" >> ${PASSED_TESTS};        \
1.6       jlam       85:                        ;;                                              \
                     86:                *)                                                      \
                     87:                        ${ECHO} "(${.TARGET}) result:   FAIL";          \
1.8       jlam       88:                        ${ECHO} "${.TARGET}" >> ${FAILED_TESTS};        \
1.6       jlam       89:                        ;;                                              \
1.1       jlam       90:                esac
                     91:
                     92: TEST_DIR=      ${.CURDIR}/tests
                     93:
                     94: # If RUNTESTS is defined, then just run those tests, otherwise run them all.
                     95: .if defined(RUNTESTS)
                     96: TEST_MAKEFILES=        ${RUNTESTS:S/^/${TEST_DIR}\//:S/$/.mk/}
1.14      jlam       97: .  for _mkfile_ in ${TEST_MAKEFILES}
                     98: .    if exists(${_mkfile_})
                     99: .      include "${_mkfile_}"
                    100: .    endif
                    101: .  endfor
1.1       jlam      102: .else
1.14      jlam      103: .  include "tests/include-pkgdir-slashdot.mk"
                    104: .  include "tests/include-pkgdir.mk"
                    105: .  include "tests/include-pkgsubdir.mk"
                    106: .  include "tests/include-usr-include-slashdot.mk"
                    107: .  include "tests/include-usr-include-subdir.mk"
                    108: .  include "tests/include-usr-include.mk"
                    109: .  include "tests/lib-expand.mk"
                    110: .  include "tests/libdir-pkgdir-slashdot.mk"
                    111: .  include "tests/libdir-pkgdir.mk"
                    112: .  include "tests/libdir-pkgsubdir.mk"
                    113: .  include "tests/libdir-usr-lib-slashdot.mk"
                    114: .  include "tests/libdir-usr-lib-subdir.mk"
                    115: .  include "tests/libdir-usr-lib.mk"
                    116: .  include "tests/libpath.mk"
                    117: .  include "tests/libpath-in-define.mk"
                    118: .  include "tests/no-abspath.mk"
                    119: .  include "tests/preserve-option.mk"
                    120: .  include "tests/quoted-arg.mk"
                    121: .  include "tests/remove-dir.mk"
                    122: .  include "tests/remove-option.mk"
                    123: .  include "tests/repeated-arg.mk"
1.15      jlam      124: .  include "tests/rpath-merge.mk"
1.14      jlam      125: .  include "tests/rpath-pkgdir-slashdot.mk"
                    126: .  include "tests/rpath-pkgdir.mk"
                    127: .  include "tests/rpath-pkgsubdir.mk"
1.15      jlam      128: .  include "tests/rpath-split.mk"
1.14      jlam      129: .  include "tests/rpath-usr-lib-slashdot.mk"
                    130: .  include "tests/rpath-usr-lib-subdir.mk"
                    131: .  include "tests/rpath-usr-lib.mk"
                    132: .  include "tests/libpath-shlib.mk"
                    133: .  include "tests/libpath-shmod.mk"
1.1       jlam      134: .endif
                    135:
                    136: .include "../../mk/bsd.pkg.mk"

CVSweb <webmaster@jp.NetBSD.org>