home *** CD-ROM | disk | FTP | other *** search
/ linuxmafia.com 2016 / linuxmafia.com.tar / linuxmafia.com / pub / palmos / pippy-0.6beta-src.tar.gz / pippy-0.6beta-src.tar / pippy-0.6beta-src / src / Palm / Makefile.python < prev   
Makefile  |  2000-12-27  |  15KB  |  500 lines

  1. # Generated automatically from Makefile.in by configure.
  2. ########################################################################
  3. # Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
  4. # The Netherlands.
  5. #
  6. #                         All Rights Reserved
  7. #
  8. # Permission to use, copy, modify, and distribute this software and its
  9. # documentation for any purpose and without fee is hereby granted,
  10. # provided that the above copyright notice appear in all copies and that
  11. # both that copyright notice and this permission notice appear in
  12. # supporting documentation, and that the names of Stichting Mathematisch
  13. # Centrum or CWI or Corporation for National Research Initiatives or
  14. # CNRI not be used in advertising or publicity pertaining to
  15. # distribution of the software without specific, written prior
  16. # permission.
  17. # While CWI is the initial source for this software, a modified version
  18. # is made available by the Corporation for National Research Initiatives
  19. # (CNRI) at the Internet address ftp://ftp.python.org.
  20. # STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH
  21. # REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
  22. # MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH
  23. # CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
  24. # DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  25. # PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  26. # TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  27. # PERFORMANCE OF THIS SOFTWARE.
  28. ########################################################################
  29.  
  30. # Substitutions by configure
  31. VERSION=    1.5
  32. srcdir=        ..
  33. VPATH=        ..
  34. CC=        m68k-palmos-coff-gcc
  35. AR=        m68k-palmos-coff-ar
  36. RANLIB=        m68k-palmos-coff-ranlib
  37. DEFS=        -DHAVE_CONFIG_H
  38.  
  39. # Machine-dependent subdirectories
  40. MACHDEP=    m68k-palmos-coff
  41.  
  42. # Install prefix for architecture-independent files
  43. prefix=        ../pypalm
  44.  
  45. # Install prefix for architecture-dependent files
  46. exec_prefix=    ${prefix}
  47.  
  48. # Expanded directories
  49. BINDIR=        $(exec_prefix)/bin
  50. LIBDIR=        $(exec_prefix)/lib
  51. MANDIR=        $(prefix)/man
  52. INCLUDEDIR=    $(prefix)/include
  53. CONFINCLUDEDIR=    $(exec_prefix)/include
  54. SCRIPTDIR=    $(prefix)/lib
  55.  
  56. # Detailed destination directories
  57. BINLIBDEST=    $(LIBDIR)/python$(VERSION)
  58. LIBDEST=    $(SCRIPTDIR)/python$(VERSION)
  59. INCLUDEPY=    $(INCLUDEDIR)/python$(VERSION)
  60. CONFINCLUDEPY=    $(CONFINCLUDEDIR)/python$(VERSION)
  61. LIBP=        $(LIBDIR)/python$(VERSION)
  62.  
  63. # Symbols used for using shared libraries
  64. SO=        .so
  65. LDSHARED=    ld
  66. CCSHARED=    
  67. LINKFORSHARED=    
  68. DESTSHARED=    $(BINLIBDEST)/lib-dynload
  69.  
  70. # Shell used by make (some versions default to the login shell, which is bad)
  71. SHELL=        /bin/sh
  72.  
  73. # Use ``EXE=.exe'' for Unix emulations on DOS/Windows (e.g. GNUWIN32)
  74. EXE=
  75.  
  76. # Modes for directories, executables and data files created by the
  77. # install process.  Default to group-writable directories but
  78. # user-only-writable for executables and data files.
  79. DIRMODE=    775
  80. EXEMODE=    755
  81. FILEMODE=    644
  82.  
  83. # Portable install script (configure doesn't always guess right)
  84. INSTALL=    ../install-sh -c
  85. INSTALL_PROGRAM=${INSTALL} -m $(EXEMODE)
  86. INSTALL_DATA=    ${INSTALL} -m $(FILEMODE)
  87.  
  88. # Use this to make a link between python$(VERSION) and python in $(BINDIR)
  89. LN=@LN@
  90.  
  91. # --with-PACKAGE options for configure script
  92. # e.g. --with-readline --with-svr5 --with-solaris --with-thread
  93. # (see README for an explanation)
  94. WITH=        
  95.  
  96. # Compiler options passed to subordinate makes
  97. OPT=        -g -O2
  98.  
  99. # Subdirectories where to run make recursively
  100. SUBDIRS_SRC=    ../Parser ../Objects ../Python ../Modules
  101. SUBDIRS=    Parser Objects Python Modules
  102.  
  103. # Other subdirectories
  104. SUBDIRSTOO=    Include Lib Misc Demo Grammar
  105.  
  106. # Files and directories to be distributed
  107. DISTFILES=    README ChangeLog
  108. DISTDIRS=    $(SUBDIRS) $(SUBDIRSTOO) Ext-dummy
  109. DIST=        $(DISTFILES) $(DISTDIRS)
  110.  
  111. # Compilation flags for getbuildinfo.c only
  112. CFLAGS=        $(OPT) -I. $(DEFS)
  113.  
  114. LIBRARY=    libpython$(VERSION).a
  115. LDLIBRARY=      libpython$(VERSION).a
  116.  
  117. # Default target
  118. all:        $(LIBRARY) python$(EXE)
  119.  
  120. # Build the interpreter
  121. python$(EXE):    $(LIBRARY) buildno Modules/python.o
  122.         expr `cat buildno` + 1 >buildno1
  123.         mv -f buildno1 buildno
  124.         $(CC) -c $(CFLAGS) -DBUILD=`cat buildno` \
  125.               $(srcdir)/Modules/getbuildinfo.c
  126.         $(AR) cr $(LIBRARY) getbuildinfo.o
  127.         $(RANLIB) $(LIBRARY)
  128.         touch python$(EXE)
  129.         true
  130. #        cd Modules;  $(MAKE) OPT="$(OPT)" VERSION="$(VERSION)" \
  131. #            prefix="$(prefix)" exec_prefix="$(exec_prefix)" \
  132. #            LIBRARY=../$(LDLIBRARY) link
  133.  
  134. Modules/python.o: $(srcdir)/Modules/python.c
  135.         cd Modules; $(MAKE) OPT="$(OPT)" python.o
  136.  
  137. buildno:
  138.         echo 0 >buildno
  139.  
  140. # Build the library
  141. $(LIBRARY):    $(SUBDIRS) $(SUBDIRS_SRC)
  142.         if test ! -f $(LIBRARY); \
  143.         then for i in $(SUBDIRS); do rm -f $$i/add2lib; done; true; \
  144.         else true; fi
  145.         for i in $(SUBDIRS); do \
  146.             (cd $$i; $(MAKE) VERSION="$(VERSION)" add2lib); done
  147.  
  148. # This rule is only here for DG/UX!!!
  149. libpython$(VERSION).so:    $(LIBRARY)
  150.         case `uname -s | tr -d '/ ' | tr '[A-Z]' '[a-z]'` in \
  151.         *dgux*) \
  152.             test -d dgux || mkdir dgux; \
  153.             (cd dgux;ar x ../$^;ld -G -o ../$@ * ); \
  154.             /bin/rm -rf ./dgux \
  155.             ;; \
  156.         esac
  157.  
  158. # This rule is here for OPENSTEP/Rhapsody/MacOSX
  159. libpython$(VERSION).dylib: $(LIBRARY)
  160.         libtool -o $(LDLIBRARY) -dynamic $(OTHER_LIBTOOL_OPT) $(LIBRARY) -framework System @LIBTOOL_CRUFT@ 
  161.  
  162. ModulesMakefile: Modules/Makefile.pre
  163.     (cd Modules; $(MAKE) -f Makefile.pre Makefile)
  164.  
  165. Parser:
  166.         cd Parser ; $(MAKE) OPT="$(OPT)" VERSION="$(VERSION)" \
  167.             prefix="$(prefix)" exec_prefix="$(exec_prefix)" all
  168.  
  169. Python:
  170.         cd Python ; $(MAKE) OPT="$(OPT)" VERSION="$(VERSION)" \
  171.             prefix="$(prefix)" exec_prefix="$(exec_prefix)" all
  172.  
  173. Objects:
  174.         cd Objects ; $(MAKE) OPT="$(OPT)" VERSION="$(VERSION)" \
  175.             prefix="$(prefix)" exec_prefix="$(exec_prefix)" all
  176.  
  177. Modules:    ModulesMakefile Parser Python Objects
  178.         cd Modules ; $(MAKE) OPT="$(OPT)" VERSION="$(VERSION)" \
  179.             prefix="$(prefix)" exec_prefix="$(exec_prefix)" all
  180.  
  181.  
  182. # Test the interpreter (twice, once without .pyc files, once with)
  183. TESTOPTS=    
  184. TESTPROG=    $(srcdir)/Lib/test/regrtest.py
  185. TESTPYTHON=    ./python$(EXE) -tt
  186. test:        all
  187.         -rm -f $(srcdir)/Lib/test/*.py[co]
  188.         -PYTHONPATH= $(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
  189.         PYTHONPATH= $(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
  190.  
  191. # Install everything
  192. ##install:    altinstall bininstall maninstall
  193.  
  194. # Install almost everything without disturbing previous versions
  195. altinstall:    altbininstall libinstall inclinstall libainstall sharedinstall
  196.  
  197. # Install the interpreter (by creating a hard link to python$(VERSION))
  198. bininstall:    altbininstall
  199.         -if test -f $(BINDIR)/python$(EXE); \
  200.         then rm -f $(BINDIR)/python$(EXE); \
  201.         else true; \
  202.         fi
  203.         (cd $(BINDIR); $(LN) python$(VERSION)$(EXE) python$(EXE))
  204.  
  205. # Install the interpreter with $(VERSION) affixed
  206. # This goes into $(exec_prefix)
  207. altbininstall:    python$(EXE)
  208.         @for i in $(BINDIR); \
  209.         do \
  210.             if test ! -d $$i; then \
  211.                 echo "Creating directory $$i"; \
  212.                 mkdir $$i; \
  213.                 chmod $(DIRMODE) $$i; \
  214.             else    true; \
  215.             fi; \
  216.         done
  217.         $(INSTALL_PROGRAM) python$(EXE) $(BINDIR)/python$(VERSION)$(EXE)
  218.         if test -f libpython$(VERSION).so; then \
  219.             $(INSTALL_DATA) libpython$(VERSION).so $(LIBDIR); \
  220.         else    true; \
  221.         fi
  222.  
  223. # Install the manual page
  224. maninstall:
  225.         @for i in $(MANDIR) $(MANDIR)/man1; \
  226.         do \
  227.             if test ! -d $$i; then \
  228.                 echo "Creating directory $$i"; \
  229.                 mkdir $$i; \
  230.                 chmod $(DIRMODE) $$i; \
  231.             else    true; \
  232.             fi; \
  233.         done
  234.         $(INSTALL_DATA) $(srcdir)/Misc/python.man \
  235.             $(MANDIR)/man1/python.1
  236.  
  237. # Install the library
  238. PLATDIR=    plat-$(MACHDEP)
  239. MACHDEPS=    $(PLATDIR)
  240. LIBSUBDIRS=    lib-old lib-tk test test/output $(MACHDEPS)
  241. libinstall:    python $(srcdir)/Lib/$(PLATDIR)
  242.         @for i in $(SCRIPTDIR) $(LIBDEST); \
  243.         do \
  244.             if test ! -d $$i; then \
  245.                 echo "Creating directory $$i"; \
  246.                 mkdir $$i; \
  247.                 chmod $(DIRMODE) $$i; \
  248.             else    true; \
  249.             fi; \
  250.         done
  251.         @for d in $(LIBSUBDIRS); \
  252.         do \
  253.             a=$(srcdir)/Lib/$$d; \
  254.             if test ! -d $$a; then continue; else true; fi; \
  255.             b=$(LIBDEST)/$$d; \
  256.             if test ! -d $$b; then \
  257.                 echo "Creating directory $$b"; \
  258.                 mkdir $$b; \
  259.                 chmod $(DIRMODE) $$b; \
  260.             else    true; \
  261.             fi; \
  262.         done
  263.         @for i in $(srcdir)/Lib/*.py $(srcdir)/Lib/*.doc; \
  264.         do \
  265.             if test -x $$i; then \
  266.                 $(INSTALL_PROGRAM) $$i $(LIBDEST); \
  267.                 echo $(INSTALL_PROGRAM) $$i $(LIBDEST); \
  268.             else \
  269.                 $(INSTALL_DATA) $$i $(LIBDEST); \
  270.                 echo $(INSTALL_DATA) $$i $(LIBDEST); \
  271.             fi; \
  272.         done
  273.         @for d in $(LIBSUBDIRS); \
  274.         do \
  275.             a=$(srcdir)/Lib/$$d; \
  276.             if test ! -d $$a; then continue; else true; fi; \
  277.             b=$(LIBDEST)/$$d; \
  278.             for i in $$a/*; \
  279.             do \
  280.                 case $$i in \
  281.                 *CVS) ;; \
  282.                 *.py[co]) ;; \
  283.                 *~) ;; \
  284.                 *) \
  285.                     if test -d $$i; then continue; fi; \
  286.                     if test -x $$i; then \
  287.                         echo $(INSTALL_PROGRAM) $$i $$b; \
  288.                         $(INSTALL_PROGRAM) $$i $$b; \
  289.                     else \
  290.                         echo $(INSTALL_DATA) $$i $$b; \
  291.                         $(INSTALL_DATA) $$i $$b; \
  292.                     fi;; \
  293.                 esac; \
  294.             done; \
  295.         done
  296.         PYTHONPATH=$(LIBDEST) \
  297.             ./python$(EXE) -t $(LIBDEST)/compileall.py $(LIBDEST)
  298.         PYTHONPATH=$(LIBDEST) \
  299.             ./python$(EXE) -O $(LIBDEST)/compileall.py $(LIBDEST)
  300.  
  301. # Create the PLATDIR source directory, if one wasn't distributed..
  302. $(srcdir)/Lib/$(PLATDIR):
  303.         mkdir $(srcdir)/Lib/$(PLATDIR)
  304.         cp $(srcdir)/Lib/plat-generic/regen $(srcdir)/Lib/$(PLATDIR)/regen
  305.         export PATH; PATH="`pwd`:$$PATH"; \
  306.         export PYTHONPATH; PYTHONPATH="`pwd`/Lib"; \
  307.         cd $(srcdir)/Lib/$(PLATDIR); ./regen
  308.  
  309. # Install the include files
  310. INCLDIRSTOMAKE=$(INCLUDEDIR) $(CONFINCLUDEDIR) $(INCLUDEPY) $(CONFINCLUDEPY)
  311. inclinstall:
  312.         @for i in $(INCLDIRSTOMAKE); \
  313.         do \
  314.             if test ! -d $$i; then \
  315.                 echo "Creating directory $$i"; \
  316.                 mkdir $$i; \
  317.                 chmod $(DIRMODE) $$i; \
  318.             else    true; \
  319.             fi; \
  320.         done
  321.         @for i in $(srcdir)/Include/*.h; \
  322.         do \
  323.             echo $(INSTALL_DATA) $$i $(INCLUDEPY); \
  324.             $(INSTALL_DATA) $$i $(INCLUDEPY); \
  325.         done
  326.         $(INSTALL_DATA) config.h $(CONFINCLUDEPY)/config.h
  327.  
  328. # Install the library and miscellaneous stuff needed for extending/embedding
  329. # This goes into $(exec_prefix)
  330. LIBPL=        $(LIBP)/config
  331. libainstall:    all
  332.         @for i in $(LIBDIR) $(LIBP) $(LIBPL); \
  333.         do \
  334.             if test ! -d $$i; then \
  335.                 echo "Creating directory $$i"; \
  336.                 mkdir $$i; \
  337.                 chmod $(DIRMODE) $$i; \
  338.             else    true; \
  339.             fi; \
  340.         done
  341.         @if [ "$(MACHDEP)" != "beos" ] ; then \
  342.             $(INSTALL_DATA) $(LIBRARY) $(LIBPL)/$(LIBRARY) ; \
  343.             $(RANLIB) $(LIBPL)/$(LIBRARY) ; \
  344.         fi
  345.         $(INSTALL_DATA) Modules/config.c $(LIBPL)/config.c
  346.         $(INSTALL_DATA) Modules/python.o $(LIBPL)/python.o
  347.         $(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(LIBPL)/config.c.in
  348.         $(INSTALL_DATA) Modules/Makefile $(LIBPL)/Makefile
  349.         $(INSTALL_DATA) Modules/Setup $(LIBPL)/Setup
  350.         $(INSTALL_DATA) Modules/Setup.local $(LIBPL)/Setup.local
  351.         $(INSTALL_DATA) Modules/Setup.thread $(LIBPL)/Setup.thread
  352.         $(INSTALL_PROGRAM) $(srcdir)/Modules/makesetup $(LIBPL)/makesetup
  353.         $(INSTALL_PROGRAM) $(srcdir)/install-sh $(LIBPL)/install-sh
  354.         $(INSTALL_DATA) $(srcdir)/Misc/Makefile.pre.in $(LIBPL)/Makefile.pre.in
  355.         @if [ -s Modules/python.exp -a \
  356.             "`echo $(MACHDEP) | sed 's/^\(...\).*/\1/'`" = "aix" ]; then \
  357.             echo; echo "Installing support files for building shared extension modules on AIX:"; \
  358.             $(INSTALL_DATA) Modules/python.exp        \
  359.                     $(LIBPL)/python.exp;        \
  360.             echo; echo "$(LIBPL)/python.exp";        \
  361.             $(INSTALL_PROGRAM) $(srcdir)/Modules/makexp_aix    \
  362.                     $(LIBPL)/makexp_aix;        \
  363.             echo "$(LIBPL)/makexp_aix";            \
  364.             $(INSTALL_PROGRAM) $(srcdir)/Modules/ld_so_aix    \
  365.                     $(LIBPL)/ld_so_aix;        \
  366.             echo "$(LIBPL)/ld_so_aix";            \
  367.             echo; echo "See Misc/AIX-NOTES for details.";    \
  368.         else true; \
  369.         fi
  370.  
  371. # Install the dynamically loadable modules
  372. # This goes into $(exec_prefix)
  373. sharedinstall:
  374.         cd Modules; $(MAKE) \
  375.             OPT="$(OPT)" \
  376.             VERSION="$(VERSION)" \
  377.             SO="$(SO)" \
  378.             LDSHARED="$(LDSHARED)" \
  379.             CCSHARED="$(CCSHARED)" \
  380.             LINKFORSHARED="$(LINKFORSHARED)" \
  381.             DESTSHARED="$(DESTSHARED)" \
  382.             prefix="$(prefix)" \
  383.             exec_prefix="$(exec_prefix)" \
  384.             sharedinstall
  385.  
  386. .PRECIOUS:    python$(EXE)
  387.  
  388. # Rerun configure with the same options as it was run last time,
  389. # provided the config.status script exists
  390. recheck:
  391.         $(SHELL) config.status --recheck
  392.         $(SHELL) config.status
  393.  
  394. # Create a tags file for vi
  395. tags::
  396.         ctags -w -t Include/*.h
  397.         for i in $(SUBDIRS); do ctags -w -t -a $$i/*.[ch]; done
  398.         sort tags -o tags
  399.  
  400. # Create a tags file for GNU Emacs
  401. TAGS::
  402.         etags ../Include/*.h ../Include/other/*.h
  403.         for i in $(SUBDIRS_SRC); do etags -a $$i/*.[ch]; done
  404.  
  405. # Add dependencies to sub-Makefiles
  406. depend:
  407.         @for i in $(SUBDIRS); do \
  408.             (echo making depend in subdirectory $$i; cd $$i; \
  409.              $(MAKE) depend); \
  410.         done
  411.  
  412. # Sanitation targets -- clean leaves libraries, executables and tags
  413. # files, which clobber removes those as well
  414.  
  415. localclean:
  416.         -rm -f core *~ [@,#]* *.old *.orig *.rej
  417.  
  418. clean:        localclean
  419.         -for i in $(SUBDIRS); do \
  420.             if test -d $$i; then \
  421.             (echo making clean in subdirectory $$i; cd $$i; \
  422.              if test -f Makefile; \
  423.              then $(MAKE) clean; \
  424.              else $(MAKE) -f Makefile.*in clean; \
  425.              fi); \
  426.             else true; fi; \
  427.         done
  428.  
  429. localclobber:    localclean
  430.         -rm -f tags TAGS python$(EXE) $(LIBRARY) $(LDLIBRARY) *.o
  431.         -rm -f config.log config.cache config.h
  432.  
  433. clobber:    localclobber
  434.         -for i in $(SUBDIRS); do \
  435.             if test -d $$i; then \
  436.             (echo clobbering subdirectory $$i; cd $$i; \
  437.              if test -f Makefile; \
  438.              then $(MAKE) clobber; \
  439.              else $(MAKE) -f $(srcdir)/Makefile*.in clobber; \
  440.              fi); \
  441.             else true; fi; \
  442.         done
  443.  
  444. # Make things extra clean, before making a distribution:
  445. # remove all generated files, even Makefile[.pre]
  446. distclean:    clobber
  447.         -$(MAKE) -f $(srcdir)/Makefile.in \
  448.             SUBDIRS="$(SUBDIRSTOO)" clobber
  449.         -rm -f config.status config.log config.cache config.h Makefile
  450.         -rm -f buildno
  451.         -rm -f Modules/Makefile
  452.         -for i in $(SUBDIRS) $(SUBDIRSTOO); do \
  453.              for f in $$i/*.in; do \
  454.                 f=`basename "$$f" .in`; \
  455.                  if test "$$f" != "*"; then \
  456.                     echo rm -f "$$i/$$f"; \
  457.                      rm -f "$$i/$$f"; \
  458.                 fi; \
  459.              done; \
  460.         done
  461.  
  462. # Check for smelly exported symbols (not starting with Py/_Py)
  463. smelly: all
  464.     for i in $(SUBDIRS); do \
  465.         echo --- $$i ---; \
  466.         nm -p $$i/lib$$i.a | \
  467.         sed -n "/ [TDB] /s/.* //p" | grep -v "^_*Py" | sort -u; \
  468.     done
  469.  
  470. # Find files with funny names
  471. funny:
  472.         find $(DISTDIRS) -type d \
  473.             -o -name '*.[chs]' \
  474.             -o -name '*.py' \
  475.             -o -name '*.doc' \
  476.             -o -name '*.sty' \
  477.             -o -name '*.bib' \
  478.             -o -name '*.dat' \
  479.             -o -name '*.el' \
  480.             -o -name '*.fd' \
  481.             -o -name '*.in' \
  482.             -o -name '*.tex' \
  483.             -o -name '*,[vpt]' \
  484.             -o -name 'Setup' \
  485.             -o -name 'Setup.*' \
  486.             -o -name README \
  487.             -o -name Makefile \
  488.             -o -name ChangeLog \
  489.             -o -name Repository \
  490.             -o -name Root \
  491.             -o -name Entries \
  492.             -o -name Tag \
  493.             -o -name tags \
  494.             -o -name TAGS \
  495.             -o -name .cvsignore \
  496.             -o -name MANIFEST \
  497.             -o -print
  498.