Skip to content
Snippets Groups Projects
Commit 1ebabb60 authored by Simon Rose's avatar Simon Rose
Browse files

E3-1731: Don't install the makefile at the next level

The original e3 build installed the module.Makefile in the module
source directory, and then runs (essentially)
```
$ make -C module -f module.Makefile ARGS
```
However, there is no real need for it to copy it there instead of
simply using that makefile from the parent directory. This simplifies
a bit of the junk that gets added around during the build process.
parent c5e75527
No related branches found
No related tags found
1 merge request!197E3-1731: Don't install the makefile at the next level
Pipeline #206318 passed
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# #
E3_REQUIRE_MAKEFILE_INPUT_OPTIONS := -C $(E3_MODULE_SRC_PATH) E3_REQUIRE_MAKEFILE_INPUT_OPTIONS := -C $(E3_MODULE_SRC_PATH)
E3_REQUIRE_MAKEFILE_INPUT_OPTIONS += -f $(E3_MODULE_MAKEFILE) E3_REQUIRE_MAKEFILE_INPUT_OPTIONS += -f ../$(E3_MODULE_MAKEFILE)
E3_REQUIRE_MAKEFILE_INPUT_OPTIONS += LIBVERSION="$(E3_MODULE_VERSION)" E3_REQUIRE_MAKEFILE_INPUT_OPTIONS += LIBVERSION="$(E3_MODULE_VERSION)"
E3_REQUIRE_MAKEFILE_INPUT_OPTIONS += PROJECT="$(E3_MODULE_NAME)" E3_REQUIRE_MAKEFILE_INPUT_OPTIONS += PROJECT="$(E3_MODULE_NAME)"
E3_REQUIRE_MAKEFILE_INPUT_OPTIONS += EPICS_MODULES="$(E3_MODULES_PATH)" E3_REQUIRE_MAKEFILE_INPUT_OPTIONS += EPICS_MODULES="$(E3_MODULES_PATH)"
......
...@@ -3,10 +3,13 @@ ...@@ -3,10 +3,13 @@
.DEFAULT_GOAL := help .DEFAULT_GOAL := help
.PHONY: help default install uninstall build rebuild clean conf all prebuild .PHONY: help default install uninstall build rebuild clean all prebuild
default: help default: help
# Include some checks before build happens
include $(E3_REQUIRE_CONFIG)/RULES_CHECKS
# # help is defined in # # help is defined in
# # https://gist.github.com/rcmachado/af3db315e31383502660 # # https://gist.github.com/rcmachado/af3db315e31383502660
help: help:
...@@ -53,40 +56,35 @@ install: $(MODULE_METADATA_FILE) ...@@ -53,40 +56,35 @@ install: $(MODULE_METADATA_FILE)
check_uninstall: check_uninstall:
## Uninstall the current module ## Uninstall the current module
uninstall: check_uninstall conf uninstall: check_uninstall
$(QUIET) $(E3_MODULE_MAKE_CMDS) uninstall $(QUIET) $(E3_MODULE_MAKE_CMDS) uninstall
## Build current module ## Build current module
build: conf checkout prebuild db_internal build: consistency_checks checkout prebuild db_internal
$(QUIET) $(E3_MODULE_MAKE_CMDS) build $(QUIET) $(E3_MODULE_MAKE_CMDS) build
## Run module-specific commands before building ## Run module-specific commands before building
prebuild: conf prebuild: consistency_checks
$(QUIET) $(E3_MODULE_MAKE_CMDS) prebuild $(QUIET) $(E3_MODULE_MAKE_CMDS) prebuild
## Displays information about the build process ## Displays information about the build process
debug: conf debug:
$(QUIET) $(E3_MODULE_MAKE_CMDS) debug $(QUIET) $(E3_MODULE_MAKE_CMDS) debug
.PHONY: db_internal .PHONY: db_internal
db_internal: conf db_internal: consistency_checks
$(QUIET) $(E3_MODULE_MAKE_CMDS) db_internal $(QUIET) $(E3_MODULE_MAKE_CMDS) db_internal
## Clean, build, and install the current module ## Clean, build, and install the current module
rebuild: clean build install rebuild: clean build install
## Deletes temporary build files ## Deletes temporary build files
clean: conf clean:
$(QUIET) $(E3_MODULE_MAKE_CMDS) clean $(QUIET) $(E3_MODULE_MAKE_CMDS) clean
## Initializes, patches, builds, and installs ## Initializes, patches, builds, and installs
all: init patch rebuild all: init patch rebuild
# Copy $(E3_MODULE_MAKEFILE) into $(E3_MODULE_SRC_PATH)
include $(E3_REQUIRE_CONFIG)/RULES_CHECKS
conf: consistency_checks
$(QUIET) install -p -m 644 $(TOP)/$(E3_MODULE_MAKEFILE) $(E3_MODULE_SRC_PATH)/
.PHONY: init git-submodule-sync $(E3_MODULE_SRC_PATH) checkout .PHONY: init git-submodule-sync $(E3_MODULE_SRC_PATH) checkout
ifeq (,$(strip $(EPICS_MODULE_TAG))) ifeq (,$(strip $(EPICS_MODULE_TAG)))
......
...@@ -27,7 +27,7 @@ where_am_I := $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) ...@@ -27,7 +27,7 @@ where_am_I := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
# It is easy to maintain RULES_E3 if we use the "repository" makefile # It is easy to maintain RULES_E3 if we use the "repository" makefile
# instead of the installed makefile. # instead of the installed makefile.
# #
include $(where_am_I)/tools/driver.makefile include $(where_am_I)/require-ess/tools/driver.makefile
BUILDCLASSES += Linux BUILDCLASSES += Linux
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment