#------------------------------------------------------------------------------- # Note: throughout this file, the trailing dot in the construction # "for x in blah blah .; do " is there because some sh implementations # ^ # do not accept an empty "in" clause in a "for". #------------------------------------------------------------------------------- HD_CP = cp HD_CP_P = cp -p HD_MV_F = mv -f HD_INSTALL = hd_install HD_LN = ln HD_LN_S = ${HD_LN_SYM} HD_TARG_PFX = hd-std- HD_TOP_BIN = ${HD_TOP_EXEC_PFX}/bin HD_TOP_INC = ${HD_TOP_EXEC_PFX}/include HD_TOP_HELP = ${HD_TOP_EXEC_PFX}/help HD_TOP_LIB = ${HD_TOP_EXEC_PFX}/lib HD_TOP_PERL_LIB = ${HD_TOP_EXEC_PFX}/lib/perl HD_TOP_PYTHON_LIB = ${HD_TOP_EXEC_PFX}/lib/python HD_TOP_PFILES = ${HD_TOP_EXEC_PFX}/syspfiles HD_TOP_REFDATA = ${HD_TOP_EXEC_PFX}/refdata HD_TOP_SCRIPTS = ${HD_TOP_EXEC_PFX}/bin HD_TOP_XML = ${HD_TOP_EXEC_PFX}/xml # For future use if/when refdata moves out from under $HEADAS/: #HD_TOP_REFDATA = ${HD_TOP_PFX}/refdata HD_BLD_BIN = ${HD_BLD_EXEC_PFX}/bin HD_BLD_INC = ${HD_BLD_EXEC_PFX}/include HD_BLD_HELP = ${HD_BLD_EXEC_PFX}/help HD_BLD_LIB = ${HD_BLD_EXEC_PFX}/lib HD_BLD_PERL_LIB = ${HD_BLD_EXEC_PFX}/lib/perl HD_BLD_PYTHON_LIB = ${HD_BLD_EXEC_PFX}/lib/python HD_BLD_PFILES = ${HD_BLD_EXEC_PFX}/syspfiles HD_BLD_REFDATA = ${HD_BLD_EXEC_PFX}/refdata HD_BLD_SCRIPTS = ${HD_BLD_EXEC_PFX}/bin HD_BLD_XML = ${HD_BLD_EXEC_PFX}/xml # For future use if/when refdata moves out from under $HEADAS/: #HD_BLD_REFDATA = ${HD_BLD_PFX}/refdata HD_BIN = ${HD_EXEC_PFX}/bin HD_INC = ${HD_EXEC_PFX}/include HD_HELP = ${HD_EXEC_PFX}/help HD_LIB = ${HD_EXEC_PFX}/lib HD_PERL_LIB = ${HD_EXEC_PFX}/lib/perl HD_PYTHON_LIB = ${HD_EXEC_PFX}/lib/python HD_PFILES = ${HD_EXEC_PFX}/syspfiles HD_REFDATA = ${HD_EXEC_PFX}/refdata HD_SCRIPTS = ${HD_EXEC_PFX}/bin HD_XML = ${HD_EXEC_PFX}/xml # For future use if/when refdata moves out from under $HEADAS/: #HD_REFDATA = ${HD_PREFIX}/refdata #------------------------------------------------------------------------------- # The following targets supply default behavior for HEADAS standard # targets. #------------------------------------------------------------------------------- ${HD_TARG_PFX}default: ${HD_LIBRARY_ROOT} ${HD_CTASK} ${HD_CXXTASK} ${HD_FTASK} @if [ "x${HD_SUBDIRS}" != x ]; then \ ${HD_MAKE} default-subdirs; \ fi ${HD_TARG_PFX}all: ${HD_LIBRARY_ROOT} ${HD_CTASK} ${HD_CXXTASK} ${HD_FTASK} @${HD_MAKE} publish @if [ "x${HD_SUBDIRS}" != x ]; then \ ${HD_MAKE} all-subdirs; \ fi ${HD_TARG_PFX}install: @if [ "x${HD_INSTALL_HEADERS}" != x ]; then \ ${HD_MAKE} install-headers; \ fi @if [ "x${HD_INSTALL_LIBRARIES}" != x ]; then \ ${HD_MAKE} install-libraries; \ fi @if [ "x${HD_INSTALL_TASKS}" != x ]; then \ ${HD_MAKE} install-tasks; \ fi @if [ "x${HD_INSTALL_SHELL_SCRIPTS}" != x ]; then \ ${HD_MAKE} install-shell-scripts; \ fi @if [ "x${HD_INSTALL_PFILES}" != x ]; then \ ${HD_MAKE} install-pfiles; \ fi @if [ "x${HD_INSTALL_PERL_LIBS}" != x ]; then \ ${HD_MAKE} install-perl-libraries; \ fi @if [ "x${HD_INSTALL_PERL_SCRIPTS}" != x ]; then \ ${HD_MAKE} install-perl-scripts; \ fi @if [ "x${HD_INSTALL_PYTHON_LIBS}" != x ]; then \ ${HD_MAKE} install-python-libraries; \ fi @if [ "x${HD_INSTALL_PYTHON_SCRIPTS}" != x ]; then \ ${HD_MAKE} install-python-scripts; \ fi @if [ "x${HD_INSTALL_REFDATA}" != x ]; then \ ${HD_MAKE} install-refdata; \ fi @if [ "x${HD_INSTALL_HELP}" != x ]; then \ ${HD_MAKE} install-help; \ fi @if [ "x${HD_INSTALL_XML}" != x ]; then \ ${HD_MAKE} install-xml; \ fi @if [ "x${HD_SUBDIRS}" != x ]; then \ ${HD_MAKE} install-subdirs; \ fi @if [ "x${HD_INSTALL_EXTRA}" != x ]; then \ ${HD_MAKE} ${HD_INSTALL_EXTRA}; \ fi @if [ "x${HD_INSTALL_ONLY_EXTRA}" != x ]; then \ ${HD_MAKE} ${HD_INSTALL_ONLY_EXTRA}; \ fi ${HD_TARG_PFX}force-install: ${HD_MAKE} install HD_INSTALL="hd_install -f" ${HD_TARG_PFX}backup: @if [ "x${HD_INSTALL_LIBRARIES}" != x ]; then \ ${HD_MAKE} backup-libraries; \ fi @if [ "x${HD_INSTALL_TASKS}" != x ]; then \ ${HD_MAKE} backup-tasks; \ fi @if [ "x${HD_SUBDIRS}" != x ]; then \ ${HD_MAKE} backup-subdirs; \ fi ${HD_TARG_PFX}local: VPATH="${VPATH_LOCAL}" ${HD_MAKE} default \ HD_IFLAGS="${HD_IFLAGS_LOCAL}" HD_LFLAGS="${HD_LFLAGS_LOCAL}" \ HD_STD_CFLAGS="${HD_STD_CFLAGS_LOCAL}" \ HD_STD_CLIBS="${HD_STD_CLIBS_LOCAL}" \ HD_STD_CXXFLAGS="${HD_STD_CXXFLAGS_LOCAL}" \ HD_STD_CXXLIBS="${HD_STD_CXXLIBS_LOCAL}" ${HD_TARG_PFX}publish: @if [ "${HD_INSTALL_HEADERS} ${HD_PUBLISH_HEADERS}" != " " ]; then \ ${HD_MAKE} publish-headers; \ fi @if [ "${HD_INSTALL_LIBRARIES} ${HD_PUBLISH_LIBRARIES}" != " " ]; then \ ${HD_MAKE} publish-libraries; \ fi @if [ "${HD_INSTALL_TASKS} ${HD_PUBLISH_TASKS}" != " " ]; then \ ${HD_MAKE} publish-tasks; \ fi @if [ "${HD_INSTALL_SHELL_SCRIPTS} ${HD_PUBLISH_SHELL_SCRIPTS}" != " " ]; then \ ${HD_MAKE} publish-shell-scripts; \ fi @if [ "${HD_INSTALL_PFILES} ${HD_PUBLISH_PFILES}" != " " ]; then \ ${HD_MAKE} publish-pfiles; \ fi @if [ "${HD_INSTALL_PERL_LIBS} ${HD_PUBLISH_PERL_LIBS}" != " " ]; then \ ${HD_MAKE} publish-perl-libraries; \ fi @if [ "${HD_INSTALL_PERL_SCRIPTS} ${HD_PUBLISH_PERL_SCRIPTS}" != " " ]; then \ ${HD_MAKE} publish-perl-scripts; \ fi @if [ "${HD_INSTALL_PYTHON_LIBS} ${HD_PUBLISH_PYTHON_LIBS}" != " " ]; then \ ${HD_MAKE} publish-python-libraries; \ fi @if [ "${HD_INSTALL_PYTHON_SCRIPTS} ${HD_PUBLISH_PYTHON_SCRIPTS}" != " " ]; then \ ${HD_MAKE} publish-python-scripts; \ fi @if [ "${HD_INSTALL_REFDATA} ${HD_PUBLISH_REFDATA}" != " " ]; then \ ${HD_MAKE} publish-refdata; \ fi @if [ "${HD_INSTALL_HELP} ${HD_PUBLISH_HELP}" != " " ]; then \ ${HD_MAKE} publish-help; \ fi @if [ "${HD_INSTALL_XML} ${HD_PUBLISH_XML}" != " " ]; then \ ${HD_MAKE} publish-xml; \ fi @if [ "x${HD_INSTALL_EXTRA}" != x ]; then \ ${HD_MAKE} ${HD_INSTALL_EXTRA} HD_CP_P="${HD_LN_S}" \ HD_TOP_EXEC_PFX=${HD_BLD_EXEC_PFX} \ HD_EXEC_PFX=${HD_BLD_EXEC_PFX}; \ fi ${HD_TARG_PFX}test: ${HD_TEST_CTASK} ${HD_TEST_CXXTASK} @if [ "x${HD_TEST_SUBDIRS}" != x ]; then \ ${HD_MAKE} test-subdirs; \ fi ${HD_TARG_PFX}install-test: @if [ "x${HD_TEST_HEADERS}" != x ]; then \ ${HD_MAKE} install-test-headers; \ fi @if [ "x${HD_TEST_LIBRARIES}" != x ]; then \ ${HD_MAKE} install-test-libraries; \ fi @if [ "x${HD_TEST_TASKS}" != x ]; then \ ${HD_MAKE} install-test-tasks; \ fi @if [ "x${HD_TEST_SHELL_SCRIPTS}" != x ]; then \ ${HD_MAKE} install-test-shell-scripts; \ fi @if [ "x${HD_TEST_PFILES}" != x ]; then \ ${HD_MAKE} install-test-pfiles; \ fi @if [ "x${HD_TEST_PERL_LIBS}" != x ]; then \ ${HD_MAKE} install-test-perl-libraries; \ fi @if [ "x${HD_TEST_PERL_SCRIPTS}" != x ]; then \ ${HD_MAKE} install-test-perl-scripts; \ fi @if [ "x${HD_TEST_PYTHON_LIBS}" != x ]; then \ ${HD_MAKE} install-test-python-libraries; \ fi @if [ "x${HD_TEST_PYTHON_SCRIPTS}" != x ]; then \ ${HD_MAKE} install-test-python-scripts; \ fi @if [ "x${HD_TEST_REFDATA}" != x ]; then \ ${HD_MAKE} install-test-refdata; \ fi @if [ "x${HD_TEST_HELP}" != x ]; then \ ${HD_MAKE} install-test-help; \ fi @if [ "x${HD_TEST_XML}" != x ]; then \ ${HD_MAKE} install-test-xml; \ fi @if [ "x${HD_TEST_SUBDIRS}" != x ]; then \ ${HD_MAKE} install-test-subdirs; \ fi @if [ "x${HD_TEST_EXTRA}" != x ]; then \ ${HD_MAKE} ${HD_TEST_EXTRA}; \ fi ${HD_TARG_PFX}run-test: @if [ "x${HD_TEST_SUBDIRS}" != x ]; then \ ${HD_MAKE} run-test-subdirs; \ fi ${HD_TARG_PFX}distclean: clean-local distclean-subdirs distclean-test-subdirs @if [ "${HD_DISTCLEAN}" != ' ' ]; then \ echo "rm -rf ${HD_DISTCLEAN}"; \ rm -rf ${HD_DISTCLEAN}; \ fi ${HD_TARG_PFX}clean: clean-local clean-subdirs clean-test-subdirs ${HD_TARG_PFX}clean-local: rm -f *.${OSUF} core ${HD_CTASK}${BSUF} ${HD_CXXTASK}${BSUF} \ ${HD_FTASK}${BSUF} ${HD_TEST_CTASK}${BSUF} ${HD_TEST_CXXTASK}${BSUF} rm -rf SunWS_cache so_locations @if [ "x${HD_CLEAN}" != x ]; then \ echo "rm -rf ${HD_CLEAN}"; \ rm -rf ${HD_CLEAN}; \ fi @if [ "x${HD_LIBRARY_ROOT}" != x ]; then \ echo "rm -f lib${HD_LIBRARY_ROOT}${HD_COMPONENT_VERS}.a"; \ rm -f lib${HD_LIBRARY_ROOT}${HD_COMPONENT_VERS}.a; \ echo "rm -f lib${HD_LIBRARY_ROOT}${HD_COMPONENT_VERS}${SHLIB_SUFFIX}"; \ rm -f lib${HD_LIBRARY_ROOT}${HD_COMPONENT_VERS}${SHLIB_SUFFIX}; \ fi @if [ "x${HD_CTASK}" != x ]; then \ echo "rm -f ${HD_BLD_BIN}/${HD_CTASK}${BSUF}"; \ rm -f ${HD_BLD_BIN}/${HD_CTASK}${BSUF}; \ fi @if [ "x${HD_CXXTASK}" != x ]; then \ echo "rm -f ${HD_BLD_BIN}/${HD_CXXTASK}${BSUF}"; \ rm -f ${HD_BLD_BIN}/${HD_CXXTASK}${BSUF}; \ fi @if [ "x${HD_FTASK}" != x ]; then \ echo "rm -f ${HD_BLD_BIN}/${HD_FTASK}${BSUF}"; \ rm -f ${HD_BLD_BIN}/${HD_FTASK}${BSUF}; \ fi @if [ "x${HD_LIBRARY_ROOT}" != x ]; then \ echo "rm -f ${HD_BLD_LIB}/lib${HD_LIBRARY_ROOT}${HD_COMPONENT_VERS}.a"; \ rm -f ${HD_BLD_LIB}/lib${HD_LIBRARY_ROOT}${HD_COMPONENT_VERS}.a; \ echo "rm -f ${HD_BLD_LIB}/lib${HD_LIBRARY_ROOT}${HD_COMPONENT_VERS}${SHLIB_SUFFIX}"; \ rm -f ${HD_BLD_LIB}/lib${HD_LIBRARY_ROOT}${HD_COMPONENT_VERS}${SHLIB_SUFFIX}; \ fi @if [ "x${HD_INSTALL_HEADERS}" != x ]; then \ for file in ${HD_INSTALL_HEADERS} .; do \ if [ $$file = . ]; then continue; fi; \ echo "rm -f ${HD_BLD_INC}/${HD_INC_SUBDIR}/$$file"; \ rm -f ${HD_BLD_INC}/${HD_INC_SUBDIR}/$$file; \ done; \ fi @-if [ "x${HD_INC_SUBDIR}" != x ]; then \ echo "rmdir ${HD_BLD_INC}/${HD_INC_SUBDIR}"; \ rmdir ${HD_BLD_INC}/${HD_INC_SUBDIR}; \ fi @if [ "x${HD_INSTALL_SHELL_SCRIPTS}" != x ]; then \ for file in ${HD_INSTALL_SHELL_SCRIPTS} .; do \ if [ $$file = . ]; then continue; fi; \ echo "rm -f ${HD_BLD_SCRIPTS}/$$file"; \ rm -f ${HD_BLD_SCRIPTS}/$$file; \ done; \ fi @if [ "x${HD_INSTALL_PFILES}" != x ]; then \ for file in ${HD_INSTALL_PFILES} .; do \ if [ $$file = . ]; then continue; fi; \ echo "rm -f ${HD_BLD_PFILES}/$$file"; \ rm -f ${HD_BLD_PFILES}/$$file; \ done; \ fi @if [ "x${HD_INSTALL_PERL_LIBS}" != x ]; then \ for file in ${HD_INSTALL_PERL_LIBS} .; do \ if [ $$file = . ]; then continue; fi; \ echo "rm -f ${HD_BLD_PERL_LIB}/${HD_PERL_SUBDIR}/$$file"; \ rm -f ${HD_BLD_PERL_LIB}/${HD_PERL_SUBDIR}/$$file; \ done; \ fi @-if [ "x${HD_PERL_SUBDIR}" != x ]; then \ echo "rmdir ${HD_BLD_PERL_LIB}/${HD_PERL_SUBDIR}"; \ rmdir ${HD_BLD_PERL_LIB}/${HD_PERL_SUBDIR}; \ fi @if [ "x${HD_INSTALL_PERL_SCRIPTS}" != x ]; then \ for file in ${HD_INSTALL_PERL_SCRIPTS} .; do \ if [ $$file = . ]; then continue; fi; \ echo "rm -f ${HD_BLD_SCRIPTS}/$$file"; \ rm -f ${HD_BLD_SCRIPTS}/$$file; \ done; \ fi @if [ "x${HD_INSTALL_PYTHON_LIBS}" != x ]; then \ for file in ${HD_INSTALL_PYTHON_LIBS} .; do \ if [ $$file = . ]; then continue; fi; \ echo "rm -f ${HD_BLD_PYTHON_LIB}/${HD_PYTHON_SUBDIR}/$$file"; \ rm -f ${HD_BLD_PYTHON_LIB}/${HD_PYTHON_SUBDIR}/$$file; \ done; \ fi @-if [ "x${HD_PYTHON_SUBDIR}" != x ]; then \ echo "rmdir ${HD_BLD_PYTHON_LIB}/${HD_PYTHON_SUBDIR}"; \ rmdir ${HD_BLD_PYTHON_LIB}/${HD_PYTHON_SUBDIR}; \ fi @if [ "x${HD_INSTALL_PYTHON_SCRIPTS}" != x ]; then \ for file in ${HD_INSTALL_PYTHON_SCRIPTS} .; do \ if [ $$file = . ]; then continue; fi; \ echo "rm -f ${HD_BLD_SCRIPTS}/$$file"; \ rm -f ${HD_BLD_SCRIPTS}/$$file; \ done; \ fi @if [ "x${HD_INSTALL_REFDATA}" != x ]; then \ for file in ${HD_INSTALL_REFDATA} .; do \ if [ $$file = . ]; then continue; fi; \ echo "rm -f ${HD_BLD_REFDATA}/${HD_REFDATA_SUBDIR}/$$file"; \ rm -f ${HD_BLD_REFDATA}/${HD_REFDATA_SUBDIR}/$$file; \ done; \ fi @-if [ "x${HD_REFDATA_SUBDIR}" != x ]; then \ echo "rmdir ${HD_BLD_REFDATA}/${HD_REFDATA_SUBDIR}"; \ rmdir ${HD_BLD_REFDATA}/${HD_REFDATA_SUBDIR}; \ fi @if [ "x${HD_INSTALL_HELP}" != x ]; then \ for file in ${HD_INSTALL_HELP} .; do \ if [ $$file = . ]; then continue; fi; \ echo "rm -f ${HD_BLD_HELP}/$$file"; \ rm -f ${HD_BLD_HELP}/$$file; \ done; \ fi @if [ "x${HD_INSTALL_XML}" != x ]; then \ for file in ${HD_INSTALL_XML} .; do \ if [ $$file = . ]; then continue; fi; \ echo "rm -f ${HD_BLD_XML}/${HD_XML_SUBDIR}/$$file"; \ rm -f ${HD_BLD_XML}/${HD_XML_SUBDIR}/$$file; \ done; \ fi @-if [ "x${HD_XML_SUBDIR}" != x ]; then \ echo "rmdir ${HD_BLD_XML}/${HD_XML_SUBDIR}"; \ rmdir ${HD_BLD_XML}/${HD_XML_SUBDIR}; \ fi @if [ "x${HD_TEST_CTASK}" != x ]; then \ echo "rm -f ${HD_BLD_BIN}/${HD_TEST_CTASK}${BSUF}"; \ rm -f ${HD_BLD_BIN}/${HD_TEST_CTASK}${BSUF}; \ fi @if [ "x${HD_TEST_CXXTASK}" != x ]; then \ echo "rm -f ${HD_BLD_BIN}/${HD_TEST_CXXTASK}${BSUF}"; \ rm -f ${HD_BLD_BIN}/${HD_TEST_CXXTASK}${BSUF}; \ fi @if [ "x${HD_TEST_HEADERS}" != x ]; then \ for file in ${HD_TEST_HEADERS} .; do \ if [ $$file = . ]; then continue; fi; \ echo "rm -f ${HD_BLD_INC}/$$file"; \ rm -f ${HD_BLD_INC}/$$file; \ done; \ fi @if [ "x${HD_TEST_SHELL_SCRIPTS}" != x ]; then \ for file in ${HD_TEST_SHELL_SCRIPTS} .; do \ if [ $$file = . ]; then continue; fi; \ echo "rm -f ${HD_BLD_SCRIPTS}/$$file"; \ rm -f ${HD_BLD_SCRIPTS}/$$file; \ done; \ fi @if [ "x${HD_TEST_PFILES}" != x ]; then \ for file in ${HD_TEST_PFILES} .; do \ if [ $$file = . ]; then continue; fi; \ echo "rm -f ${HD_BLD_PFILES}/$$file"; \ rm -f ${HD_BLD_PFILES}/$$file; \ done; \ fi @if [ "x${HD_TEST_PERL_LIBS}" != x ]; then \ for file in ${HD_TEST_PERL_LIBS} .; do \ if [ $$file = . ]; then continue; fi; \ echo "rm -f ${HD_BLD_PERL_LIB}/$$file"; \ rm -f ${HD_BLD_PERL_LIB}/$$file; \ done; \ fi @if [ "x${HD_TEST_PERL_SCRIPTS}" != x ]; then \ for file in ${HD_TEST_PERL_SCRIPTS} .; do \ if [ $$file = . ]; then continue; fi; \ echo "rm -f ${HD_BLD_SCRIPTS}/$$file"; \ rm -f ${HD_BLD_SCRIPTS}/$$file; \ done; \ fi @if [ "x${HD_TEST_PYTHON_LIBS}" != x ]; then \ for file in ${HD_TEST_PYTHON_LIBS} .; do \ if [ $$file = . ]; then continue; fi; \ echo "rm -f ${HD_BLD_PYTHON_LIB}/$$file"; \ rm -f ${HD_BLD_PYTHON_LIB}/$$file; \ done; \ fi @if [ "x${HD_TEST_PYTHON_SCRIPTS}" != x ]; then \ for file in ${HD_TEST_PYTHON_SCRIPTS} .; do \ if [ $$file = . ]; then continue; fi; \ echo "rm -f ${HD_BLD_SCRIPTS}/$$file"; \ rm -f ${HD_BLD_SCRIPTS}/$$file; \ done; \ fi @if [ "x${HD_TEST_REFDATA}" != x ]; then \ for file in ${HD_TEST_REFDATA} .; do \ if [ $$file = . ]; then continue; fi; \ echo "rm -f ${HD_BLD_REFDATA}/$$file"; \ rm -f ${HD_BLD_REFDATA}/$$file; \ done; \ fi @if [ "x${HD_TEST_HELP}" != x ]; then \ for file in ${HD_TEST_HELP} .; do \ if [ $$file = . ]; then continue; fi; \ echo "rm -f ${HD_BLD_HELP}/$$file"; \ rm -f ${HD_BLD_HELP}/$$file; \ done; \ fi @if [ "x${HD_TEST_XML}" != x ]; then \ for file in ${HD_TEST_XML} .; do \ if [ $$file = . ]; then continue; fi; \ echo "rm -f ${HD_BLD_XML}/$$file"; \ rm -f ${HD_BLD_XML}/$$file; \ done; \ fi #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- # The following targets supply default behavior for install-related targets #------------------------------------------------------------------------------- ${HD_TARG_PFX}install-headers: @for file in ${HD_INSTALL_HEADERS} ${HD_INSTALL_ONLY_HEADERS} .; do \ if [ $$file = . ]; then continue; fi; \ filepart=`echo $$file | sed 's%.*/%%'`; \ ${HD_INSTALL} $$file ${HD_INC}/${HD_INC_SUBDIR}/$$filepart ${HD_CP_P}; \ status=$$?; if [ $$status -ne 0 ]; then exit $$status; fi; \ if [ "x${HD_INC}" != "x${HD_TOP_INC}" ]; then \ ${HD_INSTALL} ${HD_INC}/${HD_INC_SUBDIR}/$$filepart \ ${HD_TOP_INC}/${HD_INC_SUBDIR}/$$filepart ${HD_LN_S}; \ status=$$?; if [ $$status -ne 0 ]; then exit $$status; fi; \ fi; \ done # Note: this is slightly different from the rest of the install targets ${HD_TARG_PFX}install-libraries: @for file in ${HD_INSTALL_LIBRARIES} ${HD_INSTALL_ONLY_LIBRARIES} .; do \ if [ $$file = . ]; then continue; fi; \ filepart=`echo $$file | sed 's%.*/%%'`; \ static_file=`echo $$file | sed "s%$$filepart$$%lib$${filepart}${HD_COMPONENT_VERS}.a%"`; \ shared_file=`echo $$file | sed "s%$$filepart$$%lib$${filepart}${HD_COMPONENT_VERS}${SHLIB_SUFFIX}%"`; \ static_filepart="lib$${filepart}${HD_COMPONENT_VERS}.a"; \ shared_filepart="lib$${filepart}${HD_COMPONENT_VERS}${SHLIB_SUFFIX}"; \ if [ -f $$static_file ]; then \ ${HD_INSTALL} $$static_file ${HD_LIB}/$$static_filepart ${HD_CP_P}; \ fi; \ if [ -f $$shared_file ]; then \ ${HD_INSTALL} $$shared_file ${HD_LIB}/$$shared_filepart ${HD_CP_P}; \ fi; \ status=$$?; if [ $$status -ne 0 ]; then exit $$status; fi; \ if [ "x${HD_LIB}" != "x${HD_TOP_LIB}" ]; then \ if [ -f ${HD_LIB}/$$static_filepart ]; then \ ${HD_INSTALL} ${HD_LIB}/$$static_filepart ${HD_TOP_LIB}/$$static_filepart ${HD_LN_S}; \ fi; \ if [ -f ${HD_LIB}/$$shared_filepart ]; then \ ${HD_INSTALL} ${HD_LIB}/$$shared_filepart ${HD_TOP_LIB}/$$shared_filepart ${HD_LN_S}; \ fi; \ status=$$?; if [ $$status -ne 0 ]; then exit $$status; fi; \ fi; \ done ${HD_TARG_PFX}install-tasks: @for file in ${HD_INSTALL_TASKS} ${HD_INSTALL_ONLY_TASKS} .; do \ if [ $$file = . ]; then continue; fi; \ filepart=`echo $$file | sed 's%.*/%%'`; \ ${HD_INSTALL} $$file${BSUF} ${HD_BIN}/$$filepart${BSUF} ${HD_CP_P}; \ status=$$?; if [ $$status -ne 0 ]; then exit $$status; fi; \ if [ "x${HD_BIN}" != "x${HD_TOP_BIN}" ]; then \ ${HD_INSTALL} ${HD_BIN}/$$filepart${BSUF} ${HD_TOP_BIN}/$$filepart${BSUF} ${HD_LN_S}; \ status=$$?; if [ $$status -ne 0 ]; then exit $$status; fi; \ fi; \ done ${HD_TARG_PFX}install-shell-scripts: @for file in ${HD_INSTALL_SHELL_SCRIPTS} ${HD_INSTALL_ONLY_SHELL_SCRIPTS} .; do \ if [ $$file = . ]; then continue; fi; \ filepart=`echo $$file | sed 's%.*/%%'`; \ ${HD_INSTALL} $$file ${HD_SCRIPTS}/$$filepart ${HD_CP_P}; \ status=$$?; if [ $$status -ne 0 ]; then exit $$status; fi; \ if [ "x${HD_SCRIPTS}" != "x${HD_TOP_SCRIPTS}" ]; then \ ${HD_INSTALL} ${HD_SCRIPTS}/$$filepart ${HD_TOP_SCRIPTS}/$$filepart ${HD_LN_S}; \ status=$$?; if [ $$status -ne 0 ]; then exit $$status; fi; \ fi; \ done ${HD_TARG_PFX}install-pfiles: @for file in ${HD_INSTALL_PFILES} ${HD_INSTALL_ONLY_PFILES} .; do \ if [ $$file = . ]; then continue; fi; \ filepart=`echo $$file | sed 's%.*/%%'`; \ ${HD_INSTALL} $$file ${HD_PFILES}/$$filepart ${HD_CP}; \ status=$$?; if [ $$status -ne 0 ]; then exit $$status; fi; \ if [ "x${HD_PFILES}" != "x${HD_TOP_PFILES}" ]; then \ ${HD_INSTALL} ${HD_PFILES}/$$filepart ${HD_TOP_PFILES}/$$filepart ${HD_LN_S}; \ status=$$?; if [ $$status -ne 0 ]; then exit $$status; fi; \ fi; \ done ${HD_TARG_PFX}install-perl-libraries: @for file in ${HD_INSTALL_PERL_LIBS} ${HD_INSTALL_ONLY_PERL_LIBS} .; do \ if [ $$file = . ]; then continue; fi; \ filepart=`echo $$file | sed 's%.*/%%'`; \ ${HD_INSTALL} $$file ${HD_PERL_LIB}/${HD_PERL_SUBDIR}/$$filepart ${HD_CP_P}; \ status=$$?; if [ $$status -ne 0 ]; then exit $$status; fi; \ if [ "x${HD_PERL_LIB}" != "x${HD_TOP_PERL_LIB}" ]; then \ ${HD_INSTALL} ${HD_PERL_LIB}/${HD_PERL_SUBDIR}/$$filepart ${HD_TOP_PERL_LIB}/${HD_PERL_SUBDIR}/$$filepart ${HD_LN_S}; \ status=$$?; if [ $$status -ne 0 ]; then exit $$status; fi; \ fi; \ done ${HD_TARG_PFX}install-perl-scripts: @for file in ${HD_INSTALL_PERL_SCRIPTS} ${HD_INSTALL_ONLY_PERL_SCRIPTS} .; do \ if [ $$file = . ]; then continue; fi; \ filepart=`echo $$file | sed 's%.*/%%'`; \ ${HD_INSTALL} $$file ${HD_SCRIPTS}/$$filepart ${HD_CP_P}; \ status=$$?; if [ $$status -ne 0 ]; then exit $$status; fi; \ lhea-fixperl ${HD_SCRIPTS}/$$filepart; \ status=$$?; if [ $$status -ne 0 ]; then exit $$status; fi; \ if [ "x${HD_SCRIPTS}" != "x${HD_TOP_SCRIPTS}" ]; then \ ${HD_INSTALL} ${HD_SCRIPTS}/$$filepart ${HD_TOP_SCRIPTS}/$$filepart ${HD_LN_S}; \ status=$$?; if [ $$status -ne 0 ]; then exit $$status; fi; \ filepart_no_pl_suffix=`echo $$filepart | sed 's%.pl$$%%'`; \ if [ $$filepart != $$filepart_no_pl_suffix ]; then \ ${HD_INSTALL} ${HD_TOP_SCRIPTS}/$$filepart ${HD_TOP_SCRIPTS}/$$filepart_no_pl_suffix ${HD_LN_S}; \ status=$$?; if [ $$status -ne 0 ]; then exit $$status; fi; \ fi; \ fi; \ done ${HD_TARG_PFX}install-python-libraries: @for file in ${HD_INSTALL_PYTHON_LIBS} ${HD_INSTALL_ONLY_PYTHON_LIBS} .; do \ if [ $$file = . ]; then continue; fi; \ filepart=`echo $$file | sed 's%.*/%%'`; \ ${HD_INSTALL} $$file ${HD_PYTHON_LIB}/${HD_PYTHON_SUBDIR}/$$filepart ${HD_CP_P}; \ status=$$?; if [ $$status -ne 0 ]; then exit $$status; fi; \ if [ "x${HD_PYTHON_LIB}" != "x${HD_TOP_PYTHON_LIB}" ]; then \ ${HD_INSTALL} ${HD_PYTHON_LIB}/${HD_PYTHON_SUBDIR}/$$filepart ${HD_TOP_PYTHON_LIB}/${HD_PYTHON_SUBDIR}/$$filepart ${HD_LN_S}; \ status=$$?; if [ $$status -ne 0 ]; then exit $$status; fi; \ fi; \ done ${HD_TARG_PFX}install-python-scripts: @for file in ${HD_INSTALL_PYTHON_SCRIPTS} ${HD_INSTALL_ONLY_PYTHON_SCRIPTS} .; do \ if [ $$file = . ]; then continue; fi; \ filepart=`echo $$file | sed 's%.*/%%'`; \ ${HD_INSTALL} $$file ${HD_SCRIPTS}/$$filepart ${HD_CP_P}; \ status=$$?; if [ $$status -ne 0 ]; then exit $$status; fi; \ if [ "x${HD_SCRIPTS}" != "x${HD_TOP_SCRIPTS}" ]; then \ ${HD_INSTALL} ${HD_SCRIPTS}/$$filepart ${HD_TOP_SCRIPTS}/$$filepart ${HD_LN_S}; \ status=$$?; if [ $$status -ne 0 ]; then exit $$status; fi; \ fi; \ done ${HD_TARG_PFX}install-refdata: @for file in ${HD_INSTALL_REFDATA} ${HD_INSTALL_ONLY_REFDATA} .; do \ if [ $$file = . ]; then continue; fi; \ filepart=`echo $$file | sed 's%.*/%%'`; \ ${HD_INSTALL} $$file ${HD_REFDATA}/${HD_REFDATA_SUBDIR}/$$filepart ${HD_CP_P}; \ status=$$?; if [ $$status -ne 0 ]; then exit $$status; fi; \ if [ "x${HD_REFDATA}" != "x${HD_TOP_REFDATA}" ]; then \ ${HD_INSTALL} ${HD_REFDATA}/${HD_REFDATA_SUBDIR}/$$filepart \ ${HD_TOP_REFDATA}/${HD_REFDATA_SUBDIR}/$$filepart ${HD_LN_S}; \ status=$$?; if [ $$status -ne 0 ]; then exit $$status; fi; \ fi; \ done ${HD_TARG_PFX}install-help: @for file in ${HD_INSTALL_HELP} ${HD_INSTALL_ONLY_HELP} .; do \ if [ $$file = . ]; then continue; fi; \ filepart=`echo $$file | sed 's%.*/%%'`; \ ${HD_INSTALL} $$file ${HD_HELP}/$$filepart ${HD_CP_P}; \ status=$$?; if [ $$status -ne 0 ]; then exit $$status; fi; \ if [ "x${HD_HELP}" != "x${HD_TOP_HELP}" ]; then \ ${HD_INSTALL} ${HD_HELP}/$$filepart ${HD_TOP_HELP}/$$filepart ${HD_LN_S}; \ status=$$?; if [ $$status -ne 0 ]; then exit $$status; fi; \ fi; \ done ${HD_TARG_PFX}install-xml: @for file in ${HD_INSTALL_XML} ${HD_INSTALL_ONLY_XML} .; do \ if [ $$file = . ]; then continue; fi; \ filepart=`echo $$file | sed 's%.*/%%'`; \ ${HD_INSTALL} $$file ${HD_XML}/${HD_XML_SUBDIR}/$$filepart ${HD_CP_P}; \ status=$$?; if [ $$status -ne 0 ]; then exit $$status; fi; \ if [ "x${HD_XML}" != "x${HD_TOP_XML}" ]; then \ ${HD_INSTALL} ${HD_XML}/${HD_XML_SUBDIR}/$$filepart \ ${HD_TOP_XML}/${HD_XML_SUBDIR}/$$filepart ${HD_LN_S}; \ status=$$?; if [ $$status -ne 0 ]; then exit $$status; fi; \ fi; \ done ${HD_TARG_PFX}install-extra: ${HD_TARG_PFX}install-symlinks: @for file in `ls -a ${HD_EXEC_PFX} 2> /dev/null` .; do \ if [ $$file = . -o $$file = .. -o $$file = BUILD_DIR ]; then continue; fi; \ ${HD_INSTALL} ${HD_EXEC_PFX}/$$file ${HD_TOP_EXEC_PFX}/$$file ${HD_LN_S}; \ status=$$?; if [ $$status -ne 0 ]; then exit $$status; fi; \ done #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- # The following targets supply default behavior for backup-related targets #------------------------------------------------------------------------------- ${HD_TARG_PFX}backup-libraries: @for file in ${HD_INSTALL_LIBRARIES} ${HD_INSTALL_ONLY_LIBRARIES} .; do \ if [ $$file = . ]; then continue; fi; \ filepart=`echo $$file | sed 's%.*/%%'`; \ shared_filepart="lib$${filepart}${HD_COMPONENT_VERS}${SHLIB_SUFFIX}"; \ shared_backup="lib$${filepart}${HD_COMPONENT_VERS}-bak${SHLIB_SUFFIX}"; \ ${HD_INSTALL} ${HD_LIB}/$$shared_filepart ${HD_LIB}/$$shared_backup ${HD_MV_F}; \ status=$$?; if [ $$status -ne 0 ]; then exit $$status; fi; \ done ${HD_TARG_PFX}backup-tasks: @for file in ${HD_INSTALL_TASKS} ${HD_INSTALL_ONLY_TASKS} .; do \ if [ $$file = . ]; then continue; fi; \ if [ $$file = hd_install ]; then continue; fi; \ filepart=`echo $$file | sed 's%.*/%%'`; \ ${HD_INSTALL} ${HD_BIN}/$$filepart${BSUF} ${HD_BIN}/$$filepart-bak${BSUF} ${HD_MV_F}; \ status=$$?; if [ $$status -ne 0 ]; then exit $$status; fi; \ done #------------------------------------------------------------------------------- # The following targets supply default behavior for publish-related targets #------------------------------------------------------------------------------- ${HD_TARG_PFX}publish-headers: @${HD_MAKE} install-headers HD_CP_P="${HD_LN_S}" \ HD_INSTALL_HEADERS="${HD_INSTALL_HEADERS} ${HD_PUBLISH_HEADERS}" \ HD_INSTALL_ONLY_HEADERS="" \ HD_TOP_EXEC_PFX=${HD_BLD_EXEC_PFX} HD_EXEC_PFX=${HD_BLD_EXEC_PFX} ${HD_TARG_PFX}publish-libraries: @${HD_MAKE} install-libraries HD_CP_P="${HD_LN_S}" \ HD_INSTALL_LIBRARIES="${HD_INSTALL_LIBRARIES} ${HD_PUBLISH_LIBRARIES}" \ HD_INSTALL_ONLY_LIBRARIES="" \ HD_TOP_EXEC_PFX=${HD_BLD_EXEC_PFX} HD_EXEC_PFX=${HD_BLD_EXEC_PFX} ${HD_TARG_PFX}publish-tasks: @${HD_MAKE} install-tasks HD_CP_P="${HD_LN_S}" \ HD_INSTALL_TASKS="${HD_INSTALL_TASKS} ${HD_PUBLISH_TASKS}" \ HD_INSTALL_ONLY_TASKS="" \ HD_TOP_EXEC_PFX=${HD_BLD_EXEC_PFX} HD_EXEC_PFX=${HD_BLD_EXEC_PFX} ${HD_TARG_PFX}publish-shell-scripts: @${HD_MAKE} install-shell-scripts HD_CP_P="${HD_LN_S}" \ HD_INSTALL_SHELL_SCRIPTS="${HD_INSTALL_SHELL_SCRIPTS} ${HD_PUBLISH_SHELL_SCRIPTS}" \ HD_INSTALL_ONLY_SHELL_SCRIPTS="" \ HD_TOP_EXEC_PFX=${HD_BLD_EXEC_PFX} HD_EXEC_PFX=${HD_BLD_EXEC_PFX} ${HD_TARG_PFX}publish-pfiles: @${HD_MAKE} install-pfiles HD_CP_P="${HD_LN_S}" \ HD_INSTALL_PFILES="${HD_INSTALL_PFILES} ${HD_PUBLISH_PFILES}" \ HD_INSTALL_ONLY_PFILES="" \ HD_TOP_EXEC_PFX=${HD_BLD_EXEC_PFX} HD_EXEC_PFX=${HD_BLD_EXEC_PFX} ${HD_TARG_PFX}publish-perl-libraries: @${HD_MAKE} install-perl-libraries HD_CP_P="${HD_LN_S}" \ HD_INSTALL_PERL_LIBS="${HD_INSTALL_PERL_LIBS} ${HD_PUBLISH_PERL_LIBS}" \ HD_INSTALL_ONLY_PERL_LIBS="" \ HD_TOP_EXEC_PFX=${HD_BLD_EXEC_PFX} HD_EXEC_PFX=${HD_BLD_EXEC_PFX} # Do not use sym-link when installing perl scripts, because they # are actually edited at install time by lhea-fixperl. ${HD_TARG_PFX}publish-perl-scripts: @${HD_MAKE} install-perl-scripts \ HD_INSTALL_PERL_SCRIPTS="${HD_INSTALL_PERL_SCRIPTS} ${HD_PUBLISH_PERL_SCRIPTS}" \ HD_INSTALL_ONLY_PERL_SCRIPTS="" \ HD_TOP_EXEC_PFX=${HD_BLD_EXEC_PFX} HD_EXEC_PFX=${HD_BLD_EXEC_PFX} ${HD_TARG_PFX}publish-python-libraries: @${HD_MAKE} install-python-libraries HD_CP_P="${HD_LN_S}" \ HD_INSTALL_PYTHON_LIBS="${HD_INSTALL_PYTHON_LIBS} ${HD_PUBLISH_PYTHON_LIBS}" \ HD_INSTALL_ONLY_PYTHON_LIBS="" \ HD_TOP_EXEC_PFX=${HD_BLD_EXEC_PFX} HD_EXEC_PFX=${HD_BLD_EXEC_PFX} ${HD_TARG_PFX}publish-python-scripts: @${HD_MAKE} install-python-scripts HD_CP_P="${HD_LN_S}" \ HD_INSTALL_PYTHON_SCRIPTS="${HD_INSTALL_PYTHON_SCRIPTS} ${HD_PUBLISH_PYTHON_SCRIPTS}" \ HD_INSTALL_ONLY_PYTHON_SCRIPTS="" \ HD_TOP_EXEC_PFX=${HD_BLD_EXEC_PFX} HD_EXEC_PFX=${HD_BLD_EXEC_PFX} ${HD_TARG_PFX}publish-refdata: @${HD_MAKE} install-refdata HD_CP_P="${HD_LN_S}" \ HD_INSTALL_REFDATA="${HD_INSTALL_REFDATA} ${HD_PUBLISH_REFDATA}" \ HD_INSTALL_ONLY_REFDATA="" \ HD_TOP_EXEC_PFX=${HD_BLD_EXEC_PFX} HD_EXEC_PFX=${HD_BLD_EXEC_PFX} # Leave this stub in (to replace last line of publish-refdata target above) # for future reference if/when refdata moves out from under $HEADAS/: # HD_TOP_PFX=${HD_BLD_PFX} HD_PREFIX=${HD_BLD_PFX} ${HD_TARG_PFX}publish-help: @${HD_MAKE} install-help HD_CP_P="${HD_LN_S}" \ HD_INSTALL_HELP="${HD_INSTALL_HELP} ${HD_PUBLISH_HELP}" \ HD_INSTALL_ONLY_HELP="" \ HD_TOP_EXEC_PFX=${HD_BLD_EXEC_PFX} HD_EXEC_PFX=${HD_BLD_EXEC_PFX} ${HD_TARG_PFX}publish-xml: @${HD_MAKE} install-xml HD_CP_P="${HD_LN_S}" \ HD_INSTALL_XML="${HD_INSTALL_XML} ${HD_PUBLISH_XML}" \ HD_INSTALL_ONLY_XML="" \ HD_TOP_EXEC_PFX=${HD_BLD_EXEC_PFX} HD_EXEC_PFX=${HD_BLD_EXEC_PFX} #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- # The following targets supply default behavior for install-test-related targets #------------------------------------------------------------------------------- ${HD_TARG_PFX}install-test-headers: @${HD_MAKE} install-headers HD_INSTALL_HEADERS="${HD_TEST_HEADERS}" ${HD_TARG_PFX}install-test-libraries: @${HD_MAKE} install-libraries HD_INSTALL_LIBRARIES="${HD_TEST_LIBRARIES}" ${HD_TARG_PFX}install-test-tasks: @${HD_MAKE} install-tasks HD_INSTALL_TASKS="${HD_TEST_TASKS}" ${HD_TARG_PFX}install-test-shell-scripts: @${HD_MAKE} install-shell-scripts HD_INSTALL_SHELL_SCRIPTS="${HD_TEST_SHELL_SCRIPTS}" ${HD_TARG_PFX}install-test-pfiles: @${HD_MAKE} install-pfiles HD_INSTALL_PFILES="${HD_TEST_PFILES}" ${HD_TARG_PFX}install-test-perl-libraries: @${HD_MAKE} install-perl-libraries HD_INSTALL_PERL_LIBS="${HD_TEST_PERL_LIBS}" ${HD_TARG_PFX}install-test-perl-scripts: @${HD_MAKE} install-perl-scripts HD_INSTALL_PERL_SCRIPTS="${HD_TEST_PERL_SCRIPTS}" ${HD_TARG_PFX}install-test-python-libraries: @${HD_MAKE} install-python-libraries HD_INSTALL_PYTHON_LIBS="${HD_TEST_PYTHON_LIBS}" ${HD_TARG_PFX}install-test-python-scripts: @${HD_MAKE} install-python-scripts HD_INSTALL_PYTHON_SCRIPTS="${HD_TEST_PYTHON_SCRIPTS}" ${HD_TARG_PFX}install-test-refdata: @${HD_MAKE} install-refdata HD_INSTALL_REFDATA="${HD_TEST_REFDATA}" ${HD_TARG_PFX}install-test-help: @${HD_MAKE} install-help HD_INSTALL_HELP="${HD_TEST_HELP}" ${HD_TARG_PFX}install-test-xml: @${HD_MAKE} install-xml HD_INSTALL_XML="${HD_TEST_XML}" #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- # The following targets supply default behavior for sub-directories. #------------------------------------------------------------------------------- ${HD_TARG_PFX}subdir: @subpath=". ${HD_SRC}/${HD_COMPONENT_VERS}"; \ for dir in $$subpath; do \ if [ "x${HD_SUBDIR}" != x -a -d $$dir/${HD_SUBDIR} ]; then \ cd $$dir/${HD_SUBDIR}; ${HD_MAKE} ${HD_TARGET}; exit $$?; \ fi; \ done ${HD_TARG_PFX}all-subdirs: @for d in ${HD_SUBDIRS} .; do \ if [ $$d = . ]; then continue; fi; \ ${HD_MAKE} all-$$d; \ status=$$?; if [ $$status -ne 0 ]; then exit $$status; fi; \ done ${HD_TARG_PFX}default-subdirs: @for d in ${HD_SUBDIRS} .; do \ if [ $$d = . ]; then continue; fi; \ ${HD_MAKE} all-$$d; \ status=$$?; if [ $$status -ne 0 ]; then exit $$status; fi; \ done ${HD_TARG_PFX}install-subdirs: @for d in ${HD_SUBDIRS} .; do \ if [ $$d = . ]; then continue; fi; \ ${HD_MAKE} install-$$d; \ status=$$?; if [ $$status -ne 0 ]; then exit $$status; fi; \ done ${HD_TARG_PFX}backup-subdirs: @for d in ${HD_SUBDIRS} .; do \ if [ $$d = . ]; then continue; fi; \ ${HD_MAKE} backup-$$d; \ status=$$?; if [ $$status -ne 0 ]; then exit $$status; fi; \ done ${HD_TARG_PFX}test-subdirs: @for d in ${HD_TEST_SUBDIRS} .; do \ if [ $$d = . ]; then continue; fi; \ ${HD_MAKE} test-$$d; \ status=$$?; if [ $$status -ne 0 ]; then exit $$status; fi; \ done ${HD_TARG_PFX}install-test-subdirs: @for d in ${HD_TEST_SUBDIRS} .; do \ if [ $$d = . ]; then continue; fi; \ ${HD_MAKE} install-test-$$d; \ status=$$?; if [ $$status -ne 0 ]; then exit $$status; fi; \ done ${HD_TARG_PFX}run-test-subdirs: @status=0; for d in ${HD_TEST_SUBDIRS} .; do \ if [ $$d = . ]; then continue; fi; \ if test -d ./$$d; then \ (cd ./$$d; ${HD_MAKE} run-test); if test $$? -ne 0; then status=1; fi; \ elif test -d "${HD_SRC}/${HD_COMPONENT_VERS}/$$d"; then \ (cd ${HD_SRC}/${HD_COMPONENT_VERS}/$$d; ${HD_MAKE} run-test); if test $$? -ne 0; then status=1; fi; \ else \ echo "WARNING: run-test-subdirs did not find directory $$d in/near `pwd`: skipping" >&2; \ fi; \ done; exit $$status ${HD_TARG_PFX}clean-subdirs: @for d in ${HD_SUBDIRS} .; do \ if [ $$d = . ]; then continue; fi; \ ${HD_MAKE} clean-$$d; \ done ${HD_TARG_PFX}distclean-subdirs: @for d in ${HD_SUBDIRS} .; do \ if [ $$d = . ]; then continue; fi; \ ${HD_MAKE} distclean-$$d; \ done ${HD_TARG_PFX}clean-test-subdirs: @for d in ${HD_TEST_SUBDIRS} .; do \ if [ $$d = . ]; then continue; fi; \ ${HD_MAKE} clean-$$d; \ done ${HD_TARG_PFX}distclean-test-subdirs: @for d in ${HD_TEST_SUBDIRS} .; do \ if [ $$d = . ]; then continue; fi; \ ${HD_MAKE} distclean-$$d; \ done #------------------------------------------------------------------------------- # The following targets supply default build behavior for libraries. #------------------------------------------------------------------------------- # Do not delete the body of this target because it suppresses spurious # implicit rules if a source file happens to be named ${HD_LIBRARY_ROOT}.c. ${HD_LIBRARY_ROOT}: ${HD_LIBRARY_ROOT}-${HD_LIB_STYLE} @: ${HD_LIBRARY_ROOT}-static: ${HD_TARG_PFX}force-build @${HD_MAKE} lib${HD_LIBRARY_ROOT}${HD_COMPONENT_VERS}.a \ HD_LIBRARY="lib${HD_LIBRARY_ROOT}${HD_COMPONENT_VERS}.a" ${HD_LIBRARY_ROOT}-shared: ${HD_TARG_PFX}force-build @${HD_MAKE} lib${HD_LIBRARY_ROOT}${HD_COMPONENT_VERS}${SHLIB_SUFFIX} \ HD_SHLIBRARY="lib${HD_LIBRARY_ROOT}${HD_COMPONENT_VERS}${SHLIB_SUFFIX}" HD_LIBRARY_CSRC = ${HD_LIBRARY_SRC_c} HD_LIBRARY_CXXSRC = ${HD_LIBRARY_SRC_C} ${HD_LIBRARY_SRC_cc} \ ${HD_LIBRARY_SRC_cpp} ${HD_LIBRARY_SRC_cxx} HD_LIBRARY_FSRC = ${HD_LIBRARY_SRC_f} ${HD_LIBRARY_SRC_f90} \ ${HD_LIBRARY_SRC_f03} HD_LIBRARY_SRC = ${HD_LIBRARY_CSRC} ${HD_LIBRARY_CXXSRC} \ ${HD_LIBRARY_FSRC} HD_LIBRARY_OBJ = ${HD_LIBRARY_SRC_C:.C=.${OSUF}} \ ${HD_LIBRARY_SRC_c:.c=.${OSUF}} \ ${HD_LIBRARY_SRC_cc:.cc=.${OSUF}} \ ${HD_LIBRARY_SRC_cpp:.cpp=.${OSUF}} \ ${HD_LIBRARY_SRC_cxx:.cxx=.${OSUF}} \ ${HD_LIBRARY_SRC_f:.f=.${OSUF}} \ ${HD_LIBRARY_SRC_f90:.f90=.${OSUF}} \ ${HD_LIBRARY_SRC_f03:.f03=.${OSUF}} ${HD_LIBRARY}: ${HD_LIBRARY_OBJ} @if [ "x${HD_LIBRARY_SRC_C}" = "x" -a \ "x${HD_LIBRARY_SRC_cc}" = "x" -a \ "x${HD_LIBRARY_SRC_cpp}" = "x" -a \ "x${HD_LIBRARY_SRC_cxx}" = "x" ]; then \ ${HD_MAKE} static-lib-c; \ else \ ${HD_MAKE} static-lib-cxx; \ fi static-lib-c: ${ARCHIVE} ${HD_LIBRARY} ${HD_LIBRARY_OBJ} ${RANLIB} ${HD_LIBRARY} static-lib-cxx: ${ARCHIVE_CXX} ${HD_LIBRARY} ${HD_LIBRARY_OBJ} ${RANLIB} ${HD_LIBRARY} ${HD_SHLIBRARY}: ${HD_LIBRARY_OBJ} @if [ "x${HD_LIBRARY_SRC_C}" = "x" -a \ "x${HD_LIBRARY_SRC_cc}" = "x" -a \ "x${HD_LIBRARY_SRC_cpp}" = "x" -a \ "x${HD_LIBRARY_SRC_cxx}" = "x" ]; then \ ${HD_MAKE} shared-lib-c; \ else \ ${HD_MAKE} shared-lib-cxx; \ fi shared-lib-c: @if [ "x${SHLIB_SUFFIX}" = "x.dll" -o \ "x${SHLIB_SUFFIX}" = "x.dylib" -o \ "x${HD_ADD_SHLIB_LIBS}" = "xyes" ]; then \ echo "${SHLIB_LD} ${LDFLAGS_C} -o ${HD_SHLIBRARY} ${HD_LIBRARY_OBJ} ${HD_SHLIB_LIBS}"; \ ${SHLIB_LD} ${LDFLAGS_C} -o ${HD_SHLIBRARY} \ ${HD_LIBRARY_OBJ} ${HD_SHLIB_LIBS}; \ else \ echo "${SHLIB_LD} ${LDFLAGS_C} -o ${HD_SHLIBRARY} ${HD_LIBRARY_OBJ}"; \ ${SHLIB_LD} ${LDFLAGS_C} -o ${HD_SHLIBRARY} \ ${HD_LIBRARY_OBJ}; \ fi shared-lib-cxx: @if [ "x${SHLIB_SUFFIX}" = "x.dll" -o \ "x${SHLIB_SUFFIX}" = "x.dylib" -o \ "x${HD_ADD_SHLIB_LIBS}" = "xyes" ]; then \ if [ "x${HD_PYLIB}" = "xyes" -a "x${LDFLAGS_CXX_PY}" != "x" ]; then \ echo "${SHLIB_LD_CXX} ${LDFLAGS_CXX_PY} -o ${HD_SHLIBRARY} ${HD_LIBRARY_OBJ} ${HD_SHLIB_LIBS}"; \ ${SHLIB_LD_CXX} ${LDFLAGS_CXX_PY} -o ${HD_SHLIBRARY} ${HD_LIBRARY_OBJ} ${HD_SHLIB_LIBS}; \ else \ echo "${SHLIB_LD_CXX} ${LDFLAGS_CXX} -o ${HD_SHLIBRARY} ${HD_LIBRARY_OBJ} ${HD_SHLIB_LIBS}"; \ ${SHLIB_LD_CXX} ${LDFLAGS_CXX} -o ${HD_SHLIBRARY} ${HD_LIBRARY_OBJ} ${HD_SHLIB_LIBS}; \ fi; \ else \ echo "${SHLIB_LD_CXX} ${LDFLAGS_CXX} -o ${HD_SHLIBRARY} ${HD_LIBRARY_OBJ}"; \ ${SHLIB_LD_CXX} ${LDFLAGS_CXX} -o ${HD_SHLIBRARY} \ ${HD_LIBRARY_OBJ}; \ fi #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- # The following targets supply default build behavior for tasks. #------------------------------------------------------------------------------- ${HD_TARG_PFX}task-c: @${HD_MAKE} ${HD_TASK} HD_CTASK=${HD_TASK} ${HD_TARG_PFX}task-cxx: @${HD_MAKE} ${HD_TASK} HD_CXXTASK=${HD_TASK} ${HD_CTASK}: ${HD_CTASK_SRC_c:.c=.${OSUF}} ${HD_CTASK_SRC_f:.f=.${OSUF}} ${HD_CTASK_SRC_f90:.f90=.${OSUF}} ${HD_CTASK_SRC_f03:.f03=.${OSUF}} ${HD_CTASK_DEP} ${CC} -o $@ ${HD_CTASK_SRC_c:.c=.${OSUF}} ${HD_CTASK_SRC_f:.f=.${OSUF}} ${HD_CTASK_SRC_f90:.f90=.${OSUF}} ${HD_CTASK_SRC_f03:.f03=.${OSUF}} ${LDFLAGS_C_BIN} ${HD_CLIBS} ${STRIP} ${HD_CTASK}${BSUF} ${HD_TEST_CTASK}: ${HD_TEST_CTASK_SRC_c:.c=.${OSUF}} ${HD_TEST_CTASK_SRC_f:.f=.${OSUF}} ${HD_TEST_CTASK_SRC_f90:.f90=.${OSUF}} ${HD_TEST_CTASK_SRC_f03:.f03=.${OSUF}} ${HD_CTASK_TEST_DEP} ${CC} -o $@ ${HD_TEST_CTASK_SRC_c:.c=.${OSUF}} ${HD_TEST_CTASK_SRC_f:.f=.${OSUF}} ${HD_TEST_CTASK_SRC_f90:.f90=.${OSUF}} ${HD_TEST_CTASK_SRC_f03:.f03=.${OSUF}} ${LDFLAGS_C_BIN} ${HD_CLIBS} ${STRIP} ${HD_TEST_CTASK}${BSUF} HD_CXXTASK_SRC = ${HD_CXXTASK_SRC_C} ${HD_CXXTASK_SRC_c} \ ${HD_CXXTASK_SRC_cc} ${HD_CXXTASK_SRC_cpp} \ ${HD_CXXTASK_SRC_cxx} ${HD_CXXTASK_SRC_f} \ ${HD_CXXTASK_SRC_f90} ${HD_CXXTASK_SRC_f03} HD_CXXTASK_OBJ = ${HD_CXXTASK_SRC_C:.C=.${OSUF}} \ ${HD_CXXTASK_SRC_c:.c=.${OSUF}} \ ${HD_CXXTASK_SRC_cc:.cc=.${OSUF}} \ ${HD_CXXTASK_SRC_cpp:.cpp=.${OSUF}} \ ${HD_CXXTASK_SRC_cxx:.cxx=.${OSUF}} \ ${HD_CXXTASK_SRC_f:.f=.${OSUF}} \ ${HD_CXXTASK_SRC_f90:.f90=.${OSUF}} \ ${HD_CXXTASK_SRC_f03:.f03=.${OSUF}} ${HD_CXXTASK}: ${HD_CXXTASK_OBJ} ${HD_CXXTASK_DEP} ${CXX} -o $@ ${HD_CXXTASK_OBJ} ${LDFLAGS_CXX_BIN} ${HD_CXXLIBS} ${STRIP} ${HD_CXXTASK}${BSUF} HD_TEST_CXXTASK_SRC = ${HD_TEST_CXXTASK_SRC_C} \ ${HD_TEST_CXXTASK_SRC_c} \ ${HD_TEST_CXXTASK_SRC_cc} \ ${HD_TEST_CXXTASK_SRC_cpp} \ ${HD_TEST_CXXTASK_SRC_cxx} \ ${HD_TEST_CXXTASK_SRC_f} \ ${HD_TEST_CXXTASK_SRC_f90} \ ${HD_TEST_CXXTASK_SRC_f03} HD_TEST_CXXTASK_OBJ = ${HD_TEST_CXXTASK_SRC_C:.C=.${OSUF}} \ ${HD_TEST_CXXTASK_SRC_c:.c=.${OSUF}} \ ${HD_TEST_CXXTASK_SRC_cc:.cc=.${OSUF}} \ ${HD_TEST_CXXTASK_SRC_cpp:.cpp=.${OSUF}} \ ${HD_TEST_CXXTASK_SRC_cxx:.cxx=.${OSUF}} \ ${HD_TEST_CXXTASK_SRC_f:.f=.${OSUF}} \ ${HD_TEST_CXXTASK_SRC_f90:.f90=.${OSUF}} \ ${HD_TEST_CXXTASK_SRC_f03:.f03=.${OSUF}} ${HD_TEST_CXXTASK}: ${HD_TEST_CXXTASK_OBJ} ${HD_CXXTASK_DEP} ${CXX} -o $@ ${HD_TEST_CXXTASK_OBJ} ${LDFLAGS_CXX_BIN} ${HD_CXXLIBS} ${STRIP} ${HD_TEST_CXXTASK}${BSUF} ${HD_FTASK}: ${HD_FTASK_SRC_c:.c=.${OSUF}} ${HD_FTASK_SRC_f:.f=.${OSUF}} ${HD_FTASK_SRC_f90:.f90=.${OSUF}} ${HD_FTASK_SRC_f03:.f03=.${OSUF}} ${HD_FTASK_DEP} ${FC} -o $@ ${HD_FTASK_SRC_c:.c=.${OSUF}} ${HD_FTASK_SRC_f:.f=.${OSUF}} ${HD_FTASK_SRC_f90:.f90=.${OSUF}} ${HD_FTASK_SRC_f03:.f03=.${OSUF}} ${LDFLAGS_F_BIN} ${HD_CLIBS} ${STRIP} ${HD_FTASK}${BSUF} #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- # Utilities #------------------------------------------------------------------------------- # Used to force a target to be out of date. ${HD_TARG_PFX}force-build: #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- # Standard suffix rules. #------------------------------------------------------------------------------- .SUFFIXES: .SUFFIXES: .C .c .cc .cpp .cxx .f .f90 .f03 .o .obj .C.o: ${CXX} -c -o ${