I have an abbreviated makefile script which does the following:
HOST=$(shell hostname)
STRIPPED_HOST=$(strip $(HOST))
# Debug: Print the retrieved and stripped hostname
$(info HOST is '$(HOST)')
$(info STRIPPED_HOST is '$(STRIPPED_HOST)')
...
$(info PKGS_ROOT is '$(PKGS_ROOT)')
ifeq ($(STRIPPED_HOST), "gs6102dsc-airstestr8.gesdisc.eosdis.nasa.gov")
PLTFRM_LIBS_HDF := $(PKGS_ROOT)/hdf/linux64/hdf-4.2.13/lib/libmfhdf.a $(PKGS_ROOT)/hdf/linux64/hdf-4.2.13/lib/libdf.a
else
PLTFRM_LIBS_HDF := $(PKGS_ROOT)/hdf-4.2.15_post0_jpl/lib/libmfhdf.a $(PKGS_ROOT)/hdf-4.2.15_post0_jpl/lib/libdf.a
endif
$(info PLTFRM_LIBS_HDF is $(PLTFRM_LIBS_HDF))
I got:
HOST is ‘gs6102dsc-airstestr8.gesdisc.eosdis.nasa.gov’
STRIPPED_HOST is ‘gs6102dsc-airstestr8.gesdisc.eosdis.nasa.gov’
PKGS_ROOT is ‘/tools/share/COTS/sdptk_hdf.el8/supplibs’
PLTFRM_LIBS_HDF is /tools/share/COTS/sdptk_hdf.el8/supplibs/hdf-4.2.15_post0_jpl/lib/libmfhdf.a /tools/share/COTS/sdptk_hdf.el8/supplibs/hdf-4.2.15_post0_jpl/lib/libdf.a
It acts as if it did not recognize
STRIPPED_HOST is ‘gs6102dsc-airstestr8.gesdisc.eosdis.nasa.gov’
both PLTFRM_LIBNS_HDF are preceded by <TAB>
I’ve tried many things but I’m stuck.
rjbstack is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
2