1 |
aw0a |
1 |
# ASCEND Help Makefile.Rules |
2 |
|
|
# Mark Thomas |
3 |
|
|
# May 27, 1996 |
4 |
|
|
# $Date: 1998/05/21 17:51:17 $ |
5 |
|
|
# $Revision: 1.10 $ |
6 |
|
|
# $Author: mthomas $ |
7 |
|
|
# $Source: /afs/cs.cmu.edu/project/ascend/Repository/help/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 help files into the install directory |
15 |
|
|
# HELP_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 |
|
|
|
31 |
|
|
|
32 |
|
|
|
33 |
|
|
# dummy targets so make won't complain |
34 |
|
|
install install-binaries install-libraries install-help:: |
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 |
|
|
echo "Skipping $$i (up to date)" ; \ |
45 |
|
|
elif [ $$i != "/dev/null" ]; then \ |
46 |
|
|
echo "Installing $$i --> $(INSTALL_TARGET_DIR)" ; \ |
47 |
|
|
$(INSTALL_DATA) $(srcdir)/$$i $(INSTALL_TARGET_DIR) ; \ |
48 |
|
|
fi ; \ |
49 |
|
|
done |
50 |
|
|
@for i in $(INSTALL_SUBDIR_LIST) /dev/null ; do \ |
51 |
|
|
if [ $$i != "/dev/null" ]; then \ |
52 |
|
|
(cd $$i ; $(MAKE) $@ RULES_FILE="../$(RULES_FILE)" \ |
53 |
|
|
INSTALL_TARGET_DIR="$(INSTALL_TARGET_DIR)/$$i" \ |
54 |
|
|
INSTALL_DATA="$(INSTALL_DATA)" CMP="$(CMP)" ) ; \ |
55 |
|
|
fi ; \ |
56 |
|
|
done |
57 |
|
|
|
58 |
|
|
# the reverse of above |
59 |
|
|
uninstall:: |
60 |
|
|
|
61 |
|
|
uninstall-subtree:: |
62 |
|
|
@for i in $(INSTALL_FILE_LIST) /dev/null ; do \ |
63 |
|
|
if test -f $(INSTALL_TARGET_DIR)/$$i ; then \ |
64 |
|
|
echo Removing $(INSTALL_TARGET_DIR)/$$i ; \ |
65 |
|
|
$(RM) $(INSTALL_TARGET_DIR)/$$i ; \ |
66 |
|
|
fi ; \ |
67 |
|
|
done |
68 |
|
|
@for i in $(INSTALL_SUBDIR_LIST) /dev/null ; do \ |
69 |
|
|
if [ $$i != "/dev/null" ]; then \ |
70 |
|
|
(cd $$i ; $(MAKE) $@ RULES_FILE="../$(RULES_FILE)" \ |
71 |
|
|
INSTALL_TARGET_DIR="$(INSTALL_TARGET_DIR)/$$i" RM="$(RM)" ) ; \ |
72 |
|
|
fi ; \ |
73 |
|
|
done |
74 |
|
|
|
75 |
|
|
|
76 |
|
|
|
77 |
|
|
# Warn when the Makefile is older than Makefile.in |
78 |
|
|
Makefile: $(srcdir)/Makefile.in |
79 |
|
|
@echo "" |
80 |
|
|
@echo "$(srcdir)/Makefile.in is newer than Makefile" |
81 |
|
|
@echo "Consider running 'configure' again or running 'make makes'" |
82 |
|
|
@echo "" |
83 |
|
|
|
84 |
|
|
|
85 |
|
|
|
86 |
|
|
# A target to make a backup copy of you Makefile. Useful to do before |
87 |
|
|
# you rerun configure so you don't lose all the hacks you added. |
88 |
|
|
save-makes:: |
89 |
|
|
@-for i in $(INSTALL_SUBDIR_LIST) /dev/null ; do \ |
90 |
|
|
if [ $$i != "/dev/null" ]; then \ |
91 |
|
|
(cd $$i ; $(MAKE) $@ CP="$(CP)" \ |
92 |
|
|
RULES_FILE="../$(RULES_FILE)"); \ |
93 |
|
|
fi ; \ |
94 |
|
|
done |
95 |
|
|
-$(CP) Makefile Makefile.SAVED |
96 |
|
|
|
97 |
|
|
|
98 |
|
|
|
99 |
|
|
# Targets to remove generated files. `distclean' removes nearly |
100 |
|
|
# everything generated since you last ran `configure' |
101 |
|
|
clean:: |
102 |
|
|
|
103 |
|
|
distclean:: clean |
104 |
|
|
for i in $(INSTALL_SUBDIR_LIST) /dev/null ; do \ |
105 |
|
|
if [ $$i != "/dev/null" ]; then \ |
106 |
|
|
(cd $$i ; $(MAKE) $@ RM="$(RM)" \ |
107 |
|
|
RULES_FILE="../$(RULES_FILE)"); \ |
108 |
|
|
fi ; \ |
109 |
|
|
done |
110 |
|
|
$(RM) *~ \#* *.bak TAGS |
111 |
|
|
$(RM) Makefile Makefile.Rules Makefile.SAVED Makefile.Rules.SAVED |
112 |
|
|
|
113 |
|
|
# Force emacs to treat this file as a Makefile |
114 |
|
|
# |
115 |
|
|
# Local Variables: *** |
116 |
|
|
# mode:Makefile *** |
117 |
|
|
# End: *** |