Annotation of GNUtools/emacs/Makefile.NeXT, revision 1.1

1.1     ! root        1: #
        !             2: #      Makefile for the productized installation of Emacs on a NeXT.
        !             3: #
        !             4: #      Lennart Lovstrand, Mon Dec  7 18:49:48 1992
        !             5: #
        !             6: #      Note: The emacs man page is no longer installed by the emacs
        !             7: #      project.  If an updated man page is released by FSF, it should
        !             8: #      be given to the manpages project.
        !             9: #
        !            10: 
        !            11: SYMROOT=.
        !            12: OBJROOT=.
        !            13: 
        !            14: BINDIR=        /usr/bin
        !            15: LIBDIR=        /usr/lib/emacs
        !            16: # MANDIR=      /usr/man/man1
        !            17: SRCDIR=        /NextDeveloper/Source/emacs
        !            18: 
        !            19: SFILE= s-mach2.h
        !            20: MFILE= m-next.h
        !            21: 
        !            22: MAKEORIG=Makefile.orig
        !            23: 
        !            24: DSTBINDIR=$(DSTROOT)$(BINDIR)
        !            25: DSTLIBDIR=$(DSTROOT)$(LIBDIR)
        !            26: # DSTMANDIR=$(DSTROOT)$(MANDIR)
        !            27: DSTSRCDIR=$(DSTROOT)/$(SRCDIR)
        !            28: 
        !            29: DSTLCKDIR=$(DSTLIBDIR)/lock
        !            30: ETCFILES=COPYING DISTRIB DOC-* MAILINGLISTS NEWS TUTORIAL *.lines
        !            31: 
        !            32: #
        !            33: #  Standard Makefile targets
        !            34: #
        !            35: 
        !            36: all:   sanitycheck linksrc $(SYMROOT)/src/paths.h $(SYMROOT)/src/config.h
        !            37:        @echo "# Building `basename \`pwd\``..."
        !            38:        cd $(SYMROOT); make -f $(MAKEORIG) all
        !            39: 
        !            40: install: $(DSTBINDIR) $(DSTLIBDIR) $(DSTLCKDIR) $(DSTSRCDIR) all
        !            41:        cd $(SYMROOT); \
        !            42:        install -c -m 755 -s -o root -g wheel src/xemacs $(DSTBINDIR)/emacs; \
        !            43:        install -c -m 755 -s -o root -g wheel etc/etags $(DSTBINDIR)/etags
        !            44: #      install -c -m 644 -o root -g wheel etc/emacs.1 $(DSTMANDIR)/emacs.1
        !            45:        for d in info lisp; do \
        !            46:            tar cf - $$d | (cd $(DSTLIBDIR); tar xf -); \
        !            47:        done
        !            48:        -rm -f $(DSTLIBDIR)/lisp/version.el
        !            49:        cp $(SYMROOT)/lisp/version.el $(DSTLIBDIR)/lisp/version.el
        !            50:        -mkdirs $(DSTLIBDIR)/etc
        !            51:        cd $(SYMROOT)/etc; install -c $(ETCFILES) $(DSTLIBDIR)/etc
        !            52:        find $(SYMROOT)/etc -type f -a ! -type l -print | \
        !            53:            while read f; do \
        !            54:                if file $$f | grep -s Mach-O; then \
        !            55:                    install -c -s $$f $(DSTLIBDIR)/etc; \
        !            56:                fi; \
        !            57:            done
        !            58:        -rm -f $(DSTLIBDIR)/etc/test-distrib
        !            59:        -chown -R root.wheel $(DSTLIBDIR)
        !            60:        -chmod -R go-w $(DSTLIBDIR)/etc $(DSTLIBDIR)/info $(DSTLIBDIR)/lisp
        !            61:        @if [ "$(SYMROOT)" != . ]; then \
        !            62:            echo "# Removing .o files from $$(SYMROOT)..."; \
        !            63:            find $(SYMROOT) -name \*.o -exec rm '{}' \;; \
        !            64:        fi
        !            65:        @echo "# Copying the source to $(DSTSRCDIR)..."; \
        !            66:        tar cf - . | (cd $(DSTSRCDIR); tar xvfp -)
        !            67:        @echo "# Removing crud files..."; \
        !            68:        rm -f $(DSTSRCDIR)/SGS_ENV; \
        !            69:        make -f $(MAKEORIG) clean LIBDIR=$(DSTLIBDIR)
        !            70: 
        !            71: installhdrs:
        !            72: 
        !            73: installsrc: $(SRCROOT)
        !            74:        tar cf - . | (cd $(SRCROOT); tar xvfp -)
        !            75: 
        !            76: clean:
        !            77:        cd $(SYMROOT); make -f $(MAKEORIG) clean LIBDIR=$(DSTLIBDIR)
        !            78: 
        !            79: #
        !            80: #  Supporting Makefile targets
        !            81: #
        !            82: 
        !            83: sanitycheck:
        !            84:        @if [ -n "$(RC_ARCHS)" -a "$(RC_ARCHS)" != `arch` ]; then \
        !            85:            echo -n "*** Sorry, Emacs can only be built natively;"; \
        !            86:            echo " this version will be `arch` only"; \
        !            87:        fi
        !            88:        @if [ ! -f $(MAKEORIG) ]; then \
        !            89:            echo -n "*** Oops: The original Makefile must be present as"; \
        !            90:            echo " $(MAKEORIG)"; \
        !            91:            false; \
        !            92:        fi
        !            93:        @for f in src/config.h-dist src/paths.h-dist; do \
        !            94:            if [ ! -f $$f -a ! -f `basename $f -dist` ]; then \
        !            95:                echo "*** Oops: Required file $$f is missing"; \
        !            96:                false; \
        !            97:            fi; \
        !            98:        done
        !            99: 
        !           100: linksrc: $(SYMROOT)
        !           101:        @if [ $(SYMROOT) = . ]; then \
        !           102:            if grep "^CPP" src/Makefile | grep -s traditional; then \
        !           103:                true; \
        !           104:            else \
        !           105:   echo "*** Can't build in-place:"; \
        !           106:   echo '***     Please either build emacs with SYMROOT != "." or add'; \
        !           107:   echo '***     "-traditional" to the CPP command in src/Makefile.'; \
        !           108:                false; \
        !           109:            fi; \
        !           110:        elif [ ! -f $(SYMROOT)/.linked ]; then \
        !           111:            echo -n "# Linking source tree into $(SYMROOT)..."; \
        !           112:            s=`pwd | sed 's=^/private=='`; \
        !           113:            v=`vers_string -n`; \
        !           114:            find . -print | sed 's=^./==' | (cd $(SYMROOT); \
        !           115:                while read f; do \
        !           116:                    if [ -d $$s/$$f ]; then \
        !           117:                        echo -n " $$f"; \
        !           118:                        if [ ! -d $$f ]; then \
        !           119:                            mkdirs $$f; \
        !           120:                        fi; \
        !           121:                    else \
        !           122:                        if [ ! -f $$f ]; then \
        !           123:                            ln -s $$s/$$f $$f; \
        !           124:                        fi; \
        !           125:                    fi; \
        !           126:                done; \
        !           127:                echo ""; \
        !           128:                echo "# Fixing up various cruft in the distribution:"; \
        !           129:                if grep "^CPP" src/Makefile | grep -s traditional; then \
        !           130:                    true; \
        !           131:                else \
        !           132:                    echo "# Adding -traditional to CPP in src/Makefile"; \
        !           133:                    rm -f src/Makefile; \
        !           134:                    sed '/^CPP/s/$$/ -traditional/' \
        !           135:                        $$s/src/Makefile >src/Makefile; \
        !           136:                fi; \
        !           137:                if grep -s "vers\.o" src/ymakefile; then \
        !           138:                    true; \
        !           139:                else \
        !           140:                    echo "# Including an SGS version file"; \
        !           141:                    rm -f src/ymakefile; \
        !           142:                    sed '/^obj=/s/=/= vers.o/' \
        !           143:                        $$s/src/ymakefile >src/ymakefile; \
        !           144:                    vers_string -c emacs >src/vers.c; \
        !           145:                fi; \
        !           146:                if grep C_SWITCH_MACHINE src/m-next.h | grep -s -e "-O"; then \
        !           147:                    true; \
        !           148:                else \
        !           149:                    echo "# Adding -O to C_SWITCH_MACHINE in src/m-next.h"; \
        !           150:                    rm -f src/m-next.h; \
        !           151:                    sed '/C_SWITCH_MACHINE/s/$$/ -O/' \
        !           152:                        $$s/src/m-next.h >src/m-next.h; \
        !           153:                fi; \
        !           154:                if grep CFLAGS etc/Makefile | grep -s -e "-O"; then \
        !           155:                    true; \
        !           156:                else \
        !           157:                    echo "# Adding -O to CFLAGS in etc/Makefile"; \
        !           158:                    rm -f etc/Makefile; \
        !           159:                    sed '/CFLAGS/s/$$/ -O/' \
        !           160:                        $$s/etc/Makefile >etc/Makefile; \
        !           161:                fi; \
        !           162:                rm -f etc/DOC*; \
        !           163:                echo "# Changing lisp/paths.el's definition of" \
        !           164:                    "manual-program [#33031]"; \
        !           165:                rm -f lisp/paths.el; \
        !           166:                sed "s/(eq system-type 'berkeley-unix)/(file-exists-p \"\\/usr\\/ucb\\/man\")/" \
        !           167:                    $$s/lisp/paths.el >lisp/paths.el; \
        !           168:                echo "# Setting lisp/version.el's emacs-version to $$v"; \
        !           169:                rm -f lisp/version.el; \
        !           170:                sed "s/-version \"[0-9\.]*\"/-version \"$$v\"/" \
        !           171:                    $$s/lisp/version.el >lisp/version.el; \
        !           172:                echo "# Disabling lisp/inc-vers.el"; \
        !           173:                rm -f lisp/inc-vers.el; \
        !           174:                echo "(kill-emacs)" >lisp/inc-vers.el); \
        !           175:        fi; \
        !           176:        touch $(SYMROOT)/.linked
        !           177: 
        !           178: $(SYMROOT)/src/paths.h:
        !           179:        @echo "# Creating a NeXT-based paths.h file..."
        !           180:        sed 's=/usr/local/emacs=$(LIBDIR)=g' src/paths.h-dist >$@
        !           181: 
        !           182: $(SYMROOT)/src/config.h:
        !           183:        @echo "# Creating a NeXT-based config.h file..."
        !           184:        sed -e 's/^#include "s-.*"/#include "$(SFILE)"/' \
        !           185:            -e 's/^#include "m-.*"/#include "$(MFILE)"/' \
        !           186:                src/config.h-dist >$@
        !           187: 
        !           188: cleanlinks: $(SYMROOT)
        !           189:        if [ "$(SYMROOT)" != "." ]; then \
        !           190:            find $(SYMROOT) -type l -exec rm '{}' \;; \
        !           191:        fi
        !           192: 
        !           193: $(OBJROOT) $(SYMROOT) $(DSTROOT) $(SRCROOT) $(DSTBINDIR) $(DSTLIBDIR) $(DSTSRCDIR):
        !           194:        mkdirs $@
        !           195: 
        !           196: $(DSTLCKDIR):
        !           197:        mkdirs -m 777 $@

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.