Annotation of GNUtools/emacs/Makefile, revision 1.1.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/GNU/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 xfp -); \
                     67:        chown -R root.wheel $(DSTSRCDIR)
                     68:        @echo "# Removing crud files..."; \
                     69:        rm -f $(DSTSRCDIR)/SGS_ENV; \
                     70:        make -f $(MAKEORIG) clean LIBDIR=$(DSTLIBDIR)
                     71: 
                     72: installhdrs:
                     73: 
                     74: installsrc: $(SRCROOT)
                     75:        tar cf - . | (cd $(SRCROOT); tar xvfp -)
                     76: 
                     77: clean:
                     78:        cd $(SYMROOT); make -f $(MAKEORIG) clean LIBDIR=$(DSTLIBDIR)
                     79: 
                     80: #
                     81: #  Supporting Makefile targets
                     82: #
                     83: 
                     84: sanitycheck:
                     85:        @if [ -n "$(RC_ARCHS)" -a "$(RC_ARCHS)" != `arch` ]; then \
                     86:            echo -n "*** Sorry, Emacs can only be built natively;"; \
                     87:            echo " this version will be `arch` only"; \
                     88:        fi
                     89:        @if [ ! -f $(MAKEORIG) ]; then \
                     90:            echo -n "*** Oops: The original Makefile must be present as"; \
                     91:            echo " $(MAKEORIG)"; \
                     92:            false; \
                     93:        fi
                     94:        @for f in src/config.h-dist src/paths.h-dist; do \
                     95:            if [ ! -f $$f -a ! -f `basename $f -dist` ]; then \
                     96:                echo "*** Oops: Required file $$f is missing"; \
                     97:                false; \
                     98:            fi; \
                     99:        done
                    100: 
                    101: linksrc: $(SYMROOT)
                    102:        @if [ $(SYMROOT) = . ]; then \
                    103:            if grep "^CPP" src/Makefile | grep -s traditional; then \
                    104:                true; \
                    105:            else \
                    106:   echo "*** Can't build in-place:"; \
                    107:   echo '***     Please either build emacs with SYMROOT != "." or add'; \
                    108:   echo '***     "-traditional" to the CPP command in src/Makefile.'; \
                    109:                false; \
                    110:            fi; \
                    111:        elif [ ! -f $(SYMROOT)/.linked ]; then \
                    112:            echo -n "# Linking source tree into $(SYMROOT)..."; \
                    113:            s=`pwd | sed 's=^/private=='`; \
                    114:            v=`vers_string -n`; \
                    115:            find . -print | sed 's=^./==' | (cd $(SYMROOT); \
                    116:                while read f; do \
                    117:                    if [ -d $$s/$$f ]; then \
                    118:                        echo -n " $$f"; \
                    119:                        if [ ! -d $$f ]; then \
                    120:                            mkdirs $$f; \
                    121:                        fi; \
                    122:                    else \
                    123:                        if [ ! -f $$f ]; then \
                    124:                            ln -s $$s/$$f $$f; \
                    125:                        fi; \
                    126:                    fi; \
                    127:                done; \
                    128:                echo ""; \
                    129:                echo "# Fixing up various cruft in the distribution:"; \
                    130:                if grep "^CPP" src/Makefile | grep -s traditional; then \
                    131:                    true; \
                    132:                else \
                    133:                    echo "# Adding -traditional to CPP in src/Makefile"; \
                    134:                    rm -f src/Makefile; \
                    135:                    sed '/^CPP/s/$$/ -traditional/' \
                    136:                        $$s/src/Makefile >src/Makefile; \
                    137:                fi; \
                    138:                if grep -s "vers\.o" src/ymakefile; then \
                    139:                    true; \
                    140:                else \
                    141:                    echo "# Including an SGS version file"; \
                    142:                    rm -f src/ymakefile; \
                    143:                    sed '/^obj=/s/=/= vers.o/' \
                    144:                        $$s/src/ymakefile >src/ymakefile; \
                    145:                    vers_string -c emacs >src/vers.c; \
                    146:                fi; \
                    147:                if grep C_SWITCH_MACHINE src/m-next.h | grep -s -e "-O"; then \
                    148:                    true; \
                    149:                else \
                    150:                    echo "# Adding -O to C_SWITCH_MACHINE in src/m-next.h"; \
                    151:                    rm -f src/m-next.h; \
                    152:                    sed '/C_SWITCH_MACHINE/s/$$/ -O/' \
                    153:                        $$s/src/m-next.h >src/m-next.h; \
                    154:                fi; \
                    155:                if grep CFLAGS etc/Makefile | grep -s -e "-O"; then \
                    156:                    true; \
                    157:                else \
                    158:                    echo "# Adding -O to CFLAGS in etc/Makefile"; \
                    159:                    rm -f etc/Makefile; \
                    160:                    sed '/CFLAGS/s/$$/ -O/' \
                    161:                        $$s/etc/Makefile >etc/Makefile; \
                    162:                fi; \
                    163:                rm -f etc/DOC*; \
                    164:                echo "# Changing lisp/paths.el's definition of" \
                    165:                    "manual-program [#33031]"; \
                    166:                rm -f lisp/paths.el; \
                    167:                sed "s/(eq system-type 'berkeley-unix)/(file-exists-p \"\\/usr\\/ucb\\/man\")/" \
                    168:                    $$s/lisp/paths.el >lisp/paths.el; \
                    169:                echo "# Setting lisp/version.el's emacs-version to $$v"; \
                    170:                rm -f lisp/version.el; \
                    171:                sed "s/-version \"[0-9\.]*\"/-version \"$$v\"/" \
                    172:                    $$s/lisp/version.el >lisp/version.el; \
                    173:                echo "# Disabling lisp/inc-vers.el"; \
                    174:                rm -f lisp/inc-vers.el; \
                    175:                echo "(kill-emacs)" >lisp/inc-vers.el); \
                    176:        fi; \
                    177:        touch $(SYMROOT)/.linked
                    178: 
                    179: $(SYMROOT)/src/paths.h:
                    180:        @echo "# Creating a NeXT-based paths.h file..."
                    181:        sed 's=/usr/local/emacs=$(LIBDIR)=g' src/paths.h-dist >$@
                    182: 
                    183: $(SYMROOT)/src/config.h:
                    184:        @echo "# Creating a NeXT-based config.h file..."
                    185:        sed -e 's/^#include "s-.*"/#include "$(SFILE)"/' \
                    186:            -e 's/^#include "m-.*"/#include "$(MFILE)"/' \
                    187:                src/config.h-dist >$@
                    188: 
                    189: cleanlinks: $(SYMROOT)
                    190:        if [ "$(SYMROOT)" != "." ]; then \
                    191:            find $(SYMROOT) -type l -exec rm '{}' \;; \
                    192:        fi
                    193: 
                    194: $(OBJROOT) $(SYMROOT) $(DSTROOT) $(SRCROOT) $(DSTBINDIR) $(DSTLIBDIR) $(DSTSRCDIR):
                    195:        mkdirs $@
                    196: 
                    197: $(DSTLCKDIR):
                    198:        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.