home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR24 / BASH_112.ZIP / BASH-112.TAR / bash-1.12 / out < prev    next >
Text File  |  1993-02-13  |  19KB  |  1,202 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  # This Makefile is automagically made from cpp-Makefile.  You should
  29.  # not be editing this file; edit cpp-Makefile, machines.h, or
  30.  # support/mksysdefs instead.  Then, assuming the edits were required
  31.  # to compile Bash on your system, mail the changes you had to make to
  32.  # bash-maintainers@ai.mit.edu.  We will do our best to incorporate
  33.  # them into the next release.
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  # We would like you to use Bison instead of Yacc since some
  50.  # versions of Yacc cannot handle reentrant parsing.  Unfortunately,
  51.  # this includes the Yacc currently being shipped with SunOS4.x.
  52.  # If you do use Yacc, please make sure that any bugs in parsing
  53.  # are not really manifestations of Yacc bugs before you report
  54.  # them.
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.       
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404.  
  405.  
  406.  
  407.  
  408.  
  409.  
  410.  
  411.  
  412.  
  413.  
  414.  
  415.  
  416.  
  417.  
  418.  
  419.  
  420.  
  421.  
  422.  
  423.  
  424.  
  425.  
  426.  
  427.  
  428.  
  429.  
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.  
  470.  
  471.  
  472.  
  473.  
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.  
  481.  
  482.  
  483.  
  484.  
  485.  
  486.  
  487.  
  488.  
  489.  
  490.  
  491.  
  492.  
  493.  
  494.  
  495.  
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.  
  536.  
  537.  
  538.  
  539.  
  540.  
  541.  
  542.  
  543.  
  544.  
  545.  
  546.  
  547.  
  548.  
  549.  
  550.  
  551.  
  552.  
  553.  
  554.  
  555.  
  556.  
  557.  
  558.  
  559.  
  560.  
  561.  
  562.  
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.  
  602.  
  603.  
  604.  
  605.  
  606.  
  607.  
  608.  
  609.  
  610.  
  611.  
  612.  
  613.  
  614.  
  615.  
  616.  
  617.  
  618.  
  619.  
  620.  
  621.  
  622.  
  623.  
  624.  
  625.  
  626.  
  627.  
  628.  
  629.  
  630.  
  631.  
  632.  
  633.  
  634.  
  635.  
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  # Here is a rule for making .o files from .c files that does not
  643.  # force the type of the machine (like -"i386" ) into the flags.
  644. .c.o:
  645.     $(RM) $@
  646.     $(CC) $(CFLAGS) $(CPPFLAGS) -c $*.c
  647.  
  648.  
  649. BISON = bison -y
  650.  
  651.  
  652.  
  653. CC = gcc 
  654.  
  655.  
  656.  # Of course, you cannot do this the first time through...
  657.  #SHELL=$(DESTDIR)/bash
  658. SHELL=/bin/sh
  659.  
  660. RM = rm -f
  661. AR = ar
  662.  
  663. MACHINE = "i386" 
  664. OS = USG 
  665.  
  666.  # PROFILE_FLAGS is either -pg, to generate profiling info for use
  667.  # with gprof, or nothing (the default).
  668. PROFILE_FLAGS=
  669.  
  670.  
  671.  
  672.  
  673.  # This system has some peculiar flags that must be passed to the
  674.  # the C compiler (or to cpp).
  675. SYSDEP = -DUSGr3 
  676.  
  677.  
  678.  
  679.  
  680.  
  681.  
  682.  
  683.  # This system has the vprintf () and vfprintf () calls.
  684. VPRINTF = -DHAVE_VFPRINTF
  685.  
  686.  
  687.  
  688.  
  689.  
  690.  
  691.  
  692.  # This system has <sys/resource.h>
  693. RESOURCE = -DHAVE_RESOURCE
  694.  
  695.  
  696.  
  697.  # The signal () call of this system returns a pointer to a function
  698.  # returning void.  The signal handlers themselves are thus void functions.
  699. SIGHANDLER = -DVOID_SIGHANDLER
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  # This system has <sys/wait.h>
  706. WAITH = -DHAVE_WAIT_H
  707.  
  708.  
  709.  
  710.  
  711.  
  712.  # This system has a working version of dup2 ().
  713. DUP2 = -DHAVE_DUP2
  714.  
  715.  
  716. SYSTEM_FLAGS = $(LINEBUF) $(VPRINTF) $(UNISTD) $(GROUPS) $(RESOURCE)        $(SIGHANDLER) $(SYSDEP) $(WAITH) $(GETWD) $(DUP2) $(STRERROR)        -D$(MACHINE) -D$(OS)
  717. DEBUG_FLAGS = $(PROFILE_FLAGS) -g
  718. LDFLAGS    = $(NOSHARE) $(SYSDEP_LD) $(EXTRA_LD_PATH) $(DEBUG_FLAGS)
  719. CFLAGS    = $(DEBUG_FLAGS) $(SYSTEM_FLAGS) -DSHELL $(ALLOCA_CFLAGS)
  720. CPPFLAGS= -I$(LIBSRC)
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.  
  731.  
  732.  
  733.  
  734.  
  735.  
  736.  
  737.  
  738.  
  739.  
  740.  
  741.  
  742.  
  743.  
  744.  
  745. LIBRARY_CFLAGS  = $(DEBUG_FLAGS) $(SIGHANDLER) $(ALLOCA_CFLAGS)           $(SYSDEP) -D$(MACHINE) -D$(OS) $(UNISTD) -DSHELL
  746.  
  747.  # These are required for sending bug reports.
  748. SYSTEM_NAME = $(MACHINE)
  749. OS_NAME = $(OS)
  750.  
  751.  # The name of this program.
  752. PROGRAM = bash
  753.  
  754.  # The type of machine Bash is being compiled on.
  755. HOSTTYPE_DECL = -DHOSTTYPE='$(SYSTEM_NAME)'
  756.  
  757.  
  758.  
  759.  # The default primary and secondary prompts.
  760. PPROMPT = '"${PROGRAM}\\$$ "'
  761. SPROMPT = '"> "'
  762.  
  763.  
  764.  
  765.  # The group of configuration flags.  These are for shell.c
  766. CFG_FLAGS = -DPPROMPT=$(PPROMPT) -DSPROMPT=$(SPROMPT) -DOS_NAME='"$(OS_NAME)"'        -DSYSTEM_NAME='$(SYSTEM_NAME)' $(SIGLIST_FLAG) $(MAINTAIN_DEFINE)
  767.  
  768.  # The directory which contains the source for malloc.  The name must
  769.  # end in a slash, as in "./lib/malloc/".
  770. ALLOC_DIR = ./lib/malloc/
  771.  
  772.  # Our malloc.
  773.  
  774. MALLOC = $(ALLOC_DIR)malloc.o
  775. MALLOC_DEP = $(ALLOC_DIR)malloc.c $(ALLOC_DIR)getpagesize.h
  776. MALLOC_FLAGS = -Drcheck -Dbotch=programming_error
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787. ALLOCA_H_DEFINE = -DHAVE_ALLOCA_H
  788.  
  789.  
  790.  
  791. ALLOCA_DEFINE = -DHAVE_ALLOCA
  792.  
  793.  
  794. ALLOCA_CFLAGS = $(ALLOCA_DEFINE) $(ALLOCA_H_DEFINE)
  795.  
  796.  
  797.  
  798.  
  799.  
  800.  
  801.  
  802. ALLOC_HEADERS = $(ALLOC_DIR)getpagesize.h
  803. ALLOC_FILES = $(ALLOC_DIR)malloc.c $(ALLOC_DIR)alloca.c $(ALLOC_DIR)xmalloc.c           $(ALLOC_DIR)i386-alloca.s $(ALLOC_DIR)x386-alloca.s
  804.  
  805.  
  806.  
  807.  
  808.  
  809.  
  810.  
  811.  
  812.  # Since this system does not have sys_siglist, we define SIGLIST
  813.  # as siglist.o.
  814. SIGLIST = siglist.o
  815. SIGLIST_FLAG=-DINITIALIZE_SIGLIST
  816.  
  817.  
  818.  
  819.  
  820.  # The location of ranlib on your system.
  821.  
  822. RANLIB = ranlib
  823.  
  824.  
  825.  # Support for the libraries required.  Termcap, Glob, and Readline.
  826.  # The location of sources for the support libraries.
  827. LIBSRC = ./lib/
  828. LIBINC_DECL  = LIBINCDIR=`pwd`; export LIBINCDIR
  829. LIBINC_USAGE = "-I$${LIBINCDIR} -I$${LIBINCDIR}/$(LIBSRC)"
  830.  
  831.  
  832.  
  833.  
  834.  
  835. SEARCH_LIB = -L
  836.  
  837.  
  838.  
  839.  
  840. RLIBSRC = $(LIBSRC)readline/
  841. RLIBDOC = $(RLIBSRC)doc/
  842.  
  843.  # The source, object and documentation of the history library.
  844. HISTORY_SOURCE    = $(RLIBSRC)history.c $(RLIBSRC)history.h
  845. HISTORY_OBJ    = $(RLIBSRC)history.o
  846. HISTORY_DOC    = $(RLIBDOC)hist.texinfo $(RLIBDOC)hsuser.texinfo           $(RLIBDOC)hstech.texinfo
  847.  
  848.  # The source, object and documentation of the GNU Readline library.
  849.  # The source to the history library is inherently part of this.
  850. READLINE_SOURCE    = $(RLIBSRC)readline.c $(RLIBSRC)readline.h          $(RLIBSRC)chardefs.h $(RLIBSRC)keymaps.h          $(RLIBSRC)funmap.c $(RLIBSRC)emacs_keymap.c          $(RLIBSRC)vi_keymap.c $(RLIBSRC)keymaps.c          $(RLIBSRC)vi_mode.c $(GLIBSRC)tilde.c $(HISTORY_SOURCE)
  851.  
  852. READLINE_OBJ    = $(RLIBSRC)readline.o $(RLIBSRC)funmap.o           $(RLIBSRC)keymaps.o $(GLIBSRC)tilde.o $(HISTORY_OBJ)
  853.  
  854. READLINE_DOC    = $(RLIBDOC)rlman.texinfo $(RLIBDOC)rluser.texinfo           $(RLIBDOC)rltech.texinfo
  855.  
  856. READLINE_DOC_SUPPORT  = $(RLIBDOC)Makefile $(RLIBDOC)texinfo.tex           $(RLIBDOC)texindex.c $(RLIBDOC)readline.dvi           $(RLIBDOC)readline.info $(RLIBDOC)history.dvi           $(RLIBDOC)history.info
  857.  
  858.  # This has to be written funny to avoid looking like a C comment starter.
  859. READLINE_EXAMPLES = $(RLIBSRC)examples/[a-zA-Z]*.[ch]             $(RLIBSRC)examples/Makefile $(RLIBSRC)examples/Inputrc
  860.  
  861.  # Support files for GNU Readline.
  862. READLINE_SUPPORT = $(RLIBSRC)Makefile $(RLIBSRC)ChangeLog $(RLIBSRC)COPYING            $(READLINE_EXAMPLES) $(READLINE_DOC_SUPPORT)
  863.  
  864.  
  865. READLINE_CFLAGS = $(DEBUG_FLAGS) $(SIGHANDLER) $(ALLOCA_CFLAGS)           $(SYSDEP) -D$(MACHINE) -D$(OS) $(UNISTD)
  866.  
  867.  
  868.  
  869.  
  870.  
  871.  
  872.  
  873.  
  874.  
  875.  
  876. GLIBSRC = $(LIBSRC)glob/
  877.  
  878.  
  879.  
  880.  
  881. GLOB_SOURCE = $(GLIBSRC)glob.c $(GLIBSRC)tilde.c         $(GLIBSRC)fnmatch.c $(GLIBSRC)fnmatch.h
  882.  
  883.  
  884. GLOB_OBJ     = $(GLIBSRC)libglob.a
  885. GLOB_DOC     = $(GLIBSRC)glob.texinfo
  886. GLOB_SUPPORT = $(GLIBSRC)Makefile $(GLIBSRC)ChangeLog
  887. GLOB_LDFLAGS = $(SEARCH_LIB)$(GLIBSRC)
  888. GLOB_LIB     = -lglob
  889.  
  890.  
  891.  # Declare all of the sources for the libraries that we have.
  892. LIBRARY_SOURCE    = $(READLINE_SOURCE) $(TERMCAP_SOURCE) $(GLOB_SOURCE)
  893. LIBRARY_DOC    = $(READLINE_DOC) $(HISTORY_DOC) $(TERMCAP_DOC) $(GLOB_DOC)
  894. LIBRARY_SUPPORT    = $(READLINE_SUPPORT) $(TERMCAP_SUPPORT) $(GLOB_SUPPORT)
  895. LIBRARY_TAR    = $(LIBRARY_SOURCE) $(LIBRARY_DOC) $(LIBRARY_SUPPORT)
  896.  
  897.  
  898.  # You wish to compile with the line editing features installed.
  899. READLINE_LIB = -lreadline
  900.  
  901.  # You only need termcap for readline.
  902.  
  903. TERMCAP_LIB = -ltermcap
  904.  
  905.  
  906.  # Directory list for -L so that the link editor (ld) can find -lreadline.
  907.  
  908. READLINE_LDFLAGS = $(SEARCH_LIB)$(RLIBSRC) $(TERMCAP_LDFLAGS)
  909.  
  910.  
  911.  # The source and object of the bash<->readline interface code.
  912. RL_SUPPORT_SRC = bashline.c
  913. RL_SUPPORT_OBJ = bashline.o
  914.  
  915.  
  916.  
  917.  # Locally required libraries.
  918. LOCAL_LIBS = -lPW 
  919.  
  920.  
  921.  # The order is important.  Most dependent first.
  922. LIBRARIES = $(READLINE_LIB) $(TERMCAP_LIB) $(GLOB_LIB) $(LOCAL_LIBS)
  923.  
  924.  
  925.  
  926.  
  927. READLINE_DEP = ./lib/readline/libreadline.a 
  928.  
  929.  
  930.  
  931. GLOB_DEP = ./lib/glob/libglob.a 
  932.  
  933.  
  934.  # Source files for libraries that Bash depends on.
  935. LIBDEP = $(READLINE_DEP) $(TERMCAP_DEP) $(GLOB_DEP)
  936.  
  937.  # Rules for cleaning the readline and termcap sources.
  938.  
  939.  
  940.  
  941.  
  942.  
  943.  
  944.  
  945.  
  946.  
  947.  
  948.  
  949.  
  950. BUILTINS_LIB = builtins/libbuiltins.a
  951.  
  952.  # The main source code for the Bourne Again SHell.
  953. CSOURCES = shell.c parse.y general.c make_cmd.c print_cmd.c y.tab.c        dispose_cmd.c execute_cmd.c variables.c $(GLOBC) version.c        expr.c copy_cmd.c flags.c subst.c hash.c mailcheck.c        test.c trap.c jobs.c nojobs.c $(ALLOC_FILES) braces.c        unwind_prot.c siglist.c getcwd.c $(RL_SUPPORT_SRC) error.c
  954.  
  955. HSOURCES = shell.h flags.h trap.h hash.h jobs.h builtins.h alias.c y.tab.h        general.h variables.h config.h $(ALLOC_HEADERS) alias.h maxpath.h        quit.h machines.h posixstat.h filecntl.h unwind_prot.h parser.h        command.h input.h error.h
  956.  
  957. SOURCES     = $(CSOURCES) $(HSOURCES) $(BUILTIN_DEFS)
  958.  
  959.  # Matching object files.
  960. OBJECTS     = shell.o y.tab.o general.o make_cmd.o print_cmd.o $(GLOBO)        dispose_cmd.o execute_cmd.o variables.o copy_cmd.o error.o        expr.o flags.o jobs.o subst.o hash.o mailcheck.o test.o        trap.o alias.o $(MALLOC) $(ALLOCA) braces.o unwind_prot.o        $(SIGLIST) $(GETCWD) version.o $(RL_SUPPORT_OBJ) $(BUILTINS_LIB)
  961.  
  962.  # Where the source code of the shell builtins resides.
  963. DEFDIR = builtins/
  964. BUILTIN_DEFS = $(DEFDIR)alias.def $(DEFDIR)bind.def $(DEFDIR)break.def            $(DEFDIR)builtin.def $(DEFDIR)cd.def $(DEFDIR)colon.def            $(DEFDIR)command.def $(DEFDIR)declare.def            $(DEFDIR)echo.def $(DEFDIR)enable.def $(DEFDIR)eval.def            $(DEFDIR)exec.def $(DEFDIR)exit.def $(DEFDIR)fc.def            $(DEFDIR)fg_bg.def $(DEFDIR)hash.def $(DEFDIR)help.def            $(DEFDIR)history.def $(DEFDIR)jobs.def $(DEFDIR)kill.def            $(DEFDIR)let.def $(DEFDIR)read.def $(DEFDIR)return.def            $(DEFDIR)set.def $(DEFDIR)setattr.def $(DEFDIR)shift.def            $(DEFDIR)source.def $(DEFDIR)suspend.def $(DEFDIR)test.def            $(DEFDIR)times.def $(DEFDIR)trap.def $(DEFDIR)type.def            $(DEFDIR)ulimit.def $(DEFDIR)umask.def $(DEFDIR)wait.def            $(DEFDIR)getopts.def $(DEFDIR)reserved.def
  965. BUILTIN_C_CODE  = $(DEFDIR)mkbuiltins.c $(DEFDIR)common.c           $(DEFDIR)hashcom.h $(GETOPT_SOURCE)
  966. GETOPT_SOURCE   = $(DEFDIR)getopt.c $(DEFDIR)getopt.h
  967. PSIZE_SOURCE    = $(DEFDIR)psize.sh $(DEFDIR)psize.c
  968. BUILTIN_SUPPORT = $(DEFDIR)Makefile $(DEFDIR)ChangeLog $(PSIZE_SOURCE)           $(BUILTIN_C_CODE)
  969.  
  970.  # Documentation for the shell.
  971. DOCDIR = ./documentation/
  972. BASH_TEXINFO = $(DOCDIR)*.texi $(DOCDIR)*.tex $(DOCDIR)texindex.c             $(DOCDIR)*.dvi $(DOCDIR)Makefile
  973. BASH_MAN = $(DOCDIR)bash.1
  974. BASHDOCS = $(BASH_TEXINFO) $(BASH_MAN) INSTALL README RELEASE
  975. DOCUMENTATION = $(BASHDOCS) $(LIBRARY_DOC)
  976.  
  977.  # Some example files demonstrating use of the shell.
  978.  
  979. EXAMPLES = examples/[a-zA-Z]*
  980.  
  981. ENDIAN_SUPPORT = endian.c
  982. SDIR = ./support/
  983. MKTARFILE = $(SDIR)mktarfile
  984. SCRIPTS_SUPPORT = $(SDIR)mksysdefs $(SDIR)cppmagic $(SDIR)cat-s           $(MKTARFILE) $(SDIR)mail-shell $(SDIR)inform
  985.  
  986. TEST_SUITE = ./test-suite/
  987. TEST_SUITE_SUPPORT = $(TEST_SUITE)[a-zA-Z0-9]*
  988.  
  989. CREATED_SUPPORT = endian.aux endian.h sysdefs.h $(SDIR)getcppsyms
  990.  
  991. SUPPORT = configure $(ENDIAN_SUPPORT) $(SCRIPTS_SUPPORT) $(BUILTIN_SUPPORT)       COPYING Makefile cpp-Makefile ChangeLog .distribution newversion.c       $(EXAMPLES) $(SDIR)bash.xbm $(SDIR)getcppsyms.c $(TEST_SUITE_SUPPORT)
  992.  
  993.  # BAGGAGE consists of things that you want to keep with the shell for some
  994.  # reason, but do not actually use; old source code, etc.
  995. BAGGAGE = longest_sig.c
  996.  
  997.  # Things that the world at large needs.
  998. THINGS_TO_TAR = $(SOURCES) $(LIBRARY_TAR) $(BASHDOCS) $(SUPPORT) $(BAGGAGE)
  999.  
  1000. all: .made
  1001.  
  1002.  # Keep GNU Make from exporting the entire environment for small machines.
  1003. .NOEXPORT:
  1004.  
  1005. .made: $(PROGRAM)
  1006.     cp .machine .made
  1007.  
  1008. $(PROGRAM):  .build $(OBJECTS) $(LIBDEP) .distribution
  1009.     $(RM) $@
  1010.     $(CC) $(LDFLAGS) $(READLINE_LDFLAGS) $(GLOB_LDFLAGS)        -o $(PROGRAM) $(OBJECTS) $(LIBRARIES)
  1011.  
  1012. .build:    $(SOURCES) cpp-Makefile newversion.aux
  1013.     if ./newversion.aux -build; then mv -f newversion.h version.h; fi
  1014.     @echo
  1015.     @echo "      ***************************************************"
  1016.     @echo "      *                            *"
  1017.     @echo "      * Making Bash-`cat .distribution` for a $(MACHINE) running $(OS)."
  1018.     @echo "      *                            *"
  1019.     @echo "      ***************************************************"
  1020.     @echo
  1021.     @echo "$(PROGRAM) last made for a $(MACHINE) running $(OS)" >.machine
  1022.  
  1023. version.h:    newversion.aux
  1024.     if ./newversion.aux -build; then mv -f newversion.h version.h; fi
  1025.  
  1026. y.tab.c:    parse.y parser.h command.h input.h
  1027.         -if test -f y.tab.h; then mv -f y.tab.h old-y.tab.h; fi
  1028.         @echo "Expect 12 reduce/reduce errors.  No Problem."
  1029.         $(BISON) -d parse.y
  1030.         -if cmp -s old-y.tab.h y.tab.h; then mv old-y.tab.h y.tab.h; fi
  1031.  
  1032.  
  1033. ./lib/readline/libreadline.a : $(READLINE_SOURCE)
  1034.     @echo "Building in " $(RLIBSRC) "..."; ($(LIBINC_DECL); cd $(RLIBSRC); $(MAKE) $(MFLAGS) CFLAGS='$(LIBRARY_CFLAGS) '$(LIBINC_USAGE)  CPPFLAGS='$(CPPFLAGS)'  LDFLAGS='$(LDFLAGS)'  RANLIB='$(RANLIB)' AR='$(AR)' CC='$(CC)' ) 
  1035.  
  1036.  
  1037.  
  1038.  
  1039.  
  1040. ./lib/glob/libglob.a : $(GLOB_SOURCE)
  1041.     @echo "Building in " $(GLIBSRC) "..."; ($(LIBINC_DECL); cd $(GLIBSRC); $(MAKE) $(MFLAGS) CFLAGS='$(LIBRARY_CFLAGS) '$(LIBINC_USAGE)  CPPFLAGS='$(CPPFLAGS)'  LDFLAGS='$(LDFLAGS)'  RANLIB='$(RANLIB)' AR='$(AR)' CC='$(CC)' ) 
  1042.  
  1043.  
  1044. version.o:    version.h version.c
  1045.  
  1046. shell.o:    shell.h flags.h shell.c posixstat.h filecntl.h endian.h         parser.h
  1047.         $(CC) $(CFG_FLAGS) $(CFLAGS) $(CPPFLAGS) -c shell.c
  1048.  
  1049. endian.h:    endian.aux
  1050.         ./endian.aux endian.h
  1051.  
  1052. endian.aux:    endian.c
  1053.         $(CC) $(CFLAGS) -o $@ endian.c
  1054.  
  1055.  
  1056.  
  1057.  
  1058. $(MALLOC):    $(MALLOC_DEP)
  1059.         $(CC) -I$(ALLOC_DIR) $(CFLAGS) $(MALLOC_FLAGS) -c $*.c
  1060.         @-mv `basename $*`.o $(MALLOC) 2>/dev/null
  1061.  
  1062.  
  1063.  
  1064.  
  1065.  
  1066. variables.o: shell.h hash.h flags.h variables.h variables.c
  1067.     $(CC) -c $(CFLAGS) $(CPPFLAGS) $(HOSTTYPE_DECL) variables.c
  1068.  
  1069. builtins/libbuiltins.a: $(BUILTIN_DEFS) $(BUILTIN_C_CODE)
  1070.     ($(LIBINC_DECL); cd $(DEFDIR); $(MAKE) $(MFLAGS) CPPFLAGS='$(CPPFLAGS)' CFLAGS='$(CFLAGS) '$(LIBINC_USAGE)' -I.' LDFLAGS='$(LDFLAGS)' RANLIB='$(RANLIB)' AR='$(AR)' CC='$(CC)' DIRECTDEFINE='-D '$(DEFDIR)) 
  1071.  
  1072.  
  1073. shell.h:    general.h variables.h config.h quit.h
  1074. jobs.h:        endian.h quit.h
  1075. variables.h:    hash.h
  1076. braces.o: general.h
  1077. copy_cmd.o: shell.h hash.h
  1078. copy_cmd.o: general.h variables.h config.h quit.h
  1079. dispose_cmd.o: shell.h
  1080. dispose_cmd.o: general.h variables.h config.h quit.h
  1081. error.o: error.h
  1082. execute_cmd.o: shell.h y.tab.h posixstat.h flags.h jobs.h
  1083. execute_cmd.o: general.h variables.h config.h quit.h hash.h endian.h
  1084. execute_cmd.o: unwind_prot.h
  1085. expr.o: shell.h hash.h
  1086. expr.o: general.h variables.h config.h quit.h
  1087. flags.o: flags.h config.h general.h quit.h
  1088. general.o: shell.h maxpath.h
  1089. general.o: general.h variables.h config.h quit.h
  1090. hash.o: shell.h hash.h
  1091. hash.o: general.h variables.h config.h quit.h
  1092. jobs.o: shell.h hash.h trap.h jobs.h
  1093. jobs.o: general.h variables.h config.h endian.h quit.h
  1094. mailcheck.o: posixstat.h maxpath.h variables.h
  1095. mailcheck.o: hash.h quit.h
  1096. make_cmd.o: shell.h flags.h
  1097. make_cmd.o: general.h variables.h config.h quit.h
  1098. y.tab.o: shell.h flags.h maxpath.h
  1099. y.tab.o: general.h variables.h config.h quit.h
  1100. print_cmd.o: shell.h y.tab.h
  1101. print_cmd.o: general.h variables.h config.h quit.h
  1102. shell.o: shell.h flags.h
  1103. shell.o: general.h variables.h config.h quit.h
  1104. subst.o: shell.h flags.h alias.h jobs.h
  1105. subst.o: general.h variables.h config.h endian.h quit.h
  1106. test.o: posixstat.h
  1107. trap.o: trap.h shell.h hash.h unwind_prot.h
  1108. trap.o: general.h variables.h config.h quit.h
  1109. unwind_prot.o: config.h general.h unwind_prot.h
  1110.  
  1111.  
  1112.  
  1113.  
  1114. bashline.o: shell.h hash.h builtins.h
  1115. bashline.o: general.h variables.h config.h quit.h alias.h
  1116.  
  1117.  
  1118.  
  1119.  
  1120. bashline.o: $(RLIBSRC)chardefs.h $(RLIBSRC)history.h $(RLIBSRC)readline.h
  1121. bashline.o: $(RLIBSRC)keymaps.h $(RLIBSRC)history.h
  1122. y.tab.o: $(RLIBSRC)keymaps.h $(RLIBSRC)chardefs.h $(RLIBSRC)history.h
  1123. y.tab.o: $(RLIBSRC)readline.h
  1124. subst.o: $(RLIBSRC)history.h
  1125.  
  1126.  
  1127.  
  1128. subst.o: $(GLIBSRC)fnmatch.h
  1129. execute_cmd.o: $(GLIBSRC)fnmatch.h
  1130.  
  1131.  
  1132.  
  1133. $(PROGRAM).tar: $(THINGS_TO_TAR) .distribution
  1134.     @$(MKTARFILE) $(PROGRAM) `cat .distribution` $(THINGS_TO_TAR)
  1135.  
  1136. $(PROGRAM).tar.Z:    $(PROGRAM).tar
  1137.         compress -f $(PROGRAM).tar
  1138.  
  1139. clone:        $(THINGS_TO_TAR)
  1140.     @$(MKTARFILE) +notar $(MACHINE) $(OS) $(THINGS_TO_TAR)
  1141.         
  1142. install:    .made
  1143.         -if [ -f $(DESTDIR)/$(PROGRAM) ];         then mv $(DESTDIR)/$(PROGRAM) $(DESTDIR)/$(PROGRAM).old;         fi
  1144.         cp $(PROGRAM) $(DESTDIR)/$(PROGRAM)
  1145.         $(RM) installed-$(PROGRAM)
  1146.         ln -s $(DESTDIR)/$(PROGRAM) installed-$(PROGRAM)
  1147.  
  1148. mailable:    distribution
  1149.         /bin/rm -rf uuencoded
  1150.         mkdir uuencoded
  1151.         $(SHELL) -c 'f=$(PROGRAM)-`cat .distribution`.tar.Z;uuencode $$f $$f | split -800 - uuencoded/$$f.uu.'
  1152.  
  1153. .distribution:
  1154.         ./newversion.aux -dist `$(PROGRAM) -c 'echo $$BASH_VERSION'`
  1155.  
  1156. distribution:    $(PROGRAM) $(PROGRAM).tar.Z .distribution
  1157.         @echo cp $(PROGRAM).tar.Z $(PROGRAM)-`cat .distribution`.tar.Z
  1158.         @cp $(PROGRAM).tar.Z $(PROGRAM)-`cat .distribution`.tar.Z
  1159.  
  1160. newversion.aux:    newversion.c
  1161.         $(CC) $(DEBUG_FLAGS) -o newversion.aux newversion.c -lm
  1162.  
  1163. newversion:    newversion.aux
  1164.         $(RM) .build
  1165.         ./newversion.aux -dist
  1166.         mv -f newversion.h version.h
  1167.         $(MAKE) $(MFLAGS)
  1168.  
  1169. documentation:  documentation-frob
  1170.         (cd $(DOCDIR); make)
  1171.  
  1172. documentation-frob:
  1173.  
  1174. tags:        $(SOURCES) $(BUILTIN_C_CODE) $(LIBRARY_SOURCE)
  1175.         etags $(SOURCES) $(BUILTIN_C_CODE) $(LIBRARY_SOURCE)
  1176.  
  1177. INDEX:        $(SOURCES) $(BUILTIN_C_CODE) $(LIBRARY_SOURCE)
  1178.         ctags -x $(SOURCES) $(BUILTIN_C_CODE) $(LIBRARY_SOURCE) > $@
  1179.  
  1180. clean:
  1181.         $(RM) $(OBJECTS) $(PROGRAM) aix-Makefile *.aux
  1182.         $(RM) .build .made version.h
  1183.         $(RM) $(CREATED_SUPPORT) bash-Makefile
  1184.         (cd $(DOCDIR); $(MAKE) $(MFLAGS) clean)
  1185.         (cd builtins; $(MAKE) $(MFLAGS) clean)
  1186.         (cd $(RLIBSRC); $(MAKE) $(MFLAGS) clean) ;: ;(cd $(GLIBSRC); $(MAKE) $(MFLAGS) clean) 
  1187.  
  1188.  # Here is a convenient rule when you arrive at a new site and wish to
  1189.  # install bash on several different architectures.  It creates a new
  1190.  # directory to hold the results of compilatation.  The directory is
  1191.  # named MACHINE-OS.
  1192. architecture: $(MACHINE)-$(OS)/$(PROGRAM)
  1193.  
  1194. $(MACHINE)-$(OS):
  1195.     -mkdir $(MACHINE)-$(OS)
  1196.  
  1197. $(MACHINE)-$(OS)/$(PROGRAM): $(MACHINE)-$(OS) $(PROGRAM)
  1198.     mv $(PROGRAM) $(MACHINE)-$(OS)
  1199.     mv sysdefs.h $(MACHINE)-$(OS)
  1200.     mv $(SDIR)getcppsyms $(MACHINE)-$(OS)
  1201.     $(MAKE) $(MFLAGS) clean
  1202.