Don't quit if getpwuid() fails. It can fail if some nameservices are not
[nedit.git] / Makefile
blob3df09a25261b1be5f353a5a15c90847abf8b0e29
1 # $Id: Makefile,v 1.9 2002/12/02 15:59:07 tringali Exp $
2 SHELL=/bin/sh
4 # Makefile for NEdit text editor
6 # Targets are the suffixes of the system-specific makefiles in
7 # the makefiles/ directory.
8 # For example, to build NEdit for Solaris, give the command
10 # make solaris
12 # This builds an intermediate library in the util/ directory,
13 # then builds the nedit and nc executables in the source/ directory.
16 all:
17 @echo "Please specify target:"
18 @echo "(For example, type \"make linux\" for a Linux system.)"
19 @(cd makefiles && ls -C Makefile* | sed -e 's/Makefile.//g')
21 .DEFAULT:
22 @- (cd util; if [ -f ../makefiles/Makefile.$@ -a ! -f ./Makefile.$@ ];\
23 then ln -s ../makefiles/Makefile.$@ .; fi)
24 @- (cd source; if [ -f ../makefiles/Makefile.$@ -a ! -f ./Makefile.$@ ];\
25 then ln -s ../makefiles/Makefile.$@ .; fi)
26 (cd util; $(MAKE) -f Makefile.$@ libNUtil.a)
27 (cd source; $(MAKE) -f Makefile.$@ nedit nc)
29 # This should not be in the default build, as users may not have Perl
30 # installed. This is only interesting to developers.
31 docs:
32 (cd doc; $(MAKE) all)
34 # We need a "dev-all" target that builds the docs plus binaries, but
35 # that doesn't work since we require the user to specify the target. More
36 # thought is needed
38 clean:
39 (cd util; $(MAKE) -f Makefile.common clean)
40 (cd source; $(MAKE) -f Makefile.common clean)
42 realclean: clean
43 (cd doc; $(MAKE) clean)
46 # The following is for creating binary packages of NEdit.
48 RELEASE=nedit-5.4DEV-`uname -s`-`uname -p`
49 BINDIST-FILES=source/nedit source/nc README COPYRIGHT ReleaseNotes doc/nedit.doc doc/nedit.html doc/nedit.man doc/nc.man doc/faq.txt
51 dist-bin: $(BINDIST-FILES)
52 rm -rf $(RELEASE)
53 mkdir -p $(RELEASE)
54 cp $(BINDIST-FILES) $(RELEASE)/
55 strip $(RELEASE)/nedit $(RELEASE)/nc
56 chmod 555 $(RELEASE)/nedit $(RELEASE)/nc
57 tar cf $(RELEASE).tar $(RELEASE)
58 compress -c $(RELEASE).tar > $(RELEASE).tar.Z
59 -gzip -9 -c $(RELEASE).tar > $(RELEASE).tar.gz
60 -bzip2 -9 -c $(RELEASE).tar > $(RELEASE).tar.bz2
61 rm -rf $(RELEASE) $(RELEASE).tar