"Fossies" - the Fresh Open Source Software Archive

Member "ne-3.2.1/makefile" (2 Oct 2019, 3672 Bytes) of package /linux/misc/ne-3.2.1.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "makefile": 3.2.0_vs_3.2.1.

    1 # Makefile for ne's distribution archive.
    2 
    3 .PHONY: install
    4 
    5 VERSION=3.2.1
    6 
    7 # If you change this prefix, you can invoke "make build install" and ne will be compiled
    8 # and installed under the $(PREFIX) hierarchy. You can even use "make install PREFIX=$HOME/<dir>"
    9 # to install ne locally into the directory <dir>.
   10 
   11 PREFIX?=/usr/local
   12 
   13 PROGRAM       = ne
   14 
   15 STRIP?=strip
   16 
   17 ifeq ($(OS), Windows_NT)
   18 	OS := Windows
   19 else
   20 	OS := $(shell uname -s)
   21 endif
   22 
   23 
   24 build: docs
   25 	( cd src; make clean; make NE_GLOBAL_DIR=$(PREFIX)/share/ne; $(STRIP) ne )
   26 
   27 docs:
   28 	( cd doc; make )
   29 
   30 alldocs: docs
   31 	( cd doc; make pdf )
   32 
   33 version:
   34 	./version.pl VERSION=$(VERSION)
   35 
   36 source: version alldocs
   37 	( cd src; make clean; make )
   38 	-rm -f ne-$(VERSION)
   39 	ln -s . ne-$(VERSION)
   40 	tar cvf ne-$(VERSION).tar ne-$(VERSION)/version.pl ne-$(VERSION)/makefile ne-$(VERSION)/COPYING ne-$(VERSION)/INSTALL.md ne-$(VERSION)/README.md ne-$(VERSION)/NEWS ne-$(VERSION)/CHANGES \
   41 	ne-$(VERSION)/src/*.[hc] ne-$(VERSION)/src/*.c.in ne-$(VERSION)/src/*.pl \
   42 	ne-$(VERSION)/extensions \
   43 	ne-$(VERSION)/macros/* \
   44 	ne-$(VERSION)/syntax/*.jsf \
   45 	ne-$(VERSION)/src/makefile ne-$(VERSION)/src/ne.texinfo ne-$(VERSION)/doc/ne.1 \
   46 	ne-$(VERSION)/doc/makefile ne-$(VERSION)/doc/ne.texinfo ne-$(VERSION)/doc/ne.info* ne-$(VERSION)/doc/version.*  \
   47 	ne-$(VERSION)/doc/html/*.html \
   48 	ne-$(VERSION)/doc/ne.pdf ne-$(VERSION)/doc/ne.txt ne-$(VERSION)/doc/default*
   49 	-rm -f ne-*.tar.gz
   50 	gzip ne-$(VERSION).tar
   51 	-rm -f ne-$(VERSION)
   52 
   53 install:
   54 	mkdir -p $(DESTDIR)$(PREFIX)/bin
   55 	mkdir -p $(DESTDIR)$(PREFIX)/share/ne/syntax
   56 	mkdir -p $(DESTDIR)$(PREFIX)/share/ne/macros
   57 	mkdir -p $(DESTDIR)$(PREFIX)/share/man/man1
   58 	mkdir -p $(DESTDIR)$(PREFIX)/share/doc/ne
   59 	mkdir -p $(DESTDIR)$(PREFIX)/share/info
   60 	cp -pf src/ne$(CMDSUFFIX) $(DESTDIR)$(PREFIX)/bin
   61 	cp -p extensions $(DESTDIR)$(PREFIX)/share/ne
   62 	cp -p syntax/*.jsf $(DESTDIR)$(PREFIX)/share/ne/syntax
   63 	cp -p macros/*     $(DESTDIR)$(PREFIX)/share/ne/macros
   64 	cp -p doc/ne.1 $(DESTDIR)$(PREFIX)/share/man/man1
   65 	cp -pR doc/html doc/ne.txt doc/default.* README.md COPYING NEWS CHANGES $(DESTDIR)$(PREFIX)/share/doc/ne
   66 	if [ -f doc/ne.pdf ]; then cp -p doc/ne.pdf $(DESTDIR)$(PREFIX)/share/doc/ne ; fi
   67 	cp -p doc/ne.info.gz $(DESTDIR)$(PREFIX)/share/info
   68 	-install-info --dir-file=$(DESTDIR)$(PREFIX)/share/info/dir $(DESTDIR)$(PREFIX)/share/info/ne.info.gz
   69 
   70 # Creates cygwin package on Windows
   71 
   72 cygwin:
   73 ifneq ($(OS), Windows)
   74 	$(error This target can only be run under Windows)
   75 endif
   76 	( cd src; make clean; make NE_GLOBAL_DIR=/usr/share/ne NE_TERMCAP=1 NE_ANSI=1 OPTS=-U__STRICT_ANSI__ )
   77 	make install PREFIX=/usr CMDSUFFIX=.exe
   78 	tar zcvf ne-cygwin-ansi-$(VERSION)-$(shell uname -m).tar.gz /usr/share/ne /usr/bin/ne.exe /usr/share/doc/ne /usr/share/info/ne.info.gz /usr/share/man/man1/ne.1
   79 	( cd src; make clean; make NE_GLOBAL_DIR=/usr/share/ne OPTS=-U__STRICT_ANSI__ )
   80 	make install PREFIX=/usr CMDSUFFIX=.exe
   81 	tar zcvf ne-cygwin-$(VERSION)-$(shell uname -m).tar.gz /usr/share/ne /usr/bin/ne.exe /usr/share/doc/ne /usr/share/info/ne.info.gz /usr/share/man/man1/ne.1
   82 
   83 
   84 # Creates Mac OS X .dmg
   85 
   86 macosx: alldocs
   87 ifneq ($(OS), Darwin)
   88 	$(error This target can only be run under Mac OS X)
   89 endif
   90 	( cd src; make clean; make NE_GLOBAL_DIR=/usr/local/share/ne; strip ne )
   91 	-rm -fr /tmp/package-ne-$(VERSION)
   92 	make install DESTDIR=/tmp/package-ne-$(VERSION)
   93 	pkgbuild --root /tmp/package-ne-$(VERSION) --install-location "/" --version $(VERSION) --identifier ne-$(VERSION) ne-$(VERSION).pkg
   94 	-rm -f ne-$(VERSION).dmg
   95 	hdiutil create -fs HFS+ -srcfolder ne-$(VERSION).pkg -volname ne-$(VERSION) ne-$(VERSION).dmg
   96 
   97 
   98 clean:
   99 	-rm -f ne-*.tar*
  100 
  101 really-clean: clean
  102 	(cd src; make clean)
  103 	(cd doc; make clean)