Idea: --only-make-prerequisites
Idea: --only-make-prerequisites So $ make --only-make-prerequisites netsift would only make myconfdir/$J.pre myconfdir/$J.cf and stop before the second line of netsift:myconfdir/$J.pre myconfdir/$J.cf cat zz > yy ln q r /etc --only-make-prerequisites is for folks that want to check and get things ready first, before the President arrives for the button pushing ceremony. Sure, one could edit the Makefile, if one owns it, and put "false" on the second line, or do make -n netsift and then run most of the lines output, but a --only-make-prerequisites would be more elegant. ___ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make
Re: Idea: --only-make-prerequisites
Dan Jacobson (18 January 2019 08:49) > --only-make-prerequisites is for folks that want to check and get > things ready first, before the President arrives for the button > pushing ceremony. I can see other uses for it ;^> When I'm hacking on code, and intend to hack some more, it's sometimes nice to pause and get the compiler to tell me whether what I've done is all good. I'm not interested in a link step just yet, as I know the code is unfinished, but I want to see if what I've written compiles. (Then again, linking isn't as time-consuming as it used to be.) This can be implemented in the make-file: just have some intermediate target that depends on the prerequisites and doesn't do anything; the actual target then depends on that. To take your example, .PHONY: netsift-prereq netsift-prereq: myconfdir/$J.pre myconfdir/$J.cf netsift: netsift-prereq cat zz > yy ln q r /etc Of course, that doesn't play nicely with $< and friends, so isn't ideal; but, for that, you could just duplicate the prerequisites, .PHONY: netsift-prereq netsift-prereq: myconfdir/$J.pre myconfdir/$J.cf netsift: myconfdir/$J.pre myconfdir/$J.cf cat zz > yy ln q r /etc The command-line option would save the need to edit the make-file to be ready to be used this way, which would be welcome when the make-files aren't familiar (especially if they're auto-generated and numerous). Eddy. ___ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make
GNU Make for Java projects
Greetings, I have used GNU Make for many years on C projects. Over the last 10 or more years, I have been working mainly in Java. There are several build tools that are popular in the Java world such as Ant, Maven, and Gradle. I have found Make very easy to understand and use. Given the amount of work they do in the background, I have found build tools such as Maven and Gradle to be very confusing. They are easy and work well within a very narrow scope, but as soon as you try to go outside their typical pattern, they become inordinately complex or can't even handle some out-of-pattern situations. It is my incomplete understanding that certain aspects of Make don't lend themselves well to the building of Java projects. This is what has driven the quest for better Java fitting build tools. Being frustrated by the difficulty of going outside of the Java build tools scope, I wondered whether it might be possible to enhance certain aspects of GNU Make to better accommodate the needs of a Java environment. I also wonder if this issue had been previously raised and addressed without my knowledge. Anyway, I thought I would raise the issue and possibly spark an interesting conversation. Thank you. Blake McBride ___ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make
Re: GNU Make for Java projects
On Fri, 18 Jan 2019 05:42:44 -0600 Blake McBride wrote: > I have found Make very easy to understand and use. Given the amount of > work they do in the background, I have found build tools such as Maven > and Gradle to be very confusing. When I some years ago wrote Android apps I found eclipse too buggy to be usable. Point and click might be nice, but far too often eclipse crashed. I resorted to editing the source files in emacs and build the Android projects with gnu Make, just as I was used to with C projects. > It is my incomplete understanding that certain aspects of Make don't > lend themselves well to the building of Java projects. This is what has > driven the quest for better Java fitting build tools. Gnu Make is very simple, it uses some command to create something and does that if something else indicates that it is needed. This simplicity makes Make very useful for far more things than just compiling programs. > I wondered whether it might be possible to enhance certain > aspects of GNU Make to better accommodate the needs of a Java > environment. What kind of need would that be? The hardest thing for me migrating from eclipse to gnu Make was finding out everything that was done below the sheets by eclipse. In the end it was really just about running different commands with arguments to generate files. > Anyway, I thought I would raise the issue and possibly spark an > interesting conversation. My Android app projects are today abandoned, but if you want to study my Makefile to genereate the .apk files from Java code you can download it as described at http://halttimer.cvs.sourceforge.net/ regards Henrik ___ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make