nsperl.mk 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. #
  2. # BEGIN COPYRIGHT BLOCK
  3. # This Program is free software; you can redistribute it and/or modify it under
  4. # the terms of the GNU General Public License as published by the Free Software
  5. # Foundation; version 2 of the License.
  6. #
  7. # This Program is distributed in the hope that it will be useful, but WITHOUT
  8. # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  9. # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  10. #
  11. # You should have received a copy of the GNU General Public License along with
  12. # this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
  13. # Place, Suite 330, Boston, MA 02111-1307 USA.
  14. #
  15. # In addition, as a special exception, Red Hat, Inc. gives You the additional
  16. # right to link the code of this Program with code not covered under the GNU
  17. # General Public License ("Non-GPL Code") and to distribute linked combinations
  18. # including the two, subject to the limitations in this paragraph. Non-GPL Code
  19. # permitted under this exception must only link to the code of this Program
  20. # through those well defined interfaces identified in the file named EXCEPTION
  21. # found in the source code files (the "Approved Interfaces"). The files of
  22. # Non-GPL Code may instantiate templates or use macros or inline functions from
  23. # the Approved Interfaces without causing the resulting work to be covered by
  24. # the GNU General Public License. Only Red Hat, Inc. may make changes or
  25. # additions to the list of Approved Interfaces. You must obey the GNU General
  26. # Public License in all respects for all of the Program code and other code used
  27. # in conjunction with the Program except the Non-GPL Code covered by this
  28. # exception. If you modify this file, you may extend this exception to your
  29. # version of the file, but you are not obligated to do so. If you do not wish to
  30. # provide this exception without modification, you must delete this exception
  31. # statement from your version and license this file solely under the GPL without
  32. # exception.
  33. #
  34. #
  35. # Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
  36. # Copyright (C) 2005 Red Hat, Inc.
  37. # All rights reserved.
  38. # END COPYRIGHT BLOCK
  39. #
  40. NSPERL_RELDATE := 20020626
  41. NSPERL_VERSION := nsPerl5.6.1
  42. NSPERL_COMPONENT_DIR = $(COMPONENTS_DIR)/nsPerl/$(NSPERL_RELDATE)/$(NSOBJDIR_NAME_32)
  43. # default; will be redefined below for specific platform
  44. #PERL=$(NSPERL_COMPONENT_DIR)/lib/$(NSPERL_VERSION)/nsperl
  45. PERL=/share/builds/sbstools/nsPerl/$(NSPERL_RELDATE)/$(NSOBJDIR_NAME_32)/nsperl
  46. ifeq ($(BUILD_ARCH), WINNT)
  47. PERL=nsperl
  48. endif
  49. ifdef USE_OLD_NTPERL
  50. PERL=perl
  51. endif
  52. ifdef USE_PERL_FROM_PATH
  53. PERL = $(shell perl -e 'print "$$\n"')
  54. endif
  55. NSPERL_ZIP_FILE = nsperl561.zip
  56. # This makefile sets up the environment so that we can build and link
  57. # perl xsubs. It assumes that you have a perl base directory that has
  58. # a bin and lib subdir and that which perl yields base dir/bin/perl[.exe]
  59. # also, this is only really necessary for NT, since this usually just
  60. # works in the NFS world of unix
  61. # for unix, we derive the paths from the Config information
  62. ifdef USE_OLD_NTPERL
  63. PERL_EXE = $(shell $(PERL) -e '($$foo = $$) =~ s@\\@/@g ; print "$$foo\n"')
  64. PERL_EXENT = $(subst \,/,$(PERL_EXE))
  65. PERL_BASEDIR = $(dir $(PERL_EXENT))
  66. PERL_ROOT = $(subst /bin/,,$(PERL_BASEDIR))
  67. IS_ACTIVESTATE = $(shell $(PERL) -v | grep -i activestate)
  68. else
  69. PERL_CONFIG = $(shell $(PERL) -e 'use Config; foreach $$item (qw(installprivlib installarchlib installsitelib installsitearch prefixexp)) { ($$foo = $$Config{$$item}) =~ s@\\@/@g ; print "$$foo "; } print "\\\n"')
  70. PERL_LIB = $(word 1, $(PERL_CONFIG))
  71. PERL_ARCHLIB = $(word 2, $(PERL_CONFIG))
  72. SITELIB = $(word 3, $(PERL_CONFIG))
  73. SITEARCH = $(word 4, $(PERL_CONFIG))
  74. PERL_ROOT = $(word 5, $(PERL_CONFIG))
  75. endif
  76. ifdef USE_OLD_NTPERL
  77. PERL_LIB = $(PERL_ROOT)/lib
  78. PERL_ARCHLIB = $(PERL_LIB)
  79. PERL_SITE = site
  80. SITELIB = $(PERL_ROOT)/$(PERL_SITE)/lib
  81. SITEARCH = $(SITELIB)
  82. endif
  83. INSTALLSITEARCH = $(SITEARCH)
  84. INSTALLSITELIB = $(SITELIB)
  85. SITEARCHEXP = $(SITEARCH)
  86. SITELIBEXP = $(SITELIB)
  87. XSUBPPDIR = $(PERL_LIB)/ExtUtils
  88. XSUBPP = $(XSUBPPDIR)/xsubpp
  89. XSPROTOARG =
  90. XSUBPPDEPS = $(XSUBPPDIR)/typemap
  91. XSUBPPARGS = -typemap $(XSUBPPDIR)/typemap
  92. PERL_INC = -I$(PERL_ARCHLIB)/CORE
  93. SITEHACK = $(subst $(PERL_ROOT)/,,$(SITELIB))
  94. ARCHHACK = $(subst $(PERL_ROOT)/,,$(PERL_ARCHLIB))
  95. ifeq ($(ARCH), WINNT)
  96. ifdef IS_ACTIVESTATE
  97. # C compilation/linking does not work for activestate; force C++
  98. PERL_CFLAGS = -TP -D_CONSOLE -DNO_STRICT -DPERL_OBJECT
  99. ifeq ($(DEBUG), full)
  100. PERL_CFLAGS += -DNDEBUG
  101. endif
  102. LIBPERL_A = /LIBPATH:$(PERL_ARCHLIB)/CORE perlCAPI.lib perlcore.lib PerlCRT.lib
  103. else
  104. LIBPERL_A = /LIBPATH:$(PERL_ARCHLIB)/CORE perl56.lib
  105. endif
  106. else
  107. ifeq ($(DEBUG), full)
  108. PERL_CFLAGS = -UDEBUG
  109. endif
  110. LIBPERL_A = -L$(PERL_ARCHLIB)/CORE -lperl
  111. endif