Skip to content

Commit

Permalink
Fix Makefile *.bino generation error for FreeBSD.
Browse files Browse the repository at this point in the history
pushd/popd aren't available by default in the shell used for FreeBSD
compilation, so rework this to avoid using them.

Bug 11164.
  • Loading branch information
tripiana authored and wickberg committed Dec 5, 2022
1 parent cf1fe04 commit 4ca278c
Show file tree
Hide file tree
Showing 15 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion make_ref.include
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ CLEANFILES += *.bino
BIN_REF = $(REF:.txt=.bino)

%.bino: %.txt
$(AM_V_GEN)pushd $(abs_srcdir); $(LD) -r -o "$(abs_builddir)/$*.bino" -z noexecstack --format=binary "$(notdir $<)"; popd
$(AM_V_GEN)curr_dir=$(shell pwd); cd $(abs_srcdir); $(LD) -r -o "$(abs_builddir)/$*.bino" -z noexecstack --format=binary "$(notdir $<)"; cd $$curr_dir
$(AM_V_at)@OBJCOPY@ --rename-section .data=.rodata,alloc,load,readonly,data,contents "$*.bino"

lib_ref.lo: $(BIN_REF)
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/openapi/dbv0.0.37/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common $(JSON_CPPFLAGS)
BIN_REF = $(REF:.json=.bino)

%.bino: %.json
$(AM_V_GEN)pushd $(abs_srcdir); $(LD) -r -o "$(abs_builddir)/$*.bino" -z noexecstack --format=binary "$(notdir $<)"; popd
$(AM_V_GEN)curr_dir=$(shell pwd); cd $(abs_srcdir); $(LD) -r -o "$(abs_builddir)/$*.bino" -z noexecstack --format=binary "$(notdir $<)"; cd $$curr_dir
$(AM_V_at)@OBJCOPY@ --rename-section .data=.rodata,alloc,load,readonly,data,contents "$*.bino"

openapi_ref.lo: $(BIN_REF)
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/openapi/dbv0.0.37/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,7 @@ uninstall-am: uninstall-pkglibLTLIBRARIES


%.bino: %.json
$(AM_V_GEN)pushd $(abs_srcdir); $(LD) -r -o "$(abs_builddir)/$*.bino" -z noexecstack --format=binary "$(notdir $<)"; popd
$(AM_V_GEN)curr_dir=$(shell pwd); cd $(abs_srcdir); $(LD) -r -o "$(abs_builddir)/$*.bino" -z noexecstack --format=binary "$(notdir $<)"; cd $$curr_dir
$(AM_V_at)@OBJCOPY@ --rename-section .data=.rodata,alloc,load,readonly,data,contents "$*.bino"

openapi_ref.lo: $(BIN_REF)
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/openapi/dbv0.0.38/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common $(JSON_CPPFLAGS)
BIN_REF = $(REF:.json=.bino)

%.bino: %.json
$(AM_V_GEN)pushd $(abs_srcdir); $(LD) -r -o "$(abs_builddir)/$*.bino" -z noexecstack --format=binary "$(notdir $<)"; popd
$(AM_V_GEN)curr_dir=$(shell pwd); cd $(abs_srcdir); $(LD) -r -o "$(abs_builddir)/$*.bino" -z noexecstack --format=binary "$(notdir $<)"; cd $$curr_dir
$(AM_V_at)@OBJCOPY@ --rename-section .data=.rodata,alloc,load,readonly,data,contents "$*.bino"

openapi_ref.lo: $(BIN_REF)
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/openapi/dbv0.0.38/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,7 @@ uninstall-am: uninstall-pkglibLTLIBRARIES


%.bino: %.json
$(AM_V_GEN)pushd $(abs_srcdir); $(LD) -r -o "$(abs_builddir)/$*.bino" -z noexecstack --format=binary "$(notdir $<)"; popd
$(AM_V_GEN)curr_dir=$(shell pwd); cd $(abs_srcdir); $(LD) -r -o "$(abs_builddir)/$*.bino" -z noexecstack --format=binary "$(notdir $<)"; cd $$curr_dir
$(AM_V_at)@OBJCOPY@ --rename-section .data=.rodata,alloc,load,readonly,data,contents "$*.bino"

openapi_ref.lo: $(BIN_REF)
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/openapi/dbv0.0.39/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common $(JSON_CPPFLAGS)
BIN_REF = $(REF:.json=.bino)

%.bino: %.json
$(AM_V_GEN)pushd $(abs_srcdir); $(LD) -r -o "$(abs_builddir)/$*.bino" -z noexecstack --format=binary "$(notdir $<)"; popd
$(AM_V_GEN)curr_dir=$(shell pwd); cd $(abs_srcdir); $(LD) -r -o "$(abs_builddir)/$*.bino" -z noexecstack --format=binary "$(notdir $<)"; cd $$curr_dir
$(AM_V_at)@OBJCOPY@ --rename-section .data=.rodata,alloc,load,readonly,data,contents "$*.bino"

openapi_ref.lo: $(BIN_REF)
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/openapi/dbv0.0.39/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,7 @@ uninstall-am: uninstall-pkglibLTLIBRARIES


%.bino: %.json
$(AM_V_GEN)pushd $(abs_srcdir); $(LD) -r -o "$(abs_builddir)/$*.bino" -z noexecstack --format=binary "$(notdir $<)"; popd
$(AM_V_GEN)curr_dir=$(shell pwd); cd $(abs_srcdir); $(LD) -r -o "$(abs_builddir)/$*.bino" -z noexecstack --format=binary "$(notdir $<)"; cd $$curr_dir
$(AM_V_at)@OBJCOPY@ --rename-section .data=.rodata,alloc,load,readonly,data,contents "$*.bino"

openapi_ref.lo: $(BIN_REF)
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/openapi/v0.0.37/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ AM_CPPFLAGS = -DSLURM_PLUGIN_DEBUG -I$(top_srcdir) -I$(top_srcdir)/src/common $(
BIN_REF = $(REF:.json=.bino)

%.bino: %.json
$(AM_V_GEN)pushd $(abs_srcdir); $(LD) -r -o "$(abs_builddir)/$*.bino" -z noexecstack --format=binary "$(notdir $<)"; popd
$(AM_V_GEN)curr_dir=$(shell pwd); cd $(abs_srcdir); $(LD) -r -o "$(abs_builddir)/$*.bino" -z noexecstack --format=binary "$(notdir $<)"; cd $$curr_dir
$(AM_V_at)@OBJCOPY@ --rename-section .data=.rodata,alloc,load,readonly,data,contents "$*.bino"

openapi_ref.lo: $(BIN_REF)
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/openapi/v0.0.37/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,7 @@ uninstall-am: uninstall-pkglibLTLIBRARIES


%.bino: %.json
$(AM_V_GEN)pushd $(abs_srcdir); $(LD) -r -o "$(abs_builddir)/$*.bino" -z noexecstack --format=binary "$(notdir $<)"; popd
$(AM_V_GEN)curr_dir=$(shell pwd); cd $(abs_srcdir); $(LD) -r -o "$(abs_builddir)/$*.bino" -z noexecstack --format=binary "$(notdir $<)"; cd $$curr_dir
$(AM_V_at)@OBJCOPY@ --rename-section .data=.rodata,alloc,load,readonly,data,contents "$*.bino"

openapi_ref.lo: $(BIN_REF)
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/openapi/v0.0.38/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ AM_CPPFLAGS = -DSLURM_PLUGIN_DEBUG -I$(top_srcdir) -I$(top_srcdir)/src/common $(
BIN_REF = $(REF:.json=.bino)

%.bino: %.json
$(AM_V_GEN)pushd $(abs_srcdir); $(LD) -r -o "$(abs_builddir)/$*.bino" -z noexecstack --format=binary "$(notdir $<)"; popd
$(AM_V_GEN)curr_dir=$(shell pwd); cd $(abs_srcdir); $(LD) -r -o "$(abs_builddir)/$*.bino" -z noexecstack --format=binary "$(notdir $<)"; cd $$curr_dir
$(AM_V_at)@OBJCOPY@ --rename-section .data=.rodata,alloc,load,readonly,data,contents "$*.bino"

openapi_ref.lo: $(BIN_REF)
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/openapi/v0.0.38/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,7 @@ uninstall-am: uninstall-pkglibLTLIBRARIES


%.bino: %.json
$(AM_V_GEN)pushd $(abs_srcdir); $(LD) -r -o "$(abs_builddir)/$*.bino" -z noexecstack --format=binary "$(notdir $<)"; popd
$(AM_V_GEN)curr_dir=$(shell pwd); cd $(abs_srcdir); $(LD) -r -o "$(abs_builddir)/$*.bino" -z noexecstack --format=binary "$(notdir $<)"; cd $$curr_dir
$(AM_V_at)@OBJCOPY@ --rename-section .data=.rodata,alloc,load,readonly,data,contents "$*.bino"

openapi_ref.lo: $(BIN_REF)
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/openapi/v0.0.39/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ AM_CPPFLAGS = -DSLURM_PLUGIN_DEBUG -I$(top_srcdir) -I$(top_srcdir)/src/common $(
BIN_REF = $(REF:.json=.bino)

%.bino: %.json
$(AM_V_GEN)pushd $(abs_srcdir); $(LD) -r -o "$(abs_builddir)/$*.bino" -z noexecstack --format=binary "$(notdir $<)"; popd
$(AM_V_GEN)curr_dir=$(shell pwd); cd $(abs_srcdir); $(LD) -r -o "$(abs_builddir)/$*.bino" -z noexecstack --format=binary "$(notdir $<)"; cd $$curr_dir
$(AM_V_at)@OBJCOPY@ --rename-section .data=.rodata,alloc,load,readonly,data,contents "$*.bino"

openapi_ref.lo: $(BIN_REF)
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/openapi/v0.0.39/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,7 @@ uninstall-am: uninstall-pkglibLTLIBRARIES


%.bino: %.json
$(AM_V_GEN)pushd $(abs_srcdir); $(LD) -r -o "$(abs_builddir)/$*.bino" -z noexecstack --format=binary "$(notdir $<)"; popd
$(AM_V_GEN)curr_dir=$(shell pwd); cd $(abs_srcdir); $(LD) -r -o "$(abs_builddir)/$*.bino" -z noexecstack --format=binary "$(notdir $<)"; cd $$curr_dir
$(AM_V_at)@OBJCOPY@ --rename-section .data=.rodata,alloc,load,readonly,data,contents "$*.bino"

openapi_ref.lo: $(BIN_REF)
Expand Down
2 changes: 1 addition & 1 deletion src/scrontab/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -866,7 +866,7 @@ uninstall-am: uninstall-binPROGRAMS


%.bino: %.txt
$(AM_V_GEN)pushd $(abs_srcdir); $(LD) -r -o "$(abs_builddir)/$*.bino" -z noexecstack --format=binary "$(notdir $<)"; popd
$(AM_V_GEN)curr_dir=$(shell pwd); cd $(abs_srcdir); $(LD) -r -o "$(abs_builddir)/$*.bino" -z noexecstack --format=binary "$(notdir $<)"; cd $$curr_dir
$(AM_V_at)@OBJCOPY@ --rename-section .data=.rodata,alloc,load,readonly,data,contents "$*.bino"

lib_ref.lo: $(BIN_REF)
Expand Down
2 changes: 1 addition & 1 deletion src/slurmrestd/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -933,7 +933,7 @@ uninstall-am: uninstall-sbinPROGRAMS


@WITH_SLURMRESTD_TRUE@%.bino: %.txt
@WITH_SLURMRESTD_TRUE@ $(AM_V_GEN)pushd $(abs_srcdir); $(LD) -r -o "$(abs_builddir)/$*.bino" -z noexecstack --format=binary "$(notdir $<)"; popd
@WITH_SLURMRESTD_TRUE@ $(AM_V_GEN)curr_dir=$(shell pwd); cd $(abs_srcdir); $(LD) -r -o "$(abs_builddir)/$*.bino" -z noexecstack --format=binary "$(notdir $<)"; cd $$curr_dir
@WITH_SLURMRESTD_TRUE@ $(AM_V_at)@OBJCOPY@ --rename-section .data=.rodata,alloc,load,readonly,data,contents "$*.bino"

@WITH_SLURMRESTD_TRUE@lib_ref.lo: $(BIN_REF)
Expand Down

0 comments on commit 4ca278c

Please sign in to comment.