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