# $HeadURL$ $LastChangedRevision$ # # Load adeMakefile # # (only ADE needs a trick to work around non-existence) # # We *must* load the defined paths - as they are needed to know # where things *will* be (this is needed for the compilation of # scripts (if we are ever going to use that idea again) and also # for knowing where to install stuff. But we can't use that when # working out what to include *here* and *now* because obviously # that points to the target of the installation, not the source, # so while *other* programs can say: # # include $(shell ade-config ade_include_prefix)/adeMakefile # # *this* program cannot - because ade-config is not in the PATH # yet and even when it is, adeMakefile probably still isn't # where ade-config says it is, or rather *will* be. include ./adeMakefile # So adeinst can be found and adeinst can find ade-config ... install: export PATH = ../bin:$(shell echo $$PATH) # ... but we still have a problem. adeinst calls # '$(ade-config ade_include_prefix)/ade.sh' but that is going to # report the *target* where ade.sh is going to be installed # but where it isn't *yet* installed. So ... we could change # INSTALLPREFIX to point to ../include but then *this Makefile* # will try to install $(INCLUDE_FILES) to ../include and that # (a) is not what we want, (b) will fail because source and # target are the same. The trick is then to chance INCLUDEPREFIX # for the running of adeinst but not the running of the Makefile # itself. He we do this: install: export ADE_CONFIG_ALLOWENV_FLAG=true install: INSTALL_CMD = ADE_INCLUDE_PREFIX=. adeinst # # What do we have? # TXT_FILES = adeMakefile $(wildcard *.sh) $(wildcard *.pl) # # Where do we want it? # INCLUDE_FILES = $(TXT_FILES)