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