packcc icon indicating copy to clipboard operation
packcc copied to clipboard

Addition of a build system generator

Open elfring opened this issue 6 years ago • 6 comments

I suggest to reuse a higher level build system than your current make scripts so that powerful checks for software features will become easier.

elfring avatar Nov 03 '19 10:11 elfring

Thank you for your proposal. Currently, I don't plan to use them since the source code of packcc is already portable enough. I might begin to consider using the tools when a user of a platform other than Linux, BSD, macOS, and Windows appears.

arithy avatar Nov 03 '19 22:11 arithy

elfring avatar Nov 04 '19 07:11 elfring

I want basically users to prepare their own build environment, because:

  • PackCC is a highly portable single-source program, which can be built just using a C compiler command once,
    cc -o packcc packcc.c
    
  • PackCC mostly uses standard C library functions, considering portability, and prepares alternative implementations for nonportable functions like strnlen().

Again, I have no plan to use CMake or Autotools for now because I don't feel their necessity as for PackCC.

arithy avatar Dec 15 '19 11:12 arithy

Autotools is often worse than useless, not only is it a required dependency, but can dramatically slow down the build because the configure scripts are comically slow.

My suggestion would be to perhaps delete the makefiles entirely.

andrewchambers avatar Oct 04 '21 07:10 andrewchambers

@elfring, I'm going to close this issue because it seems that most people don't feel this issue is an issue. If you have any objection against closing this issue, let me know by the end of this month (Aug. 2022).

arithy avatar Aug 09 '22 22:08 arithy

:thought_balloon: I hope that interests can grow also for applications of build system generators.

elfring avatar Aug 10 '22 08:08 elfring

It might be just your impression, and isn't persuasive.

arithy avatar Aug 14 '22 01:08 arithy

@arithy How about adding a FAQ entry to README.md?

e.g.

diff --git a/README.md b/README.md
index 7510d17..e4a4e9e 100644
--- a/README.md
+++ b/README.md
@@ -705,3 +705,15 @@ int main() {
 You can find the more practical example in the directory [`examples/ast-tinyc`](examples/ast-tinyc).
 It builds an AST (abstract syntax tree) from an input source file
 written in [Tiny-C](http://www.iro.umontreal.ca/~felipe/IFT2030-Automne2002/Complements/tinyc.c) and dump the AST.
+
+## FAQ ##
+
+<dl>
+	<dt>Will you support another build system than other Make?</dt>
+	<dd>No. I have no plan to use CMake or Autotools for now because I don't feel their necessity as for PackCC.</dd>
+	<dt>Which language is assumed for building packcc command?</dt>
+	<dd>C language. C++ is not assumed for building packcc command.</dd>
+	<dt>Which language is assumed for compiling the source code generated by packcc?</dt>
+	<dd>C language. C++ language is not assumed for compiling the source code generated by packcc.
+		However, you can link the object code compiled from the source code to your C++ code.</dd>
+</dl>

masatake avatar Aug 14 '22 04:08 masatake

@masatake, it's a good idea. Thank you for the suggestion. I'll add the FAQs.

arithy avatar Aug 14 '22 08:08 arithy

I have no plan to use CMake or Autotools for now because I don't feel their necessity as for PackCC.

:crystal_ball: Under which circumstances will software users feel the need for increasing applications of known functionality?

elfring avatar Aug 14 '22 09:08 elfring

I stated https://github.com/arithy/packcc/issues/3#issuecomment-565802937 as the reason why I don't feel their necessity. The discussion will become an infinite loop. I have decided to close this issue.

arithy avatar Aug 14 '22 09:08 arithy