(file) Return to Rules.mk CVS log (file) (dir) Up to [Development] / JSOC / proj / globalhs

File: [Development] / JSOC / proj / globalhs / Rules.mk (download)
Revision: 1.14, Sun Feb 15 05:10:32 2015 UTC (8 years, 3 months ago) by tplarson
Branch: MAIN
CVS Tags: Ver_8-8, Ver_8-7
Changes since 1.13: +10 -11 lines
no longer require GLOBALHSTAGOVERRIDE to contain the string globalhs

# $Header: /home/cvsuser/cvsroot/JSOC/proj/globalhs/Rules.mk,v 1.14 2015/02/15 05:10:32 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.
# UPDATE: i'm adding the libraries after all, just in case someone wants to 
# specify them as a target on the commandline.  for the globalhs modules,
# this is never needed.
GLOBALHSMODLIST := jv2ts jretile jtsfiddle jtsslice jpkbgn jpkbgn360d jrebinsmooth undistortmdi mkylms inv2d.x
GLOBALHSLIBLIST := libdtgf.a libinv2d.a libpkbgn.a libpkbgn360d.a libprojection.a

define GHSWARNING1

WARNING: proj/globalhs is not tagged consistently. A build of any target 
in proj/globalhs will fail. The output of script 
proj/globalhs/scripts/checkglobalhstags is "$(GLOBALHS_TAG)".

To skip tag checking (FOR DEVELOPMENT ONLY!), specify GLOBALHSTAGOVERRIDE 
in either your environment or on the make command line. This value will 
be compiled into the modules and written to ancillary dataseries as CVSTAG.

To automatically create a consistent tag (FOR PRODUCTION ONLY!), one may run 
proj/globalhs/scripts/setglobalhstags. This script will add a tag in cvs 
for every file comprising the globalhs source code, so use it with care.

endef

#the following is no longer used, GLOBALHSTAGOVERRIDE can be any string
define GHSWARNING2

WARNING: GLOBALHSTAGOVERRIDE should contain the string "globalhs". 
The value given was "$(GLOBALHSTAGOVERRIDE)". 
A build of any target in proj/globalhs will fail.
Note that the value of GLOBALHSTAGOVERRIDE will be compiled into
the modules and written to ancillary dataseries as CVSTAG.

endef

define GHSWARNING3

WARNING: the script proj/globalhs/scripts/checkglobalhstags gave no output (something 
crashed).  You can force the build to succeed by specifying GLOBALHSTAGOVERRIDE. This 
value will be compiled into the modules and written to ancillary dataseries as CVSTAG. 
This option is FOR DEVELOPMENT ONLY!

endef


ifeq ($(GLOBALHSTAGOVERRIDE),)
  ifeq ($(MAKECMDGOALS),)
    GLOBALHS_TAG := $(shell $(SRCDIR)/proj/globalhs/scripts/checkglobalhstags $(SRCDIR))
    ifeq ($(GLOBALHS_TAG),)
      $(error $(GHSWARNING3))
    endif
    TAGCHECK := $(findstring globalhs,$(GLOBALHS_TAG))
    ifeq ($(TAGCHECK),)
      $(error $(GHSWARNING1))
    endif
  else
    GHSMODLIST_SOCK := $(GLOBALHSMODLIST:%=%_sock)
    GHSTARGETLIST   := all universe targets globalhs $(GLOBALHSMODLIST) $(GHSMODLIST_SOCK) $(GHSLIBLIST)
# 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))
      ifeq ($(GLOBALHS_TAG),)
        $(error $(GHSWARNING3))
      endif
      TAGCHECK := $(findstring globalhs,$(GLOBALHS_TAG))
      ifeq ($(TAGCHECK),)
        $(error $(GHSWARNING1))
      endif
    endif
  endif
else
  GLOBALHS_TAG := $(GLOBALHSTAGOVERRIDE)
#  TAGCHECK := $(findstring globalhs,$(GLOBALHS_TAG))
#  ifeq ($(TAGCHECK),)
#    $(error $(GHSWARNING2))
#  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))

Karen Tian
Powered by
ViewCVS 0.9.4