File: Makefile

package info (click to toggle)
elk 3.0-8.1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 4,088 kB
  • ctags: 3,115
  • sloc: ansic: 20,686; lisp: 5,232; makefile: 411; awk: 91; sh: 19
file content (115 lines) | stat: -rw-r--r-- 2,667 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# SUBDIRS lists the components of Elk that are compiled and installed by
# running "make" and "make install".  The subdirectory "src" holds the
# interpreter proper; a mininum configuration requires the SUBDIRS include,
# scripts, src, and scm.
#
# Subdirectories if lib/ hold the standard extensions.  Delete them or
# parts of them from SUBDIRS if you don't want them to be compiled and
# installed; delete lib/xm and lib/xm/xt if you don't have Motif on your
# system.

SUBDIRS= include\
	 scripts\
	 src\
	 scm\
	 lib/misc\
	 lib/unix\
	 lib/xlib\
	 lib/xt\
	 lib/xaw\
	 lib/xm\
	 lib/xm/xt

# ----------------------------------------------------------------------

SHELL= /bin/sh
MAKE=  make
GTAR=  gtar
TAR=   tar
GZIP=  gzip
ZIP=   zip

default:
	@for i in $(SUBDIRS) ;\
	do \
	    echo Making $$i...; \
	    ( cd $$i ; $(MAKE) ) || exit $$?; \
	done

install:
	@for i in $(SUBDIRS) ;\
	do \
	    echo Installing $$i...; \
	    ( cd $$i ; $(MAKE) install ) || exit $$?; \
	done

localize:
	@for i in $(SUBDIRS) ;\
	do \
	    echo Localizing $$i...; \
	    ( cd $$i ; $(MAKE) localize ) || exit $$?; \
	done

lint:
	@for i in $(SUBDIRS) ;\
	do \
	    echo Linting $$i...; \
	    ( cd $$i ; $(MAKE) lint ) || exit $$?; \
	done

clean:
	@for i in $(SUBDIRS) ;\
	do \
	    echo Cleaning $$i...; \
	    ( cd $$i ; $(MAKE) clean ) || exit $$?; \
	done

distclean:
	@for i in $(SUBDIRS) ;\
	do \
	    echo Cleaning $$i...; \
	    ( cd $$i ; $(MAKE) distclean ) || exit $$?; \
	done


# Package up all localized files (Makefile.local, include files, etc.)
# and source files into a zip file (to be compiled on a DOS system).
# The X11 extensions are not included.

LOCALF= Makefile config/system config/site include/*.h lib/misc/Makefile*\
        lib/misc/*.c scm/[a-z]* src/Makefile* `ls -1 src/*.c |grep -v hp9k`

localized.zip:
	$(MAKE) distclean
	$(MAKE) localize
	$(ZIP) -kr $@ $(LOCALF)


# Make a full distribution

DISTF= README ROADMAP CHANGES INSTALL MACHINES COPYRIGHT CONTRIBUTORS\
       PATCHLEVEL TODO BUGS MIGRATE Makefile config doc examples include lib\
       scm scripts src util

dist:
	echo elk-`util/getversion README'` > .rel
	rm -rf `cat .rel`
	mkdir `cat .rel`
	for i in $(DISTF) ;\
	do \
	    (cd `cat .rel`; ln -s ../$$i) \
	done
	if [ -f config/site.dist ]; then \
	    cp config/site config/site.old; \
	    cp config/site.dist config/site; \
	fi
	if [ ! -f ExcludeFiles ]; then \
	    $(TAR) -cvf `cat .rel`.tar -h `cat .rel`; \
	else \
	    $(GTAR) -cvf `cat .rel`.tar -h -X ExcludeFiles `cat .rel`; \
	fi
	$(GZIP) -f `cat .rel`.tar
	rm -rf `cat .rel` .rel
	if [ -f config/site.old ]; then \
	    mv config/site.old config/site; \
	fi