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