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 381
 		if [ -n "$$r" -a -r "$$r/Makefile" ]; then \
382 382
 			echo  "" ; \
383 383
 			echo  "" ; \
384
-			if  $(MAKE) -C $$r || [ ${err_fail} != 1 ] ; then \
384
+			if  $(MAKE) -C $$r $(mk_params) || [ ${err_fail} != 1 ] ; \
385
+			then\
385 386
 				:; \
386 387
 			else \
387 388
 				exit 1; \
... ...
@@ -395,7 +399,7 @@ $(extra_objs):
395 395
 		if [ -n "$$r" -a -r "$$r/Makefile"  ]; then \
396 396
 			echo  "" ; \
397 397
 			echo  "Making static module $r" ; \
398
-			if $(MAKE) -C $$r static ; then  \
398
+			if $(MAKE) -C $$r static $(mk_params) ; then  \
399 399
 				:; \
400 400
 			else \
401 401
 				exit 1; \
... ...
@@ -409,7 +413,8 @@ utils:
409 409
 		if [ -n "$$r" ]; then \
410 410
 			echo  "" ; \
411 411
 			echo  "" ; \
412
-			if  $(MAKE) -C $$r || [ ${err_fail} != 1 ] ; then \
412
+			if  $(MAKE) -C $$r $(mk_params) || [ ${err_fail} != 1 ] ; \
413
+			then \
413 414
 				:; \
414 415
 			else \
415 416
 				exit 1; \
... ...
@@ -466,7 +471,7 @@ tar:
466 466
 .PHONY: bin
467 467
 bin:
468 468
 	mkdir -p tmp/ser/usr/local
469
-	$(MAKE) install basedir=tmp/ser 
469
+	$(MAKE) install basedir=tmp/ser $(mk_params)
470 470
 	$(TAR) -C tmp/ser/ -zcf ../$(NAME)-$(RELEASE)_$(OS)_$(ARCH).tar.gz .
471 471
 	rm -rf tmp/ser
472 472
 
... ...
@@ -484,7 +489,7 @@ deb:
484 484
 sunpkg:
485 485
 	mkdir -p tmp/ser
486 486
 	mkdir -p tmp/ser_sun_pkg
487
-	$(MAKE) install basedir=tmp/ser prefix=/usr/local
487
+	$(MAKE) install basedir=tmp/ser prefix=/usr/local $(mk_params)
488 488
 	(cd pkg/solaris; \
489 489
 	pkgmk -r ../../tmp/ser/usr/local -o -d ../../tmp/ser_sun_pkg/ -v "$(RELEASE)" ;\
490 490
 	cd ../..)
... ...
@@ -501,7 +506,7 @@ modules-doc: modules.lst
501 501
 		if [ -n "$$r" ]; then \
502 502
 			echo  "" ; \
503 503
 			echo  "" ; \
504
-			$(MAKE) -C $$r/doc $(doc_format) ; \
504
+			$(MAKE) -C $$r/doc $(doc_format)  $(mk_params); \
505 505
 		fi ; \
506 506
 	done 
507 507
 
... ...
@@ -514,7 +519,8 @@ README: modules.lst
514 514
 		if [ -n "$$r" ]; then \
515 515
 			echo  "" ; \
516 516
 			echo  "" ; \
517
-			if  $(MAKE) -C $$r README || [ ${err_fail} != 1 ] ; then \
517
+			if  $(MAKE) -C $$r README $(mk_params) || \
518
+				[ ${err_fail} != 1 ] ; then \
518 519
 				:; \
519 520
 			else \
520 521
 				exit 1; \
... ...
@@ -531,7 +537,8 @@ man: modules.lst
531 531
 		if [ -n "$$r" ]; then \
532 532
 			echo  "" ; \
533 533
 			echo  "" ; \
534
-			if  $(MAKE) -C $$r man || [ ${err_fail} != 1 ] ; then \
534
+			if  $(MAKE) -C $$r man $(mk_params) || [ ${err_fail} != 1 ] ; \
535
+			then \
535 536
 				:; \
536 537
 			else \
537 538
 				exit 1; \
... ...
@@ -540,7 +547,7 @@ man: modules.lst
540 540
 	done; true
541 541
 
542 542
 .PHONY: install
543
-install: export compile_for_install=yes
543
+install: mk_params="compile_for_install=yes"
544 544
 install: install-bin install-modules install-cfg \
545 545
 	install-doc install-man install-utils install-share
546 546
 
... ...
@@ -636,7 +643,8 @@ install-modules: modules.lst $(modules_prefix)/$(modules_dir)
636 636
 		if [ -n "$$r" -a -r "$$r/Makefile" ]; then \
637 637
 			echo  "" ; \
638 638
 			echo  "" ; \
639
-			if  $(MAKE) -C $$r install || [ ${err_fail} != 1 ] ; then \
639
+			if  $(MAKE) -C $$r install $(mk_params) || \
640
+				[ ${err_fail} != 1 ] ; then \
640 641
 				:; \
641 642
 			else \
642 643
 				exit 1; \