# $Header: /home/cvsuser/cvsroot/JSOC/proj/globalhs/Rules.mk,v 1.7 2013/05/03 21:37:19 tplarson Exp $ sp := $(sp).x dirstack_$(sp) := $(d) d := $(dir) # any modules specified in proj/globalhs/apps must appear in this list. # one might think to add the libraries in proj/globalhs/libs as well, # but it's actually unnecessary because they are forced to be recompiled # every time the modules that use them are recompiled, whether they are # out of date or not. see the phony targets in the corresponding Rules.mk files. GLOBALHSMODLIST := jv2ts jretile jtsfiddle jtsslice jpkbgn jrebinsmooth undistortmdi mkylms ifeq ($(GLOBALHSTAGOVERRIDE),) ifeq ($(MAKECMDGOALS),) GLOBALHS_TAG := $(shell $(SRCDIR)/proj/globalhs/scripts/checkglobalhstags $(SRCDIR)) TAGCHECK := $(findstring globalhs,$(GLOBALHS_TAG)) ifeq ($(TAGCHECK),) $(warning WARNING: proj/globalhs is not tagged consistently. a build of any target in proj/globalhs will fail. output of script checkglobalhstags is "$(GLOBALHS_TAG)") endif else GHSMODLIST_SOCK := $(GLOBALHSMODLIST:%=%_sock) GHSTARGETLIST := all universe targets globalhs $(GLOBALHSMODLIST) $(GHSMODLIST_SOCK) # if we added '%' before all the words in GLOBALHSMODLIST, the following would work even if someone specified the full path to the modules. # if we added '%' after, it would also work if someone wanted to compile the .o files. # i'm not doing so at this time because inserting literal %'s is too much hassle for functionality we don't even use. GHSTARGETTEST := $(filter $(GHSTARGETLIST),$(MAKECMDGOALS)) ifneq ($(GHSTARGETTEST),) GLOBALHS_TAG := $(shell $(SRCDIR)/proj/globalhs/scripts/checkglobalhstags $(SRCDIR)) TAGCHECK := $(findstring globalhs,$(GLOBALHS_TAG)) ifeq ($(TAGCHECK),) $(warning WARNING: proj/globalhs is not tagged consistently. a build of any target in proj/globalhs will fail. output of script checkglobalhstags is "$(GLOBALHS_TAG)") endif endif endif else GLOBALHS_TAG := $(GLOBALHSTAGOVERRIDE) TAGCHECK := $(findstring globalhs,$(GLOBALHS_TAG)) ifeq ($(TAGCHECK),) $(warning WARNING: specified tag override "$(GLOBALHSTAGOVERRIDE)" should contain the string "globalhs". a build of any target in proj/globalhs will fail.) endif endif # Subdirectories. Directory-specific rules are optional here. The # order does NOT matter. dir := $(d)/libs -include $(SRCDIR)/$(dir)/Rules.mk dir := $(d)/apps -include $(SRCDIR)/$(dir)/Rules.mk # Standard things d := $(dirstack_$(sp)) sp := $(basename $(sp))