You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by GitBox <gi...@apache.org> on 2021/11/04 11:37:29 UTC

[GitHub] [daffodil] stevedlawrence commented on a change in pull request #673: Raise minimum C level to ISO C11 with GNU extensions

stevedlawrence commented on a change in pull request #673:
URL: https://github.com/apache/daffodil/pull/673#discussion_r742273935



##########
File path: daffodil-runtime2/src/main/resources/org/apache/daffodil/runtime2/c/Makefile
##########
@@ -14,56 +14,56 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-# Step 0: You will need to install the Mini-XML library and xmldiff.
-# Here's how to install both packages on Ubuntu 20.04 (first-time
-# setup only):
+# Step 0: Install the Mini-XML library and xmldiff (first time setup
+# only).  Here's the command to install both packages on Ubuntu.
 
 # $ sudo apt install libmxml-dev xmldiff
 
-# Step 1: Copy your test data files here and either rename them to
-# parse.dat and unparse.xml or set PARSE_DAT and UNPARSE_XML.
-
-# $ cp ../ex_nums_parse.dat parse.dat
-# $ cp ../ex_nums_unparse_runtime2.xml unparse.xml
-
-PARSE_DAT = parse.dat
-UNPARSE_XML = unparse.xml
-
-# Step 2: Compile the C source files into an executable program which
-# can run the parse and unparse checks (e.g., .dat <-> .xml).
+# Step 1: Compile the C source files into an executable program which
+# can run the parse and unparse checks (e.g., .dat <-> .xml).  Just
+# run make with no arguments unless you want to override CC or CFLAGS.
 
 # $ make
 
 PROGRAM = ./daffodil
 HEADERS = libcli/*.h libruntime/*.h
 SOURCES = libcli/*.c libruntime/*.c
 INCLUDES = -Ilibcli -Ilibruntime
-CFLAGS = -g -Wall -Wextra -pedantic -std=gnu99
+CFLAGS = -g -Wall -Wextra -Wpedantic -std=gnu11
 LIBS = -lmxml
 
 $(PROGRAM): $(HEADERS) $(SOURCES)
 	$(CC) $(CFLAGS) $(INCLUDES) $(SOURCES) $(LIBS) -o $(PROGRAM)
 
-# Step 3: Run the executable on the test data files and check that the
-# new temp data files match the original test data files.
+# Step 2: Copy your test files here and rename them to parse.dat and
+# unparse.xml or else edit PARSE_DAT and UNPARSE_XML below.
+
+# $ cp ../ex_nums_parse.dat parse.dat
+# $ cp ../ex_nums_unparse_runtime2.xml unparse.xml
+
+PARSE_DAT = parse.dat
+UNPARSE_XML = unparse.xml

Review comment:
       Probably not worth changing, but we've found that a naming convention of `foo.ext` for the original file and `foo.ext.xml` for the infoset is sometimes useful. It makes it very clear that that the two files are related and that one is just the "xml" version of the other. In can imagine this could be potentially useful for future Makefile enhancements.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org