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

 1 arta  1.9 # $Header: /home/cvsuser/cvsroot/JSOC/proj/globalhs/Rules.mk,v 1.8 2014/01/16 22:49:03 tplarson Exp $
 2 tplarson 1.2 
 3 tplarson 1.1 sp 		:= $(sp).x
 4              dirstack_$(sp)	:= $(d)
 5              d		:= $(dir)
 6              
 7 tplarson 1.7 # any modules specified in proj/globalhs/apps must appear in this list.
 8              # one might think to add the libraries in proj/globalhs/libs as well, 
 9              # but it's actually unnecessary because they are forced to be recompiled
10              # every time the modules that use them are recompiled, whether they are 
11              # out of date or not.  see the phony targets in the corresponding Rules.mk files.
12 tplarson 1.10 # UPDATE: i'm adding the libraries after all, just in case someone wants to 
13               # specify them as a target on the commandline.  for the globalhs modules,
14               # this is never needed.
15               GLOBALHSMODLIST := jv2ts jretile jtsfiddle jtsslice jpkbgn jrebinsmooth undistortmdi mkylms inv2d.x \
16                                  libdtgf.a libinv2d.a libpkbgn.a libprojection.a
17 tplarson 1.7  
18 tplarson 1.8  define GHSWARNING1
19               
20               WARNING: proj/globalhs is not tagged consistently. A build of any target 
21               in proj/globalhs will fail. The output of script 
22               proj/globalhs/scripts/checkglobalhstags is "$(GLOBALHS_TAG)".
23               
24               To skip tag checking (FOR DEVELOPMENT ONLY!), specify GLOBALHSTAGOVERRIDE 
25               in either your environment or on the make command line. The value of 
26               GLOBALHSTAGOVERRIDE must contain the string "globalhs". This value will 
27               be compiled into the modules and written to ancillary dataseries as CVSTAG.
28               
29               To automatically create a consistent tag (FOR PRODUCTION ONLY!), one may run 
30               proj/globalhs/scripts/setglobalhstags. This script will add a tag in cvs 
31               for every file comprising the globalhs source code, so use it with care.
32               
33               endef
34               
35               define GHSWARNING2
36               
37               WARNING: GLOBALHSTAGOVERRIDE should contain the string "globalhs". 
38               The value given was "$(GLOBALHSTAGOVERRIDE)". 
39 tplarson 1.8  A build of any target in proj/globalhs will fail.
40               Note that the value of GLOBALHSTAGOVERRIDE will be compiled into
41               the modules and written to ancillary dataseries as CVSTAG.
42               
43               endef
44               
45 tplarson 1.6  ifeq ($(GLOBALHSTAGOVERRIDE),)
46                 ifeq ($(MAKECMDGOALS),)
47                   GLOBALHS_TAG := $(shell $(SRCDIR)/proj/globalhs/scripts/checkglobalhstags $(SRCDIR))
48                   TAGCHECK := $(findstring globalhs,$(GLOBALHS_TAG))
49                   ifeq ($(TAGCHECK),)
50 tplarson 1.8        $(warning $(GHSWARNING1))
51 tplarson 1.6      endif
52                 else
53                   GHSMODLIST_SOCK := $(GLOBALHSMODLIST:%=%_sock)
54                   GHSTARGETLIST   := all universe targets globalhs $(GLOBALHSMODLIST) $(GHSMODLIST_SOCK)
55 tplarson 1.7  # if we added '%' before all the words in GLOBALHSMODLIST, the following would work even if someone specified the full path to the modules.
56               # if we added '%' after, it would also work if someone wanted to compile the .o files.
57               # i'm not doing so at this time because inserting literal %'s is too much hassle for functionality we don't even use.
58                   GHSTARGETTEST   := $(filter $(GHSTARGETLIST),$(MAKECMDGOALS))
59 tplarson 1.6      ifneq ($(GHSTARGETTEST),)
60                     GLOBALHS_TAG := $(shell $(SRCDIR)/proj/globalhs/scripts/checkglobalhstags $(SRCDIR))
61                     TAGCHECK := $(findstring globalhs,$(GLOBALHS_TAG))
62                     ifeq ($(TAGCHECK),)
63 tplarson 1.8          $(warning $(GHSWARNING1))
64 tplarson 1.6        endif
65                   endif
66                 endif
67               else
68                 GLOBALHS_TAG := $(GLOBALHSTAGOVERRIDE)
69 arta     1.4    TAGCHECK := $(findstring globalhs,$(GLOBALHS_TAG))
70                 ifeq ($(TAGCHECK),)
71 tplarson 1.8      $(warning $(GHSWARNING2))
72 arta     1.4    endif
73 tplarson 1.2  endif
74               
75 tplarson 1.1  # Subdirectories. Directory-specific rules are optional here. The
76 tplarson 1.2  # order does NOT matter.
77               dir	:= $(d)/libs
78               -include		$(SRCDIR)/$(dir)/Rules.mk
79 tplarson 1.1  dir	:= $(d)/apps
80               -include		$(SRCDIR)/$(dir)/Rules.mk
81               
82               # Standard things
83               d		:= $(dirstack_$(sp))
84               sp		:= $(basename $(sp))

Karen Tian
Powered by
ViewCVS 0.9.4