buildsys  Check-in [74c1a6b3ab]

Overview
Comment:Make sure we never end up with "for i in ;"

DJGPP's bash.exe bails out on this.

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 74c1a6b3abda78241c8e22c1778c3072a1e1d50f467b8971795c10f273e239b5
User & Date: js on 2017-01-16 02:53:23
Other Links: manifest | tags
Context
2017-04-17
23:50
Only use OBJCXXFLAGS and CPPFLAGS with OBJCXX check-in: b673b99afc user: js tags: trunk
2017-01-16
02:53
Make sure we never end up with "for i in ;" check-in: 74c1a6b3ab user: js tags: trunk
2017-01-07
23:07
Always use -Wl,--export-all-symbols for libs check-in: ce59f77400 user: js tags: trunk
Changes

Modified buildsys.mk.in from [8dcaec3a9f] to [f487541287].

1
2


3
4
5
6
7
8
9
1

2
3
4
5
6
7
8
9
10

-
+
+







#
#  Copyright (c) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016
#  Copyright (c) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016,
#  2017
#  Jonathan Schleifer <js@heap.zone>
#
#  https://heap.zone/git/?p=buildsys.git
#
#  Permission to use, copy, modify, and/or distribute this software for any
#  purpose with or without fee is hereby granted, provided that the above
#  copyright notice and this permission notice is present in all copies.
132
133
134
135
136
137
138
139

140


141
142
143
144
145
146
147
133
134
135
136
137
138
139

140
141
142
143
144
145
146
147
148
149
150







-
+

+
+







		${DIR_LEAVE}; \
	done

depend: pre-depend ${SRCS}
	regen=0; \
	deps=""; \
	test -f .deps || regen=1; \
	for i in ${SRCS}; do \
	for i in "" ${SRCS}; do \
		case $$i in \
			"") \
				;; \
			*.c) \
				if test x"${CC_DEPENDS}" = x"yes"; then \
					test $$i -nt .deps && regen=1; \
					deps="$$deps $$i.dep"; \
				fi; \
				;; \
			*.cc | *.cxx) \
617
618
619
620
621
622
623
624


625
626
627
628
629
630


631
632
633
634
635
636
637
638
639


640
641
642
643
644
645
646
647
648


649
650
651
652
653
654
655
656
657


658
659
660
661
662
663
664
665
666


667
668
669
670
671
672
673
674
675


676
677
678
679
680
681
682
683
684


685
686
687
688
689
690
691
692
693


694
695
696
697
698
699
700
701
702
703
704
705


706
707
708
709
710
711


712
713
714
715
716
717
718
719
720
721


722
723
724
725
726
727
728
729
730
731


732
733
734
735
736
737
738
739
740
741
742


743
744
745
746
747
748
749
750
751
752
753
754


755
756
757
758
759
760
761
762
763
764


765
766
767
768
769
770
771
772
773
774
775


776
777
778
779
780
781
782
783
784
785


786
787
788
789
790
791
792
793
794
795
796
797
798


799
800
801
802
803
804


805
806
807
808
809
810
811
812
813
814
815


816
817
818
819
820
821


822
823
824
825
826
827
828
829
830
831
832


833
834
835
836
837
838
839
620
621
622
623
624
625
626

627
628
629
630
631
632
633

634
635
636
637
638
639
640
641
642
643

644
645
646
647
648
649
650
651
652
653

654
655
656
657
658
659
660
661
662
663

664
665
666
667
668
669
670
671
672
673

674
675
676
677
678
679
680
681
682
683

684
685
686
687
688
689
690
691
692
693

694
695
696
697
698
699
700
701
702
703

704
705
706
707
708
709
710
711
712
713
714
715
716

717
718
719
720
721
722
723

724
725
726
727
728
729
730
731
732
733
734

735
736
737
738
739
740
741
742
743
744
745

746
747
748
749
750
751
752
753
754
755
756
757

758
759
760
761
762
763
764
765
766
767
768
769
770

771
772
773
774
775
776
777
778
779
780
781

782
783
784
785
786
787
788
789
790
791
792
793

794
795
796
797
798
799
800
801
802
803
804

805
806
807
808
809
810
811
812
813
814
815
816
817
818

819
820
821
822
823
824
825

826
827
828
829
830
831
832
833
834
835
836
837

838
839
840
841
842
843
844

845
846
847
848
849
850
851
852
853
854
855
856

857
858
859
860
861
862
863
864
865







-
+
+





-
+
+








-
+
+








-
+
+








-
+
+








-
+
+








-
+
+








-
+
+








-
+
+











-
+
+





-
+
+









-
+
+









-
+
+










-
+
+











-
+
+









-
+
+










-
+
+









-
+
+












-
+
+





-
+
+










-
+
+





-
+
+










-
+
+







	if ${CC} ${PLUGIN_CFLAGS} ${CFLAGS} ${CPPFLAGS} ${CFLAGS_$@} -x c -c -o $@ $<; then \
		${COMPILE_PLUGIN_OK}; \
	else \
		${COMPILE_PLUGIN_FAILED}; \
	fi

install: all install-extra
	for i in ${SUBDIRS} ${SUBDIRS_AFTER}; do \
	for i in "" ${SUBDIRS} ${SUBDIRS_AFTER}; do \
		test x"$$i" = x"" && continue; \
		${DIR_ENTER}; \
		${MAKE} install || exit $$?; \
		${DIR_LEAVE}; \
	done

	for i in ${SHARED_LIB}; do \
	for i in "" ${SHARED_LIB}; do \
		test x"$$i" = x"" && continue; \
		${INSTALL_STATUS}; \
		if ${MKDIR_P} ${DESTDIR}${libdir} ${INSTALL_LIB}; then \
			${INSTALL_OK}; \
		else \
			${INSTALL_FAILED}; \
		fi \
	done

	for i in ${STATIC_LIB} ${STATIC_PIC_LIB}; do \
	for i in "" ${STATIC_LIB} ${STATIC_PIC_LIB}; do \
		test x"$$i" = x"" && continue; \
		${INSTALL_STATUS}; \
		if ${MKDIR_P} ${DESTDIR}${libdir} && ${INSTALL} -m 644 $$i ${DESTDIR}${libdir}/$$i; then \
			${INSTALL_OK}; \
		else \
			${INSTALL_FAILED}; \
		fi \
	done

	for i in ${PLUGIN}; do \
	for i in "" ${PLUGIN}; do \
		test x"$$i" = x"" && continue; \
		${INSTALL_STATUS}; \
		if ${MKDIR_P} ${DESTDIR}${plugindir} && ${INSTALL} -m 755 $$i ${DESTDIR}${plugindir}/$$i; then \
			${INSTALL_OK}; \
		else \
			${INSTALL_FAILED}; \
		fi \
	done

	for i in ${DATA}; do \
	for i in "" ${DATA}; do \
		test x"$$i" = x"" && continue; \
		${INSTALL_STATUS}; \
		if ${MKDIR_P} $$(dirname ${DESTDIR}${datadir}/${PACKAGE_NAME}/$$i) && ${INSTALL} -m 644 $$i ${DESTDIR}${datadir}/${PACKAGE_NAME}/$$i; then \
			${INSTALL_OK}; \
		else \
			${INSTALL_FAILED}; \
		fi \
	done

	for i in ${PROG}; do \
	for i in "" ${PROG}; do \
		test x"$$i" = x"" && continue; \
		${INSTALL_STATUS}; \
		if ${MKDIR_P} ${DESTDIR}${bindir} && ${INSTALL} -m 755 $$i ${DESTDIR}${bindir}/$$i; then \
			${INSTALL_OK}; \
		else \
			${INSTALL_FAILED}; \
		fi \
	done

	for i in ${INCLUDES}; do \
	for i in "" ${INCLUDES}; do \
		test x"$$i" = x"" && continue; \
		${INSTALL_STATUS}; \
		if ${MKDIR_P} ${DESTDIR}${includedir}/${includesubdir} && ${INSTALL} -m 644 $$i ${DESTDIR}${includedir}/${includesubdir}/$$i; then \
			${INSTALL_OK}; \
		else \
			${INSTALL_FAILED}; \
		fi \
	done

	for i in ${MO_FILES}; do \
	for i in "" ${MO_FILES}; do \
		test x"$$i" = x"" && continue; \
		${INSTALL_STATUS}; \
		if ${MKDIR_P} ${DESTDIR}${localedir}/$${i%.mo}/LC_MESSAGES && ${INSTALL} -m 644 $$i ${DESTDIR}${localedir}/$${i%.mo}/LC_MESSAGES/${localename}.mo; then \
			${INSTALL_OK}; \
		else \
			${INSTALL_FAILED}; \
		fi \
	done

	for i in ${MAN}; do \
	for i in "" ${MAN}; do \
		test x"$$i" = x"" && continue; \
		${INSTALL_STATUS}; \
		if ${MKDIR_P} ${DESTDIR}${mandir}/${mansubdir} && ${INSTALL} -m 644 $$i ${DESTDIR}${mandir}/${mansubdir}/$$i; then \
			${INSTALL_OK}; \
		else \
			${INSTALL_FAILED}; \
		fi \
	done

install-extra:

uninstall: uninstall-extra
	for i in ${SUBDIRS} ${SUBDIRS_AFTER}; do \
	for i in "" ${SUBDIRS} ${SUBDIRS_AFTER}; do \
		test x"$$i" = x"" && continue; \
		${DIR_ENTER}; \
		${MAKE} uninstall || exit $$?; \
		${DIR_LEAVE}; \
	done

	for i in ${SHARED_LIB}; do \
	for i in "" ${SHARED_LIB}; do \
		test x"$$i" = x"" && continue; \
		if test -f ${DESTDIR}${libdir}/$$i; then \
			if : ${UNINSTALL_LIB}; then \
				${DELETE_OK}; \
			else \
				${DELETE_FAILED}; \
			fi \
		fi; \
	done

	for i in ${STATIC_LIB} ${STATIC_PIC_LIB}; do \
	for i in "" ${STATIC_LIB} ${STATIC_PIC_LIB}; do \
		test x"$$i" = x"" && continue; \
		if test -f ${DESTDIR}${libdir}/$$i; then \
			if rm -f ${DESTDIR}${libdir}/$$i; then \
				${DELETE_OK}; \
			else \
				${DELETE_FAILED}; \
			fi \
		fi \
	done

	for i in ${PLUGIN}; do \
	for i in "" ${PLUGIN}; do \
		test x"$$i" = x"" && continue; \
		if test -f ${DESTDIR}${plugindir}/$$i; then \
			if rm -f ${DESTDIR}${plugindir}/$$i; then \
				${DELETE_OK}; \
			else \
				${DELETE_FAILED}; \
			fi \
		fi \
	done
	-rmdir ${DESTDIR}${plugindir} >/dev/null 2>&1

	for i in ${DATA}; do \
	for i in "" ${DATA}; do \
		test x"$$i" = x"" && continue; \
		if test -f ${DESTDIR}${datadir}/${PACKAGE_NAME}/$$i; then \
			if rm -f ${DESTDIR}${datadir}/${PACKAGE_NAME}/$$i; then \
				${DELETE_OK}; \
			else \
				${DELETE_FAILED}; \
			fi \
		fi; \
		rmdir "$$(dirname ${DESTDIR}${datadir}/${PACKAGE_NAME}/$$i)" >/dev/null 2>&1 || true; \
	done
	-rmdir ${DESTDIR}${datadir}/${PACKAGE_NAME} >/dev/null 2>&1

	for i in ${PROG}; do \
	for i in "" ${PROG}; do \
		test x"$$i" = x"" && continue; \
		if test -f ${DESTDIR}${bindir}/$$i; then \
			if rm -f ${DESTDIR}${bindir}/$$i; then \
				${DELETE_OK}; \
			else \
				${DELETE_FAILED}; \
			fi \
		fi \
	done

	for i in ${INCLUDES}; do \
	for i in "" ${INCLUDES}; do \
		test x"$$i" = x"" && continue; \
		if test -f ${DESTDIR}${includedir}/${includesubdir}/$$i; then \
			if rm -f ${DESTDIR}${includedir}/${includesubdir}/$$i; then \
				${DELETE_OK}; \
			else \
				${DELETE_FAILED}; \
			fi \
		fi \
	done
	-rmdir ${DESTDIR}${includedir}/${includesubdir} >/dev/null 2>&1

	for i in ${MO_FILES}; do \
	for i in "" ${MO_FILES}; do \
		test x"$$i" = x"" && continue; \
		if test -f ${DESTDIR}${localedir}/$${i%.mo}/LC_MESSAGES/${localename}.mo; then \
			if rm -f ${DESTDIR}${localedir}/$${i%.mo}/LC_MESSAGES/${localename}.mo; then \
				${DELETE_OK}; \
			else \
				${DELETE_FAILED}; \
			fi \
		fi \
	done

	for i in ${MAN}; do \
	for i in "" ${MAN}; do \
		test x"$$i" = x"" && continue; \
		if test -f ${DESTDIR}${mandir}/${mansubdir}/$$i; then \
			if rm -f ${DESTDIR}${mandir}/${mansubdir}/$$i; then \
				${DELETE_OK}; \
			else \
				${DELETE_FAILED}; \
			fi \
		fi \
	done

uninstall-extra:

clean:
	for i in ${SUBDIRS} ${SUBDIRS_AFTER}; do \
	for i in "" ${SUBDIRS} ${SUBDIRS_AFTER}; do \
		test x"$$i" = x"" && continue; \
		${DIR_ENTER}; \
		${MAKE} clean || exit $$?; \
		${DIR_LEAVE}; \
	done

	for i in ${DEPS} ${OBJS} ${OBJS_EXTRA} ${LIB_OBJS} ${LIB_OBJS_EXTRA} ${PLUGIN_OBJS} ${PROG} ${PROG_NOINST} ${SHARED_LIB} ${SHARED_LIB_NOINST} ${STATIC_LIB} ${STATIC_LIB_NOINST} ${STATIC_PIC_LIB} ${STATIC_PIC_LIB_NOINST} ${PLUGIN} ${PLUGIN_NOINST} ${CLEAN_LIB} ${MO_FILES} ${CLEAN}; do \
	for i in "" ${DEPS} ${OBJS} ${OBJS_EXTRA} ${LIB_OBJS} ${LIB_OBJS_EXTRA} ${PLUGIN_OBJS} ${PROG} ${PROG_NOINST} ${SHARED_LIB} ${SHARED_LIB_NOINST} ${STATIC_LIB} ${STATIC_LIB_NOINST} ${STATIC_PIC_LIB} ${STATIC_PIC_LIB_NOINST} ${PLUGIN} ${PLUGIN_NOINST} ${CLEAN_LIB} ${MO_FILES} ${CLEAN}; do \
		test x"$$i" = x"" && continue; \
		if test -f $$i -o -d $$i; then \
			if rm -fr $$i; then \
				${DELETE_OK}; \
			else \
				${DELETE_FAILED}; \
			fi \
		fi \
	done

distclean: clean
	for i in ${SUBDIRS} ${SUBDIRS_AFTER}; do \
	for i in "" ${SUBDIRS} ${SUBDIRS_AFTER}; do \
		test x"$$i" = x"" && continue; \
		${DIR_ENTER}; \
		${MAKE} distclean || exit $$?; \
		${DIR_LEAVE}; \
	done

	for i in ${DISTCLEAN} .deps *~; do \
	for i in "" ${DISTCLEAN} .deps *~; do \
		test x"$$i" = x"" && continue; \
		if test -f $$i -o -d $$i; then \
			if rm -fr $$i; then \
				${DELETE_OK}; \
			else \
				${DELETE_FAILED}; \
			fi \
		fi \
	done

print-hierarchy:
	for i in ${SUBDIRS} ${SUBDIRS_AFTER}; do \
	for i in "" ${SUBDIRS} ${SUBDIRS_AFTER}; do \
		test x"$$i" = x"" && continue; \
		echo ${PRINT_HIERARCHY_PREFIX}$$i; \
		cd $$i || exit $$?; \
		${MAKE} PRINT_HIERARCHY_PREFIX=$$i/ print-hierarchy || exit $$?; \
		cd .. || exit $$?; \
	done

print-var: