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 GLOBALHSMODLIST := jv2ts jretile jtsfiddle jtsslice jpkbgn jrebinsmooth undistortmdi mkylms
13
|
14 tplarson 1.8 define GHSWARNING1
15
16 WARNING: proj/globalhs is not tagged consistently. A build of any target
17 in proj/globalhs will fail. The output of script
18 proj/globalhs/scripts/checkglobalhstags is "$(GLOBALHS_TAG)".
19
20 To skip tag checking (FOR DEVELOPMENT ONLY!), specify GLOBALHSTAGOVERRIDE
21 in either your environment or on the make command line. The value of
22 GLOBALHSTAGOVERRIDE must contain the string "globalhs". This value will
23 be compiled into the modules and written to ancillary dataseries as CVSTAG.
24
25 To automatically create a consistent tag (FOR PRODUCTION ONLY!), one may run
26 proj/globalhs/scripts/setglobalhstags. This script will add a tag in cvs
27 for every file comprising the globalhs source code, so use it with care.
28
29 endef
30
31 define GHSWARNING2
32
33 WARNING: GLOBALHSTAGOVERRIDE should contain the string "globalhs".
34 The value given was "$(GLOBALHSTAGOVERRIDE)".
35 tplarson 1.8 A build of any target in proj/globalhs will fail.
36 Note that the value of GLOBALHSTAGOVERRIDE will be compiled into
37 the modules and written to ancillary dataseries as CVSTAG.
38
39 endef
40
|
41 tplarson 1.6 ifeq ($(GLOBALHSTAGOVERRIDE),)
42 ifeq ($(MAKECMDGOALS),)
43 GLOBALHS_TAG := $(shell $(SRCDIR)/proj/globalhs/scripts/checkglobalhstags $(SRCDIR))
|
44 arta 1.9 ifeq ($(GLOBALHS_TAG),)
45 GLOBALHS_TAG := globalhs
46 endif
|
47 tplarson 1.6 TAGCHECK := $(findstring globalhs,$(GLOBALHS_TAG))
48 ifeq ($(TAGCHECK),)
|
49 tplarson 1.8 $(warning $(GHSWARNING1))
|
50 tplarson 1.6 endif
51 else
52 GHSMODLIST_SOCK := $(GLOBALHSMODLIST:%=%_sock)
53 GHSTARGETLIST := all universe targets globalhs $(GLOBALHSMODLIST) $(GHSMODLIST_SOCK)
|
54 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.
55 # if we added '%' after, it would also work if someone wanted to compile the .o files.
56 # i'm not doing so at this time because inserting literal %'s is too much hassle for functionality we don't even use.
57 GHSTARGETTEST := $(filter $(GHSTARGETLIST),$(MAKECMDGOALS))
|
58 tplarson 1.6 ifneq ($(GHSTARGETTEST),)
59 GLOBALHS_TAG := $(shell $(SRCDIR)/proj/globalhs/scripts/checkglobalhstags $(SRCDIR))
|
60 arta 1.9 ifeq ($(GLOBALHS_TAG),)
61 GLOBALHS_TAG := globalhs
62 endif
|
63 tplarson 1.6 TAGCHECK := $(findstring globalhs,$(GLOBALHS_TAG))
64 ifeq ($(TAGCHECK),)
|
65 tplarson 1.8 $(warning $(GHSWARNING1))
|
66 tplarson 1.6 endif
67 endif
68 endif
69 else
70 GLOBALHS_TAG := $(GLOBALHSTAGOVERRIDE)
|
71 arta 1.4 TAGCHECK := $(findstring globalhs,$(GLOBALHS_TAG))
72 ifeq ($(TAGCHECK),)
|
73 tplarson 1.8 $(warning $(GHSWARNING2))
|
74 arta 1.4 endif
|
75 tplarson 1.2 endif
76
|
77 tplarson 1.1 # Subdirectories. Directory-specific rules are optional here. The
|
78 tplarson 1.2 # order does NOT matter.
79 dir := $(d)/libs
80 -include $(SRCDIR)/$(dir)/Rules.mk
|
81 tplarson 1.1 dir := $(d)/apps
82 -include $(SRCDIR)/$(dir)/Rules.mk
83
84 # Standard things
85 d := $(dirstack_$(sp))
86 sp := $(basename $(sp))
|