4
|
1 # |
|
2 # Makefile for octave's scripts directory |
|
3 # |
|
4 # John W. Eaton |
|
5 # jwe@che.utexas.edu |
|
6 # Department of Chemical Engineering |
|
7 # The University of Texas at Austin |
|
8 |
|
9 TOPDIR = .. |
|
10 |
|
11 srcdir = @srcdir@ |
409
|
12 top_srcdir = @top_srcdir@ |
4
|
13 VPATH = @srcdir@ |
|
14 |
|
15 include $(TOPDIR)/Makeconf |
|
16 |
651
|
17 INSTALL = @INSTALL@ |
|
18 INSTALL_PROGRAM = @INSTALL_PROGRAM@ |
|
19 INSTALL_DATA = @INSTALL_DATA@ |
|
20 |
4
|
21 SOURCES = computer.in *.m |
|
22 |
|
23 DISTFILES = Makefile.in $(SOURCES) |
|
24 |
570
|
25 # Complete directory trees to distribute. |
569
|
26 DISTDIRS = amr-image |
|
27 |
4
|
28 MFILES = $(wildcard $(srcdir)/*.m) |
|
29 MFILES_NO_DIR = $(notdir $(MFILES)) |
|
30 |
|
31 all: computer.m |
|
32 .PHONY: all |
|
33 |
|
34 computer.m: computer.in |
342
|
35 rm -f computer.m |
4
|
36 if test "$(target_host_type)" = unknown ; then \ |
|
37 sed -e "s/%target_host_type%/Hi Dave, I'm a HAL-9000/" \ |
342
|
38 $(srcdir)/computer.in > computer.t ; \ |
4
|
39 else \ |
|
40 sed -e "s/%target_host_type%/$(target_host_type)/" \ |
342
|
41 $(srcdir)/computer.in > computer.t ; \ |
4
|
42 fi |
342
|
43 mv computer.t computer.m |
4
|
44 |
|
45 check: all |
|
46 .PHONY: check |
|
47 |
|
48 install: all |
|
49 if test -d $(libsubdir) ; then true ; \ |
|
50 else $(TOPDIR)/mkpath $(libsubdir) ; fi |
|
51 for f in $(MFILES_NO_DIR) ; do \ |
|
52 rm -f $(libdir)/$$f ; \ |
|
53 $(INSTALL_DATA) $(srcdir)/$$f $(libsubdir)/$$f ; \ |
|
54 done |
|
55 rm -f $(libsubdir)/computer.m |
|
56 $(INSTALL_DATA) computer.m $(libsubdir)/computer.m |
|
57 .PHONY: install |
|
58 |
|
59 uninstall: |
|
60 for f in $(MFILES_NO_DIR) ; do rm -f $(libsubdir)/$$f ; done |
|
61 .PHONY: uninstall |
|
62 |
|
63 clean: |
342
|
64 rm -f computer.m computer.t |
4
|
65 .PHONY: clean |
|
66 |
|
67 tags: $(SOURCES) |
|
68 ctags $(SOURCES) |
|
69 |
|
70 TAGS: $(SOURCES) |
|
71 etags $(SOURCES) |
|
72 |
|
73 mostlyclean: clean |
|
74 .PHONY: mostlyclean |
|
75 |
|
76 distclean: clean |
|
77 rm -f Makefile |
|
78 .PHONY: distclean |
|
79 |
|
80 realclean: distclean |
|
81 rm -f tags TAGS |
|
82 .PHONY: realclean |
|
83 |
|
84 local-dist: |
|
85 ln $(DISTFILES) ../`cat ../.fname`/scripts |
569
|
86 for dir in $(DISTDIRS); do ln -s ../../scripts/$$dir ../`cat ../.fname`/scripts ; done |
4
|
87 .PHONY: local-dist |
|
88 |
|
89 dist: |
|
90 ln $(DISTFILES) ../`cat ../.fname`/scripts |
569
|
91 for dir in $(DISTDIRS); do ln -s ../../scripts/$$dir ../`cat ../.fname`/scripts ; done |
4
|
92 .PHONY: dist |