File: Makefile

package info (click to toggle)
nedit 1%3A5.5-3
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 7,136 kB
  • ctags: 6,956
  • sloc: ansic: 92,920; xml: 1,427; yacc: 621; makefile: 341; awk: 40; sh: 10
file content (76 lines) | stat: -rw-r--r-- 2,700 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
# $Id: Makefile,v 1.19 2004/09/30 20:51:05 n8gray Exp $
SHELL=/bin/sh
#
# Makefile for NEdit text editor
#
# Targets are the suffixes of the system-specific makefiles in
# the makefiles/ directory.
# For example, to build NEdit for Solaris, give the command
#
#   make solaris
#
# This builds an intermediate library in the util/ directory,
# then builds the nedit and nc executables in the source/ directory.
#

all:
	@echo "Please specify target:"
	@echo "(For example, type \"make linux\" for a Linux system.)"
	@(cd makefiles && ls -C Makefile* | sed -e 's/Makefile.//g CFLAGS="$(CFLAGS)"')

.DEFAULT:
	@- (cd Microline/XmL;   if [ -f ../../makefiles/Makefile.$@ -a ! -f ./Makefile.$@ ];\
	   then ln -s ../../makefiles/Makefile.$@ .; fi)
	@- (cd Xlt;   if [ -f ../makefiles/Makefile.$@ -a ! -f ./Makefile.$@ ];\
	   then ln -s ../makefiles/Makefile.$@ .; fi)
	@- (cd util;   if [ -f ../makefiles/Makefile.$@ -a ! -f ./Makefile.$@ ];\
	   then ln -s ../makefiles/Makefile.$@ .; fi)
	@- (cd source; if [ -f ../makefiles/Makefile.$@ -a ! -f ./Makefile.$@ ];\
	   then ln -s ../makefiles/Makefile.$@ .; fi)

	(cd util; \
	    $(MAKE) -f Makefile.$@ verify_config && \
	    $(MAKE) -f Makefile.$@ libNUtil.a)
	(cd Xlt;    $(MAKE) -f Makefile.$@ libXlt.a)
	(cd Microline/XmL;    $(MAKE) -f Makefile.$@ libXmL.a)
	(cd source; $(MAKE) -f Makefile.$@ nedit nc)

# This should not be in the default build, as users may not have Perl
# installed.  This is only interesting to developers.
docs:
	(cd doc; $(MAKE) all)

# We need a "dev-all" target that builds the docs plus binaries, but
# that doesn't work since we require the user to specify the target.  More
# thought is needed

clean:
	(cd util;   $(MAKE) -f Makefile.common clean)
	(cd Xlt;    $(MAKE) -f Makefile.common clean)
	(cd Microline/XmL;    $(MAKE) -f Makefile.common clean)
	(cd source; $(MAKE) -f Makefile.common clean)
	find util -type l | xargs rm -f
	find source -type l | xargs rm -f
	find Xlt -type l | xargs rm -f
	find Microline/XmL -type l | xargs rm -f

realclean: clean
	(cd doc;    $(MAKE) clean)

#
# The following is for creating binary packages of NEdit.
#
RELEASE=nedit-5.5-`uname -s`-`uname -m`
BINDIST-FILES=source/nedit source/nc README COPYRIGHT ReleaseNotes doc/nedit.doc doc/nedit.html doc/nedit.man doc/nc.man doc/faq.txt

dist-bin: $(BINDIST-FILES)
	rm -rf $(RELEASE)
	mkdir -p $(RELEASE)
	cp $(BINDIST-FILES) $(RELEASE)/
	strip $(RELEASE)/nedit $(RELEASE)/nc
	chmod 555 $(RELEASE)/nedit $(RELEASE)/nc
	tar cf $(RELEASE).tar $(RELEASE)
	compress -c $(RELEASE).tar > $(RELEASE).tar.Z
	-gzip -9 -c $(RELEASE).tar > $(RELEASE).tar.gz
	-bzip2 -9 -c $(RELEASE).tar > $(RELEASE).tar.bz2
	rm -rf $(RELEASE) $(RELEASE).tar