mirror of
https://gitlab.com/scemama/irpf90.git
synced 2025-01-03 01:55:42 +01:00
Fancy general Makefile
This commit is contained in:
parent
8238090f27
commit
926c72a88b
@ -59,16 +59,20 @@ ARCH = $(addprefix $(CURDIR)/,IRPF90_temp/irpf90.a)
|
|||||||
|
|
||||||
all: $(EXE)
|
all: $(EXE)
|
||||||
|
|
||||||
|
define run
|
||||||
|
$(BUILD_SYSTEM) -C $(dir $(BUILD_FILE) ) -f $(notdir $(BUILD_FILE) ) $(1)
|
||||||
|
endef
|
||||||
|
|
||||||
$(EXE): $(ARCH)
|
$(EXE): $(ARCH)
|
||||||
@printf "%b" "\033[0;32m Build $@...\033[m\n"
|
@printf "%b" "\033[0;32m Build $@...\033[m\n"
|
||||||
@$(BUILD_SYSTEM) -C $(dir $< ) -f $(notdir $(BUILD_FILE)) $(addprefix $(CURDIR)/, $@) && touch $@
|
@$(call run, $(addprefix $(CURDIR)/, $@)) && touch $@
|
||||||
|
|
||||||
|
|
||||||
.NOTPARALLEL: $(BUILD_FILE) $(ARCH)
|
.NOTPARALLEL: $(BUILD_FILE) $(ARCH)
|
||||||
|
|
||||||
$(ARCH): $(BUILD_FILE)
|
$(ARCH): $(BUILD_FILE)
|
||||||
@printf "%b" "\033[0;32m Creating the archive...\033[m\n"
|
@printf "%b" "\033[0;32m Creating the archive...\033[m\n"
|
||||||
@$(BUILD_SYSTEM) -C $(dir $< ) -f $(notdir $< ) $(ARCH)
|
@$(call run, $@) && touch $@
|
||||||
|
|
||||||
$(BUILD_FILE): $(shell find . -maxdepth 2 -path ./IRPF90_temp -prune -o -name '*.irp.f' -print)
|
$(BUILD_FILE): $(shell find . -maxdepth 2 -path ./IRPF90_temp -prune -o -name '*.irp.f' -print)
|
||||||
@printf "%b" "\033[0;32m Running the IRPF90-compiler...\033[m\n"
|
@printf "%b" "\033[0;32m Running the IRPF90-compiler...\033[m\n"
|
||||||
|
@ -59,16 +59,22 @@ ARCH = $(addprefix $(CURDIR)/,IRPF90_temp/irpf90.a)
|
|||||||
|
|
||||||
all: $(EXE)
|
all: $(EXE)
|
||||||
|
|
||||||
|
define run
|
||||||
|
$(BUILD_SYSTEM) -C $(dir $(BUILD_FILE) ) -f $(notdir $(BUILD_FILE) ) $(1)",
|
||||||
|
endef
|
||||||
|
|
||||||
|
#We allow for the user to ask for 'relative' path
|
||||||
|
#But the IRPF90 build system use absolute path.
|
||||||
$(EXE): $(ARCH)
|
$(EXE): $(ARCH)
|
||||||
@printf "%b" "\033[0;32m Build $@...\033[m\n"
|
@printf "%b" "\033[0;32m Build $@...\033[m\n"
|
||||||
@$(BUILD_SYSTEM) -C $(dir $< ) -f $(notdir $(BUILD_FILE)) $(addprefix $(CURDIR)/, $@) && touch $@
|
@$(call run, $(addprefix $(CURDIR)/, $@)) && touch $@
|
||||||
|
|
||||||
|
|
||||||
.NOTPARALLEL: $(BUILD_FILE) $(ARCH)
|
.NOTPARALLEL: $(BUILD_FILE) $(ARCH)
|
||||||
|
|
||||||
$(ARCH): $(BUILD_FILE)
|
$(ARCH): $(BUILD_FILE)
|
||||||
@printf "%b" "\033[0;32m Creating the archive...\033[m\n"
|
@printf "%b" "\033[0;32m Creating the archive...\033[m\n"
|
||||||
@$(BUILD_SYSTEM) -C $(dir $< ) -f $(notdir $< ) $(ARCH)
|
@$(call run, $@) && touch $@
|
||||||
|
|
||||||
$(BUILD_FILE): $(shell find . -maxdepth 2 -path ./IRPF90_temp -prune -o -name '*.irp.f' -print)
|
$(BUILD_FILE): $(shell find . -maxdepth 2 -path ./IRPF90_temp -prune -o -name '*.irp.f' -print)
|
||||||
@printf "%b" "\033[0;32m Running the IRPF90-compiler...\033[m\n"
|
@printf "%b" "\033[0;32m Running the IRPF90-compiler...\033[m\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user