| 1 |
SHELL=/bin/sh |
| 2 |
# |
| 3 |
# Makefile for NEdit text editor |
| 4 |
# |
| 5 |
# Targets are the suffixes of the system-specific makefiles in |
| 6 |
# the makefiles/ directory. |
| 7 |
# For example, to build NEdit for Solaris, give the command |
| 8 |
# |
| 9 |
# make solaris |
| 10 |
# |
| 11 |
# This builds an intermediate library in the util/ directory, |
| 12 |
# then builds the nedit and nc executables in the source/ directory. |
| 13 |
# |
| 14 |
|
| 15 |
all: |
| 16 |
@echo "Please specify target:" |
| 17 |
@echo "(For example, type \"make linux\" for a Linux system.)" |
| 18 |
@(cd makefiles && ls -C Makefile* | sed -e 's/Makefile.//g') |
| 19 |
|
| 20 |
.DEFAULT: |
| 21 |
@- (cd Microline/XmL; if [ -f ../../makefiles/Makefile.$@ -a ! -f ./Makefile.$@ ];\ |
| 22 |
then ln -s ../../makefiles/Makefile.$@ .; fi) |
| 23 |
@- (cd Xlt; if [ -f ../makefiles/Makefile.$@ -a ! -f ./Makefile.$@ ];\ |
| 24 |
then ln -s ../makefiles/Makefile.$@ .; fi) |
| 25 |
@- (cd util; if [ -f ../makefiles/Makefile.$@ -a ! -f ./Makefile.$@ ];\ |
| 26 |
then ln -s ../makefiles/Makefile.$@ .; fi) |
| 27 |
@- (cd source; if [ -f ../makefiles/Makefile.$@ -a ! -f ./Makefile.$@ ];\ |
| 28 |
then ln -s ../makefiles/Makefile.$@ .; fi) |
| 29 |
|
| 30 |
(cd util; \ |
| 31 |
$(MAKE) -f Makefile.$@ libNUtil.a) |
| 32 |
(cd Xlt; $(MAKE) -f Makefile.$@ libXlt.a) |
| 33 |
(cd Microline/XmL; $(MAKE) -f Makefile.$@ libXmL.a) |
| 34 |
(cd source; $(MAKE) -f Makefile.$@ nedit nc) |
| 35 |
@source/nedit -V |
| 36 |
|
| 37 |
# This should not be in the default build, as users may not have Perl |
| 38 |
# installed. This is only interesting to developers. |
| 39 |
docs: |
| 40 |
(cd doc; $(MAKE) all) |
| 41 |
|
| 42 |
# We need a "dev-all" target that builds the docs plus binaries, but |
| 43 |
# that doesn't work since we require the user to specify the target. More |
| 44 |
# thought is needed |
| 45 |
|
| 46 |
clean: |
| 47 |
(cd util; $(MAKE) -f Makefile.common clean) |
| 48 |
(cd Xlt; $(MAKE) -f Makefile.common clean) |
| 49 |
(cd Microline/XmL; $(MAKE) -f Makefile.common clean) |
| 50 |
(cd source; $(MAKE) -f Makefile.common clean) |
| 51 |
|
| 52 |
realclean: clean |
| 53 |
(cd doc; $(MAKE) clean) |
| 54 |
|
| 55 |
# |
| 56 |
# The following is for creating binary packages of NEdit. |
| 57 |
# |
| 58 |
RELEASE=nedit-5.7-`uname -s`-`uname -m` |
| 59 |
BINDIST-FILES=source/nedit source/nc README COPYRIGHT ReleaseNotes doc/nedit.doc doc/nedit.html doc/nedit.man doc/nc.man doc/faq.txt |
| 60 |
|
| 61 |
dist-bin: $(BINDIST-FILES) |
| 62 |
rm -rf $(RELEASE) |
| 63 |
mkdir -p $(RELEASE) |
| 64 |
cp $(BINDIST-FILES) $(RELEASE)/ |
| 65 |
strip $(RELEASE)/nedit $(RELEASE)/nc |
| 66 |
chmod 555 $(RELEASE)/nedit $(RELEASE)/nc |
| 67 |
tar cf $(RELEASE).tar $(RELEASE) |
| 68 |
compress -c $(RELEASE).tar > $(RELEASE).tar.Z |
| 69 |
-gzip -9 -c $(RELEASE).tar > $(RELEASE).tar.gz |
| 70 |
-bzip2 -9 -c $(RELEASE).tar > $(RELEASE).tar.bz2 |
| 71 |
rm -rf $(RELEASE) $(RELEASE).tar |