# Copyright 2020-2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
load("//private:package_features.bzl", "PACKAGE_FEATURES")

package(
    default_applicable_licenses = ["//:license"],
    default_visibility = ["//visibility:private"],
    features = PACKAGE_FEATURES,
)

licenses(["notice"])

# keep
alias(
    name = "emacs",
    actual = ":emacs_30",
    visibility = ["//visibility:public"],
)

alias(
    name = "module_header",
    actual = select({
        "@platforms//os:windows": "@emacs_windows_30//:module_header",
        "//conditions:default": "@emacs_30//:module_header",
    }),
    visibility = ["//visibility:public"],
)

alias(
    name = "emacs_29",
    actual = select({
        "@platforms//os:windows": "@emacs_windows_29//:emacs",
        "//conditions:default": "@emacs_29//:emacs",
    }),
    visibility = ["//visibility:public"],
)

alias(
    name = "emacs_30",
    actual = select({
        "@platforms//os:windows": "@emacs_windows_30//:emacs",
        "//conditions:default": "@emacs_30//:emacs",
    }),
    visibility = ["//visibility:public"],
)

bzl_library(
    name = "defs",
    srcs = ["defs.bzl"],
    visibility = ["//visibility:public"],
    deps = ["//elisp/toolchains:elisp_emacs_binary"],
)
