mx_make: Developer "make" helper for local OpenMx / GenomicMx

mx_makeR Documentation

Developer "make" helper for local OpenMx / GenomicMx

Description

This is a utility function for the OpenMx package maintainer. For convenience, it lives in umx, not the OpenMx package. mx_make mirrors umx_make(). It uses OpenMx's Makefile to compile and install (C++, OpenMP, NPSOL vs CRAN build). Use devtools for win-builder and package hygiene. After install, restart R then library(OpenMx). It does not use devtools::load_all() due to OpenMx (DLL / S4 load issues).

Two independent targets matter:

  • Installed library - what library(OpenMx) runs. Updated by mx_make() / "install" / "cran-install" / "GenomicMx" (or CRAN).

  • Source tree at pkg - what "win" packages for win-builder. Independent of whatever is currently installed in R.

Usage

mx_make(
  what = c("install", "NPSOL", "cran-install", "build", "Rd", "check", "win", "spell",
    "sitrep", "deps_install", "testthat", "git", "GenomicMx", "build_GenomicMx",
    "--help"),
  pkg = "~/bin/OpenMx",
  deploymentTarget = "14.0",
  openmp = TRUE,
  email = NULL
)

Arguments

what

Target. One of:

"install" / "NPSOL"

make install (NPSOL-capable tree when available).

"cran-install"

make cran-install (no NPSOL).

"build"

make build (local binary package).

"Rd"

make roxygen (OpenMx util/rox; refresh man/*.Rd).

"check"

make cran-check.

"win"

devtools::check_win_devel(pkg) – source tree at pkg.

"spell", "sitrep", "deps_install", "testthat", "git"

Same idea as umx_make().

"GenomicMx"

install.OpenMx() prebuilt binary from GitHub Releases.

"help" / "--help"

List mx_make targets and run make help.

pkg

Path to the OpenMx source tree (default "~/bin/OpenMx").

deploymentTarget

macOS MACOSX_DEPLOYMENT_TARGET for gfortran/clang (default "14.0"). Ignored on non-darwin.

openmp

Logical; pass OPENMP=yes or OPENMP=no to make (default TRUE).

email

Optional. For what = "win" only: override the win-builder results address (otherwise devtools uses DESCRIPTION Maintainer – e.g. upstream OpenMx goes to Kirkpatrick). Example: mx_make("win", pkg = "~/bin/OpenMx-upstream-wincheck", email = "you@example.com").

Value

Invisibly NULL, or the result of a returning target (e.g. sitrep).

Flight checklist

  1. Update Rd files after editing roxygen in R: mx_make("Rd") runs OpenMx ⁠make roxygen⁠ (util/rox: compile DLL + roxygenize rd). Do not use bare devtools::document() on OpenMx; man pages are git-tracked and the Makefile owns the official path.

  2. Install this tree into R's library: mx_make() or mx_make("install") (NPSOL when the Makefile enables it). Or mx_make("cran-install") without NPSOL.

  3. Restart R, then verify identity: ⁠library(OpenMx); packageVersion("OpenMx"); find.package("OpenMx")⁠. The path must be the library you just installed into (not a forgotten CRAN copy on another .libPaths() entry). Optional: xmu_openmx_engine_status() for GenomicMx capability.

  4. Win-builder (same source tree, not the installed DLL): Prefer a clean commit if you care what is archived; then mx_make("win") – devtools::check_win_devel(pkg). Local install is not required for win-builder; only the files under pkg are uploaded.

  5. Prebuilt release binary (not local WIP (work in progress)): mx_make("GenomicMx") -> install.OpenMx() from GitHub Releases.

References

https://github.com/tbates/umx/releases, OpenMx Makefile

See Also

umx_make(), install.OpenMx(), xmu_openmx_engine_status()

Other xmu internal not for end user: umxModel(), umxRenameMatrix(), umx_APA_pval(), umx_fun_mean_sd(), umx_get_bracket_addresses(), umx_make(), umx_standardize(), umx_string_to_algebra(), xmuHasSquareBrackets(), xmuLabel_MATRIX_Model(), xmuLabel_Matrix(), xmuLabel_RAM_Model(), xmuMI(), xmuMakeOneHeadedPathsFromPathList(), xmuMakeTwoHeadedPathsFromPathList(), xmuMaxLevels(), xmuMinLevels(), xmuPropagateLabels(), xmuRAM2Ordinal(), xmuTwinSuper_Continuous(), xmuTwinSuper_NoBinary(), xmuTwinUpgradeMeansToCovariateModel(), xmu_CI_merge(), xmu_CI_stash(), xmu_DF_to_mxData_TypeCov(), xmu_PadAndPruneForDefVars(), xmu_WLS_align_jacobian(), xmu_WLS_align_weight(), xmu_WLS_polycor_names(), xmu_ace_de_apply_censor_thresholds(), xmu_ace_de_parse_censor_meta(), xmu_ace_de_parse_censor_rule(), xmu_ace_de_release_binary_v1(), xmu_bracket_address2rclabel(), xmu_catml_df3_diagnostic(), xmu_catml_discrepancy_at_WLS(), xmu_catml_eval_model(), xmu_catml_implied_correlation(), xmu_catml_wls_v(), xmu_cell_is_on(), xmu_check_levels_identical(), xmu_check_needs_means(), xmu_check_variance(), xmu_clean_label(), xmu_compare_constraint_note(), xmu_compare_robust_ML(), xmu_data_missing(), xmu_data_swap_a_block(), xmu_describe_data_WLS(), xmu_dot_make_paths(), xmu_dot_make_residuals(), xmu_dot_maker(), xmu_dot_move_ranks(), xmu_dot_rank_str(), xmu_extract_column(), xmu_get_CI(), xmu_has_summary_mxData(), xmu_invert_matrix(), xmu_is_ordinal_WLS(), xmu_lavaan_process_group(), xmu_make_TwinSuperModel(), xmu_make_bin_cont_pair_data(), xmu_make_mxData(), xmu_match.arg(), xmu_mxData_summary(), xmu_mxRefModels(), xmu_name_from_lavaan_str(), xmu_path2twin(), xmu_path_regex(), xmu_print_algebras(), xmu_ram_de_apply_censor_thresholds(), xmu_ram_de_parse_censor_meta(), xmu_rclabel_2_bracket_address(), xmu_relevel_factors(), xmu_require_summary_mxData(), xmu_robust_ML_fit(), xmu_safe_run_summary(), xmu_savalei_fit_cfi(), xmu_savalei_fit_rmsea(), xmu_savalei_fit_tli(), xmu_savalei_null_scaling_factor(), xmu_savalei_polycor_blocks(), xmu_savalei_scaling_factor(), xmu_set_sep_from_suffix(), xmu_show_fit_or_comparison(), xmu_simplex_corner(), xmu_standardize_ACE(), xmu_standardize_ACEcov(), xmu_standardize_ACEv(), xmu_standardize_CP(), xmu_standardize_IP(), xmu_standardize_LISREL(), xmu_standardize_RAM(), xmu_standardize_SexLim(), xmu_standardize_Simplex(), xmu_start_value_list(), xmu_starts(), xmu_summary_RAM_group_parameters(), xmu_threshold_id_RAM(), xmu_threshold_id_twin_check(), xmu_topo_sort(), xmu_twin_add_WeightMatrices(), xmu_twin_check(), xmu_twin_get_var_names(), xmu_twin_make_def_means_mats_and_alg(), xmu_twin_upgrade_selDvs2SelVars(), xmu_update_covar(), xmu_wls_display_chi(), xmu_wls_extract_WV()

Examples

## Not run: 
# Flight checklist (local engine + win-builder)
mx_make("Rd")             # util/rox: refresh man/*.Rd
mx_make()                 # make install this tree into R library
# restart R, then:
# library(OpenMx); packageVersion("OpenMx"); find.package("OpenMx")
mx_make("win")            # upload source tree to win-builder (devel)
mx_make("win", pkg = "~/bin/OpenMx-upstream-wincheck",
        email = "timothy.c.bates@gmail.com")  # results to you, not DESCRIPTION Maintainer

mx_make("cran-install")
mx_make("spell")
mx_make("sitrep")
mx_make("deps_install")
mx_make("GenomicMx")      # prebuilt binary via install.OpenMx("GenomicMx")
mx_make("NPSOL")          # alias of install
mx_make("--help")

## End(Not run)

umx documentation built on Oct. 11, 2026, 5:07 p.m.