Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better build system #1124

Closed
khaledhosny opened this issue Apr 28, 2020 · 0 comments · Fixed by #1367
Closed

Better build system #1124

khaledhosny opened this issue Apr 28, 2020 · 0 comments · Fixed by #1367

Comments

@khaledhosny
Copy link
Collaborator

Currently there are 3 build systems for the C tools (one for each of macOS, Windows, and Linux, and there is even a second Linuix one that I think not actually used).

Adding a single source file requires editing 6 files and using XCode and Visual Studio and verifying the build on 3 platforms.

I think the C tools can benefit from using a build system that consolidates this. I think either CMake or meson might be a good idea, I have a bit of experience with meson and it can be installed from PyPI but it sometimes feels a bit immature and every once in a while a new version breaks the build.

diff --git a/c/makeotf/makeotf_lib/build/hotconv/linux/debug/Makefile b/c/makeotf/makeotf_lib/build/hotconv/linux/debug/Makefile
index 8b1b0dd3..def94e4e 100644
--- a/c/makeotf/makeotf_lib/build/hotconv/linux/debug/Makefile
+++ b/c/makeotf/makeotf_lib/build/hotconv/linux/debug/Makefile
@@ -32,12 +32,13 @@ LIB_SRCS = \
 	$(SRC_DIR)/map.c \
 	$(SRC_DIR)/otl.c \
 	$(SRC_DIR)/sfnt.c \
+	$(SRC_DIR)/STAT.c \
 	$(SRC_DIR)/featerr.c \
 	$(SRC_DIR)/featgram.c \
 	$(SRC_DIR)/featscan.c
 LIB_OBJS = hot.o BASE.o CFF_.o cmap.o fvar.o GPOS.o GSUB.o head.o hhea.o \
 	hmtx.o maxp.o MMFX.o MMSD.o name.o OS_2.o post.o vhea.o vmtx.o VORG.o \
-	anon.o map.o otl.o sfnt.o featerr.o featgram.o featscan.o
+	anon.o map.o otl.o sfnt.o STAT.o featerr.o featgram.o featscan.o
 LIB_TARGET = $(LIB_DIR)/hotconv.a
 
 # Build targets
@@ -119,6 +120,9 @@ otl.o:
 sfnt.o:
 	$(CC) $(CFLAGS) -c $(SRC_DIR)/sfnt.c -o $@
 
+STAT.o:
+	$(CC) $(CFLAGS) -c $(SRC_DIR)/STAT.c -o $@
+
 featerr.o:
 	$(CC) $(CFLAGS) -c $(SRC_DIR)/featerr.c -o $@
 
diff --git a/c/makeotf/makeotf_lib/build/hotconv/linux/gcc/debug/Makefile b/c/makeotf/makeotf_lib/build/hotconv/linux/gcc/debug/Makefile
index daae26ca..96d5fbfe 100755
--- a/c/makeotf/makeotf_lib/build/hotconv/linux/gcc/debug/Makefile
+++ b/c/makeotf/makeotf_lib/build/hotconv/linux/gcc/debug/Makefile
@@ -47,6 +47,7 @@ LIB_SRCS = \
 	$(SRCDIR)/otl.c \
 	$(SRCDIR)/post.c \
 	$(SRCDIR)/sfnt.c \
+	$(SRCDIR)/STAT.c \
 	$(SRCDIR)/vhea.c \
 	$(SRCDIR)/vmtx.c \
 	$(SRCDIR)/VORG.c
@@ -76,6 +77,7 @@ LIB_OBJS = \
 	$(OBJECT_DIR)/otl.o \
 	$(OBJECT_DIR)/post.o \
 	$(OBJECT_DIR)/sfnt.o \
+	$(OBJECT_DIR)/STAT.o \
 	$(OBJECT_DIR)/vhea.o \
 	$(OBJECT_DIR)/vmtx.o \
 	$(OBJECT_DIR)/VORG.o
@@ -157,6 +159,9 @@ post.o:
 sfnt.o:
 	$(CC) $(CFLAGS) -c $(SRC_DIR)/sfnt.c -o $@
 
+STAT.o:
+	$(CC) $(CFLAGS) -c $(SRC_DIR)/STAT.c -o $@
+
 vhea.o:
 	$(CC) $(CFLAGS) -c $(SRC_DIR)/vhea.c -o $@
 
diff --git a/c/makeotf/makeotf_lib/build/hotconv/linux/gcc/release/Makefile b/c/makeotf/makeotf_lib/build/hotconv/linux/gcc/release/Makefile
index 4ad3d007..4819bcdc 100755
--- a/c/makeotf/makeotf_lib/build/hotconv/linux/gcc/release/Makefile
+++ b/c/makeotf/makeotf_lib/build/hotconv/linux/gcc/release/Makefile
@@ -46,6 +46,7 @@ LIB_SRCS = \
 	$(SRCDIR)/otl.c \
 	$(SRCDIR)/post.c \
 	$(SRCDIR)/sfnt.c \
+	$(SRCDIR)/STAT.c \
 	$(SRCDIR)/vhea.c \
 	$(SRCDIR)/vmtx.c \
 	$(SRCDIR)/VORG.c
@@ -75,6 +76,7 @@ LIB_OBJS = \
 	$(OBJECT_DIR)/otl.o \
 	$(OBJECT_DIR)/post.o \
 	$(OBJECT_DIR)/sfnt.o \
+	$(OBJECT_DIR)/STAT.o \
 	$(OBJECT_DIR)/vhea.o \
 	$(OBJECT_DIR)/vmtx.o \
 	$(OBJECT_DIR)/VORG.o
@@ -156,6 +158,9 @@ post.o:
 sfnt.o:
 	$(CC) $(CFLAGS) -c $(SRC_DIR)/sfnt.c -o $@
 
+STAT.o:
+	$(CC) $(CFLAGS) -c $(SRC_DIR)/STAT.c -o $@
+
 vhea.o:
 	$(CC) $(CFLAGS) -c $(SRC_DIR)/vhea.c -o $@
 
diff --git a/c/makeotf/makeotf_lib/build/hotconv/linux/release/Makefile b/c/makeotf/makeotf_lib/build/hotconv/linux/release/Makefile
index a461fdcf..d459d899 100644
--- a/c/makeotf/makeotf_lib/build/hotconv/linux/release/Makefile
+++ b/c/makeotf/makeotf_lib/build/hotconv/linux/release/Makefile
@@ -32,12 +32,13 @@ LIB_SRCS = \
 	$(SRC_DIR)/map.c \
 	$(SRC_DIR)/otl.c \
 	$(SRC_DIR)/sfnt.c \
+	$(SRC_DIR)/STAT.c \
 	$(SRC_DIR)/featerr.c \
 	$(SRC_DIR)/featgram.c \
 	$(SRC_DIR)/featscan.c
 LIB_OBJS = hot.o BASE.o CFF_.o cmap.o fvar.o GPOS.o GSUB.o head.o hhea.o \
 	hmtx.o maxp.o MMFX.o MMSD.o name.o OS_2.o post.o vhea.o vmtx.o VORG.o \
-	anon.o map.o otl.o sfnt.o featerr.o featgram.o featscan.o
+	anon.o map.o otl.o sfnt.o STAT.o featerr.o featgram.o featscan.o
 LIB_TARGET = $(LIB_DIR)/hotconv.a
 
 # Build targets
@@ -119,6 +120,9 @@ otl.o:
 sfnt.o:
 	$(CC) $(CFLAGS) -c $(SRC_DIR)/sfnt.c -o $@
 
+STAT.o:
+	$(CC) $(CFLAGS) -c $(SRC_DIR)/STAT.c -o $@
+
 featerr.o:
 	$(CC) $(CFLAGS) -c $(SRC_DIR)/featerr.c -o $@
 
diff --git a/c/makeotf/makeotf_lib/build/hotconv/osx/xcode/hotconv.xcodeproj/project.pbxproj b/c/makeotf/makeotf_lib/build/hotconv/osx/xcode/hotconv.xcodeproj/project.pbxproj
index 20845ca0..924da5fe 100644
--- a/c/makeotf/makeotf_lib/build/hotconv/osx/xcode/hotconv.xcodeproj/project.pbxproj
+++ b/c/makeotf/makeotf_lib/build/hotconv/osx/xcode/hotconv.xcodeproj/project.pbxproj
@@ -7,6 +7,8 @@
 	objects = {
 
 /* Begin PBXBuildFile section */
+		29B88DDE244FA4DD006F259E /* STAT.h in Headers */ = {isa = PBXBuildFile; fileRef = 29B88DDC244FA4DC006F259E /* STAT.h */; };
+		29B88DE1244FA500006F259E /* STAT.c in Sources */ = {isa = PBXBuildFile; fileRef = 29B88DE0244FA500006F259E /* STAT.c */; };
 		BD1F638E0E26B32700A4E4C9 /* GDEF.h in Headers */ = {isa = PBXBuildFile; fileRef = BD1F638D0E26B32700A4E4C9 /* GDEF.h */; };
 		BD1F63900E26B33800A4E4C9 /* GDEF.c in Sources */ = {isa = PBXBuildFile; fileRef = BD1F638F0E26B33800A4E4C9 /* GDEF.c */; };
 		BD6159A50D2DC53300C1E0CA /* post.c in Sources */ = {isa = PBXBuildFile; fileRef = BD61598E0D2DC53300C1E0CA /* post.c */; };
@@ -76,6 +78,8 @@
 /* End PBXBuildFile section */
 
 /* Begin PBXFileReference section */
+		29B88DDC244FA4DC006F259E /* STAT.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = STAT.h; path = ../../../../source/hotconv/STAT.h; sourceTree = "<group>"; };
+		29B88DE0244FA500006F259E /* STAT.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = STAT.c; path = ../../../../source/hotconv/STAT.c; sourceTree = "<group>"; };
 		BD1F638D0E26B32700A4E4C9 /* GDEF.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GDEF.h; path = ../../../../source/hotconv/GDEF.h; sourceTree = SOURCE_ROOT; };
 		BD1F638F0E26B33800A4E4C9 /* GDEF.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = GDEF.c; path = ../../../../source/hotconv/GDEF.c; sourceTree = SOURCE_ROOT; };
 		BD61598E0D2DC53300C1E0CA /* post.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.c; fileEncoding = 4; name = post.c; path = ../../../../source/hotconv/post.c; sourceTree = SOURCE_ROOT; };
@@ -173,6 +177,7 @@
 		08FB7795FE84155DC02AAC07 /* Source */ = {
 			isa = PBXGroup;
 			children = (
+				29B88DE0244FA500006F259E /* STAT.c */,
 				BD6159BC0D2DC54200C1E0CA /* CFF_.c */,
 				BD6159BE0D2DC54200C1E0CA /* BASE.c */,
 				BD6159BF0D2DC54200C1E0CA /* anon.c */,
@@ -224,6 +229,7 @@
 		BD6159C40D2DC55D00C1E0CA /* Headers */ = {
 			isa = PBXGroup;
 			children = (
+				29B88DDC244FA4DC006F259E /* STAT.h */,
 				BD9DCE190DB540DE00192F3D /* hotconv.h */,
 				BDE662050D329ED5005FE583 /* feat.c */,
 				BD6159C50D2DC56500C1E0CA /* post.h */,
@@ -281,6 +287,7 @@
 			isa = PBXHeadersBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				29B88DDE244FA4DD006F259E /* STAT.h in Headers */,
 				BD6159E90D2DC56500C1E0CA /* post.h in Headers */,
 				BD6159EA0D2DC56500C1E0CA /* otl.h in Headers */,
 				BD6159EC0D2DC56500C1E0CA /* map.h in Headers */,
@@ -387,6 +394,7 @@
 				BD6159B00D2DC53300C1E0CA /* hmtx.c in Sources */,
 				BD6159B10D2DC53300C1E0CA /* GSUB.c in Sources */,
 				BD6159B20D2DC53300C1E0CA /* MMSD.c in Sources */,
+				29B88DE1244FA500006F259E /* STAT.c in Sources */,
 				BD6159B30D2DC53300C1E0CA /* sfnt.c in Sources */,
 				BD6159B40D2DC53300C1E0CA /* OS_2.c in Sources */,
 				BD6159B50D2DC53300C1E0CA /* name.c in Sources */,
diff --git a/c/makeotf/makeotf_lib/build/hotconv/win/visualstudio/hotconv.vcxproj b/c/makeotf/makeotf_lib/build/hotconv/win/visualstudio/hotconv.vcxproj
index 1c057170..d6112058 100644
--- a/c/makeotf/makeotf_lib/build/hotconv/win/visualstudio/hotconv.vcxproj
+++ b/c/makeotf/makeotf_lib/build/hotconv/win/visualstudio/hotconv.vcxproj
@@ -160,6 +160,7 @@
     <ClCompile Include="..\..\..\..\source\hotconv\otl.c" />
     <ClCompile Include="..\..\..\..\source\hotconv\post.c" />
     <ClCompile Include="..\..\..\..\source\hotconv\sfnt.c" />
+    <ClCompile Include="..\..\..\..\source\hotconv\STAT.c" />
     <ClCompile Include="..\..\..\..\source\hotconv\vhea.c" />
     <ClCompile Include="..\..\..\..\source\hotconv\vmtx.c" />
     <ClCompile Include="..\..\..\..\source\hotconv\VORG.c" />
@cjchapman cjchapman changed the title Better build sytem Better build system Apr 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant