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 |
|
17 SOURCES = computer.in *.m |
|
18 |
|
19 DISTFILES = Makefile.in $(SOURCES) |
|
20 |
570
|
21 # Complete directory trees to distribute. |
569
|
22 DISTDIRS = amr-image |
|
23 |
4
|
24 MFILES = $(wildcard $(srcdir)/*.m) |
|
25 MFILES_NO_DIR = $(notdir $(MFILES)) |
|
26 |
|
27 all: computer.m |
|
28 .PHONY: all |
|
29 |
|
30 computer.m: computer.in |
342
|
31 rm -f computer.m |
4
|
32 if test "$(target_host_type)" = unknown ; then \ |
|
33 sed -e "s/%target_host_type%/Hi Dave, I'm a HAL-9000/" \ |
342
|
34 $(srcdir)/computer.in > computer.t ; \ |
4
|
35 else \ |
|
36 sed -e "s/%target_host_type%/$(target_host_type)/" \ |
342
|
37 $(srcdir)/computer.in > computer.t ; \ |
4
|
38 fi |
342
|
39 mv computer.t computer.m |
4
|
40 |
|
41 check: all |
|
42 .PHONY: check |
|
43 |
|
44 install: all |
|
45 if test -d $(libsubdir) ; then true ; \ |
|
46 else $(TOPDIR)/mkpath $(libsubdir) ; fi |
|
47 for f in $(MFILES_NO_DIR) ; do \ |
|
48 rm -f $(libdir)/$$f ; \ |
|
49 $(INSTALL_DATA) $(srcdir)/$$f $(libsubdir)/$$f ; \ |
|
50 done |
|
51 rm -f $(libsubdir)/computer.m |
|
52 $(INSTALL_DATA) computer.m $(libsubdir)/computer.m |
|
53 .PHONY: install |
|
54 |
|
55 uninstall: |
|
56 for f in $(MFILES_NO_DIR) ; do rm -f $(libsubdir)/$$f ; done |
|
57 .PHONY: uninstall |
|
58 |
|
59 clean: |
342
|
60 rm -f computer.m computer.t |
4
|
61 .PHONY: clean |
|
62 |
|
63 tags: $(SOURCES) |
|
64 ctags $(SOURCES) |
|
65 |
|
66 TAGS: $(SOURCES) |
|
67 etags $(SOURCES) |
|
68 |
|
69 mostlyclean: clean |
|
70 .PHONY: mostlyclean |
|
71 |
|
72 distclean: clean |
|
73 rm -f Makefile |
|
74 .PHONY: distclean |
|
75 |
|
76 realclean: distclean |
|
77 rm -f tags TAGS |
|
78 .PHONY: realclean |
|
79 |
|
80 local-dist: |
|
81 ln $(DISTFILES) ../`cat ../.fname`/scripts |
569
|
82 for dir in $(DISTDIRS); do ln -s ../../scripts/$$dir ../`cat ../.fname`/scripts ; done |
4
|
83 .PHONY: local-dist |
|
84 |
|
85 dist: |
|
86 ln $(DISTFILES) ../`cat ../.fname`/scripts |
569
|
87 for dir in $(DISTDIRS); do ln -s ../../scripts/$$dir ../`cat ../.fname`/scripts ; done |
4
|
88 .PHONY: dist |