Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: aldot at uclibc.org <aldot@uclibc.org>
To: buildroot@busybox.net
Subject: [Buildroot] svn commit: trunk/buildroot/package/microperl
Date: Fri, 15 Dec 2006 05:34:30 -0800 (PST)	[thread overview]
Message-ID: <20061215133430.5710E48570@busybox.net> (raw)

Author: aldot
Date: 2006-12-15 05:34:29 -0800 (Fri, 15 Dec 2006)
New Revision: 16939

Log:
- add config option to specify modules to be copied to the target.


Modified:
   trunk/buildroot/package/microperl/Config.in
   trunk/buildroot/package/microperl/microperl.mk


Changeset:
Modified: trunk/buildroot/package/microperl/Config.in
===================================================================
--- trunk/buildroot/package/microperl/Config.in	2006-12-15 02:02:23 UTC (rev 16938)
+++ trunk/buildroot/package/microperl/Config.in	2006-12-15 13:34:29 UTC (rev 16939)
@@ -3,3 +3,13 @@
 	default n
 	help
 	  Perl without operating-specific functions such as readdir.
+
+config BR2_PACKAGE_MICROPERL_MODULES
+	string "perl modules"
+	default ""
+	depends on BR2_PACKAGE_MICROPERL
+	help
+	  List of microperl modules to copy to the rootfs.
+	  E.g.
+	  warnings.pm warnings/register.pm strict.pm constant.pm vars.pm 
+	  Exporter.pm Exporter/Heavy.pm Carp.pm Getopt/Long.pm

Modified: trunk/buildroot/package/microperl/microperl.mk
===================================================================
--- trunk/buildroot/package/microperl/microperl.mk	2006-12-15 02:02:23 UTC (rev 16938)
+++ trunk/buildroot/package/microperl/microperl.mk	2006-12-15 13:34:29 UTC (rev 16939)
@@ -10,6 +10,10 @@
 MICROPERL_SITE=ftp://ftp.cpan.org/pub/CPAN/src/5.0
 MICROPERL_DIR=$(BUILD_DIR)/perl-$(MICROPERL_VER)
 
+MICROPERL_MODS_DIR=/usr/lib/perl$(MICROPERL_MAJ)/$(MICROPERL_VER)
+MICROPERL_MODS=$(subst ",,$(BR2_PACKAGE_MICROPERL_MODULES))
+# ")
+
 $(DL_DIR)/$(MICROPERL_SOURCE):
 	$(WGET) -P $(DL_DIR) $(MICROPERL_SITE)/$(MICROPERL_SOURCE)
 
@@ -20,11 +24,10 @@
 $(MICROPERL_DIR)/.configured: $(MICROPERL_DIR)/.source
 	(cd $(MICROPERL_DIR) ; chmod u+w uconfig.h ; . ./uconfig.sh ; \
 	 make -f Makefile.micro regen_uconfig ; \
-	 $(SED) \
-	 's,PRIVLIB ".*,PRIVLIB "/usr/lib/perl$(MICROPERL_MAJ)/$(MICROPERL_VER)",' \
-	 -e 's,PRIVLIB_EXP ".*,PRIVLIB_EXP "/usr/lib/perl$(MICROPERL_MAJ)/$(MICROPERL_VER)",' \
-	 -e 's,BIN ".*,BIN "/usr/bin",' \
-	 ./uconfig.h ; \
+	 $(SED) 's,PRIVLIB ".*,PRIVLIB "/$(MICROPERL_MODS_DIR)",' \
+		 -e 's,PRIVLIB_EXP ".*,PRIVLIB_EXP "$(MICROPERL_MODS_DIR)",' \
+		 -e 's,BIN ".*,BIN "/usr/bin",' \
+		 ./uconfig.h ; \
 	)
 	touch $@
 
@@ -32,7 +35,18 @@
 	$(MAKE) -f Makefile.micro CC=$(TARGET_CC) \
 		OPTIMIZE="$(TARGET_CFLAGS)" -C $(MICROPERL_DIR)
 
+__perl_tgt_dir=$(TARGET_DIR)/$(MICROPERL_MODS_DIR)/$(dir $$i)
 $(TARGET_DIR)/usr/bin/microperl: $(MICROPERL_DIR)/microperl
+ifneq ($(MICROPERL_MODS),)
+	(cd $(MICROPERL_DIR) ; \
+	 for i in $(patsubst %,$(TARGET_DIR)/$(MICROPERL_MODS_DIR)/%,$(dir $(MICROPERL_MODS))) ; do \
+		[ -d $$i ] || mkdir -p $$i ; \
+	 done ; \
+	 for i in $(MICROPERL_MODS) ; do \
+	 cp -dpf lib/$$i $(TARGET_DIR)/$(MICROPERL_MODS_DIR)/$$i ; \
+	 done; \
+	)
+endif
 	cp -dpf $(MICROPERL_DIR)/microperl $(TARGET_DIR)/usr/bin/microperl
 
 microperl: uclibc $(TARGET_DIR)/usr/bin/microperl
@@ -40,8 +54,9 @@
 microperl-source: $(DL_DIR)/$(MICROPERL_SOURCE)
 
 microperl-clean:
-	rm -f $(TARGET_DIR)/usr/bin/microperl
-	-$(MAKE) -C $(MICROPERL_DIR) clean
+	rm -rf $(TARGET_DIR)/usr/bin/microperl $(TARGET_DIR)/$(MICROPERL_MODS_DIR)
+	-rmdir $(TARGET_DIR)/usr/lib/perl$(MICROPERL_MAJ)
+	-$(MAKE) -C $(MICROPERL_DIR) -f Makefile.micro clean
 
 microperl-dirclean:
 	rm -rf $(MICROPERL_DIR)

             reply	other threads:[~2006-12-15 13:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-15 13:34 aldot at uclibc.org [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-02-04 23:51 [Buildroot] svn commit: trunk/buildroot/package/microperl jacmet at uclibc.org
2009-01-25 23:44 ulf at uclibc.org
2009-01-25  8:14 ulf at uclibc.org
2009-01-25 14:21 ` Peter Korsgaard
2007-02-04 19:20 aldot at uclibc.org
2007-01-29 20:15 aldot at uclibc.org
2006-12-15 13:36 aldot at uclibc.org
2006-11-24  9:49 aldot at uclibc.org
2006-11-22 15:22 aldot at uclibc.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061215133430.5710E48570@busybox.net \
    --to=aldot@uclibc.org \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox