/[ascend]/trunk/tcltk/tk/Makefile.Rules.in
ViewVC logotype

Contents of /trunk/tcltk/tk/Makefile.Rules.in

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2022 - (show annotations) (download)
Wed Apr 29 06:20:28 2009 UTC (11 years, 3 months ago) by jpye
File size: 5247 byte(s)
Rename generic/interface to interface and TK to tk.
1 # ASCEND TK Makefile.Rules
2 # Mark Thomas
3 # May 27, 1996
4 # $Date: 1998/05/21 17:48:05 $
5 # $Revision: 1.8 $
6 # $Author: mthomas $
7 # $Source: /afs/cs.cmu.edu/project/ascend/Repository/ascend4/TK/Makefile.Rules.in,v $
8 #
9
10 # This file contains the Make Rules which all Makefiles in this
11 # subdirectory tree use.
12 #
13 # The Makefiles in this subdirectory tree and this Makefile.Rules
14 # file install the ASCEND specific tcl/tk code in the install
15 # directory ASCEND_TK_DIR
16
17 # Each Makefile.in in this directory tree should define two lists:
18 #
19 # INSTALL_SUBDIR_LIST -- lists the subdirectories of this directory
20 # which contain files to be installed
21 #
22 # INSTALL_FILE_LIST -- lists the files that are to be installed
23 # when ASCEND is installed.
24 #
25 # See Makefile.Template in this directory for a sample Makefile.in
26
27
28 SHELL = /bin/sh
29 @SET_MAKE@
30 QUIET_INSTALL=@QUIET_INSTALL@
31
32
33 # dummy targets so make won't complain
34 install install-binaries install-libraries install-models::
35
36 # this target traverses the directory tree and installs the files
37 install-subtree: Makefile
38 @if [ ! -d $(INSTALL_TARGET_DIR) ]; then \
39 echo Making directory $(INSTALL_TARGET_DIR) ; \
40 mkdir -p $(INSTALL_TARGET_DIR) ; \
41 fi
42 @for i in $(INSTALL_FILE_LIST) /dev/null ; do \
43 if $(CMP) -s $(srcdir)/$$i $(INSTALL_TARGET_DIR)/$$i ; then \
44 if test "x$(QUIET_INSTALL)" = "x0" ; then \
45 echo "Skipping $$i (up to date)" ; \
46 fi ; \
47 elif [ $$i != "/dev/null" ]; then \
48 if test -f $(INSTALL_TARGET_DIR)/$$i ; then \
49 echo "Updating $$i --> $(INSTALL_TARGET_DIR)" ; \
50 else \
51 echo "Installing $$i --> $(INSTALL_TARGET_DIR)" ; \
52 fi; \
53 $(INSTALL_DATA) $(srcdir)/$$i $(INSTALL_TARGET_DIR) ; \
54 fi ; \
55 done
56 @for i in $(INSTALL_SUBDIR_LIST) /dev/null ; do \
57 if [ $$i != "/dev/null" ]; then \
58 (cd $$i ; $(MAKE) $@ RULES_FILE="../$(RULES_FILE)" \
59 INSTALL_TARGET_DIR="$(INSTALL_TARGET_DIR)/$$i" \
60 INSTALL_DATA="$(INSTALL_DATA)" CMP="$(CMP)" ) ; \
61 fi ; \
62 done
63
64 # the reverse of above
65 uninstall::
66
67 uninstall-subtree::
68 @for i in $(INSTALL_FILE_LIST) /dev/null ; do \
69 if test -f $(INSTALL_TARGET_DIR)/$$i ; then \
70 echo Removing $(INSTALL_TARGET_DIR)/$$i ; \
71 $(RM) $(INSTALL_TARGET_DIR)/$$i ; \
72 fi ; \
73 done
74 @for i in $(INSTALL_SUBDIR_LIST) /dev/null ; do \
75 if [ $$i != "/dev/null" ]; then \
76 (cd $$i ; $(MAKE) $@ RULES_FILE="../$(RULES_FILE)" \
77 INSTALL_TARGET_DIR="$(INSTALL_TARGET_DIR)/$$i" RM="$(RM)" ) ; \
78 fi ; \
79 done
80
81
82
83 # Warn when the Makefile is older than Makefile.in
84 Makefile: $(srcdir)/Makefile.in
85 @echo ""
86 @echo "$(srcdir)/Makefile.in is newer than Makefile"
87 @echo "Consider running 'configure' again or running 'make makes'"
88 @echo ""
89
90
91
92 # A target to make a backup copy of you Makefile. Useful to do before
93 # you rerun configure so you don't lose all the hacks you added.
94 save-makes::
95 @-for i in $(INSTALL_SUBDIR_LIST) /dev/null ; do \
96 if [ $$i != "/dev/null" ]; then \
97 (cd $$i ; $(MAKE) $@ CP="$(CP)" \
98 RULES_FILE="../$(RULES_FILE)"); \
99 fi ; \
100 done
101 -$(CP) Makefile Makefile.SAVED
102
103
104
105 # Targets to remove generated files. `distclean' removes nearly
106 # everything generated since you last ran `configure'
107 clean::
108
109 distclean:: clean
110 for i in $(INSTALL_SUBDIR_LIST) /dev/null ; do \
111 if [ $$i != "/dev/null" ]; then \
112 (cd $$i ; $(MAKE) $@ RM="$(RM)" \
113 RULES_FILE="../$(RULES_FILE)"); \
114 fi ; \
115 done
116 $(RM) *~ \#* *.bak TAGS
117 $(RM) Makefile Makefile.Rules Makefile.SAVED Makefile.Rules.SAVED
118
119
120
121 # Targets to generate emacs style (TAGS) and vi style (tags) tables
122 # for quick lookup of Tcl procedures
123 TAGS::
124 -$(ETAGS) --append --output=$(TAGSFILE) --language=none \
125 --regex='/proc[ \t]+\([^ \t]+\)/\1/' \
126 $(srcdir)/*.tcl $(srcdir)/*.t
127 -for i in $(INSTALL_SUBDIR_LIST) /dev/null ; do \
128 if [ $$i != "/dev/null" ]; then \
129 (cd $$i ; $(MAKE) $@ TAGSFILE="../$(TAGSFILE)" ETAGS="$(ETAGS)" \
130 RULES_FILE="../$(RULES_FILE)"); \
131 fi ; \
132 done
133
134 tags::
135 -$(CTAGS) --append --output=$(TAGSFILE) --language=none \
136 --regex='/proc[ \t]+\([^ \t]+\)/\1/' \
137 $(srcdir)/*.tcl $(srcdir)/*.
138 -for i in $(INSTALL_SUBDIR_LIST) /dev/null ; do \
139 if [ $$i != "/dev/null" ]; then \
140 (cd $$i ; $(MAKE) $@ TAGSFILE="../$(TAGSFILE)" CTAGS="$(CTAGS)" \
141 RULES_FILE="../$(RULES_FILE)"); \
142 fi ; \
143 done
144
145
146
147 # untested targets for generating documentation from the tcl source files
148 .SUFFIXES:
149 .SUFFIXES: .tcl .tch
150
151 .tcl.tch:
152 grep '^#' $< > $@
153
154 documentation:
155 for i in `echo $(INSTALL_FILE_LIST) /dev/null | sed 's/tcl/tch/g'`; do\
156 case "$$i" in *\.tch) \
157 doc_file_list="$$doc_file_list $$i" ;; \
158 esac ; \
159 done ; \
160 if [ -n "$$doc_file_list" ] ; then \
161 $(MAKE) $$doc_file_list ; \
162 fi
163 $(RM) FILE_INDEX.tch ALPHA_INDEX.tch
164 -grep -n '^# proc ' *.tch > FILE_INDEX.tch
165 -cat *.tch | grep '^# proc ' | sort > ALPHA_INDEX.tch
166 for i in $(INSTALL_SUBDIR_LIST) /dev/null ; do \
167 if [ $$i != "/dev/null" ]; then \
168 (cd $$i ; $(MAKE) $@ RM="$(RM)" \
169 RULES_FILE="../$(RULES_FILE)") ; \
170 fi ; \
171 done
172
173 # Force emacs to treat this file as a Makefile
174 #
175 # Local Variables: ***
176 # mode:Makefile ***
177 # End: ***

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22