Browse code

make: workaround for backwards compat. with make 3.80

- workaround for export not supported in gnu make 3.80 target
specific variables: use $(mk_params) for each $(MAKE) invocation

Andrei Pelinescu-Onciul authored on 02/04/2009 18:42:58
Showing 2 changed files
... ...
@@ -53,7 +53,7 @@ Requirements:
53 53
 - bison or yacc (Berkley yacc)
54 54
 - flex
55 55
 - GNU make (on Linux this is the standard "make", on *BSD and Solaris is
56
- called "gmake") version >= 3.79.
56
+ called "gmake") version >= 3.80.
57 57
 - sed and tr (used in the makefiles)
58 58
 - GNU tar ("gtar" on Solaris) and gzip if you want "make tar" to work
59 59
 - GNU install, BSD install or Solaris install if you want "make
... ...
@@ -56,6 +56,9 @@
56 56
 #              added cfg-defs, new target that only rebuilds config.mak
57 57
 #  2009-03-10  replaced DEFS with C_DEFS (DEFS are now used only for
58 58
 #              "temporary" defines inside modules or libs) (andrei)
59
+#  2009-04-02  workaround for export not supported in gnu make 3.80
60
+#               target specific variables: use mk_params for each
61
+#               $(MAKE) invocation (andrei)
59 62
 #
60 63
 
61 64
 auto_gen=lex.yy.c cfg.tab.c #lexx, yacc etc
... ...
@@ -381,7 +384,8 @@ modules: modules.lst
381 384
 		if [ -n "$$r" -a -r "$$r/Makefile" ]; then \
382 385
 			echo  "" ; \
383 386
 			echo  "" ; \
384
-			if  $(MAKE) -C $$r || [ ${err_fail} != 1 ] ; then \
387
+			if  $(MAKE) -C $$r $(mk_params) || [ ${err_fail} != 1 ] ; \
388
+			then\
385 389
 				:; \
386 390
 			else \
387 391
 				exit 1; \
... ...
@@ -395,7 +399,7 @@ $(extra_objs):
395 399
 		if [ -n "$$r" -a -r "$$r/Makefile"  ]; then \
396 400
 			echo  "" ; \
397 401
 			echo  "Making static module $r" ; \
398
-			if $(MAKE) -C $$r static ; then  \
402
+			if $(MAKE) -C $$r static $(mk_params) ; then  \
399 403
 				:; \
400 404
 			else \
401 405
 				exit 1; \
... ...
@@ -409,7 +413,8 @@ utils:
409 413
 		if [ -n "$$r" ]; then \
410 414
 			echo  "" ; \
411 415
 			echo  "" ; \
412
-			if  $(MAKE) -C $$r || [ ${err_fail} != 1 ] ; then \
416
+			if  $(MAKE) -C $$r $(mk_params) || [ ${err_fail} != 1 ] ; \
417
+			then \
413 418
 				:; \
414 419
 			else \
415 420
 				exit 1; \
... ...
@@ -466,7 +471,7 @@ tar:
466 471
 .PHONY: bin
467 472
 bin:
468 473
 	mkdir -p tmp/ser/usr/local
469
-	$(MAKE) install basedir=tmp/ser 
474
+	$(MAKE) install basedir=tmp/ser $(mk_params)
470 475
 	$(TAR) -C tmp/ser/ -zcf ../$(NAME)-$(RELEASE)_$(OS)_$(ARCH).tar.gz .
471 476
 	rm -rf tmp/ser
472 477
 
... ...
@@ -484,7 +489,7 @@ deb:
484 489
 sunpkg:
485 490
 	mkdir -p tmp/ser
486 491
 	mkdir -p tmp/ser_sun_pkg
487
-	$(MAKE) install basedir=tmp/ser prefix=/usr/local
492
+	$(MAKE) install basedir=tmp/ser prefix=/usr/local $(mk_params)
488 493
 	(cd pkg/solaris; \
489 494
 	pkgmk -r ../../tmp/ser/usr/local -o -d ../../tmp/ser_sun_pkg/ -v "$(RELEASE)" ;\
490 495
 	cd ../..)
... ...
@@ -501,7 +506,7 @@ modules-doc: modules.lst
501 506
 		if [ -n "$$r" ]; then \
502 507
 			echo  "" ; \
503 508
 			echo  "" ; \
504
-			$(MAKE) -C $$r/doc $(doc_format) ; \
509
+			$(MAKE) -C $$r/doc $(doc_format)  $(mk_params); \
505 510
 		fi ; \
506 511
 	done 
507 512
 
... ...
@@ -514,7 +519,8 @@ README: modules.lst
514 519
 		if [ -n "$$r" ]; then \
515 520
 			echo  "" ; \
516 521
 			echo  "" ; \
517
-			if  $(MAKE) -C $$r README || [ ${err_fail} != 1 ] ; then \
522
+			if  $(MAKE) -C $$r README $(mk_params) || \
523
+				[ ${err_fail} != 1 ] ; then \
518 524
 				:; \
519 525
 			else \
520 526
 				exit 1; \
... ...
@@ -531,7 +537,8 @@ man: modules.lst
531 537
 		if [ -n "$$r" ]; then \
532 538
 			echo  "" ; \
533 539
 			echo  "" ; \
534
-			if  $(MAKE) -C $$r man || [ ${err_fail} != 1 ] ; then \
540
+			if  $(MAKE) -C $$r man $(mk_params) || [ ${err_fail} != 1 ] ; \
541
+			then \
535 542
 				:; \
536 543
 			else \
537 544
 				exit 1; \
... ...
@@ -540,7 +547,7 @@ man: modules.lst
540 547
 	done; true
541 548
 
542 549
 .PHONY: install
543
-install: export compile_for_install=yes
550
+install: mk_params="compile_for_install=yes"
544 551
 install: install-bin install-modules install-cfg \
545 552
 	install-doc install-man install-utils install-share
546 553
 
... ...
@@ -636,7 +643,8 @@ install-modules: modules.lst $(modules_prefix)/$(modules_dir)
636 643
 		if [ -n "$$r" -a -r "$$r/Makefile" ]; then \
637 644
 			echo  "" ; \
638 645
 			echo  "" ; \
639
-			if  $(MAKE) -C $$r install || [ ${err_fail} != 1 ] ; then \
646
+			if  $(MAKE) -C $$r install $(mk_params) || \
647
+				[ ${err_fail} != 1 ] ; then \
640 648
 				:; \
641 649
 			else \
642 650
 				exit 1; \