Re: [dev] automating running and building

2016-01-08 Thread Teodoro Santoni
Hi, 2016-01-08 4:08 GMT+01:00, Greg Reagle : > On Thu, Jan 07, 2016 at 05:22:38PM -0800, Louis Santillan wrote: >> Do mean something like this in a makefile? Essentially adding a >> `./$@` to end of `dwm` target: > > I tried it and it does not seem to be a solution. If dwm is up to date, > Make

Re: [dev] automating running and building

2016-01-07 Thread Louis Santillan
Build & execute by simply typing `make` ``` SRC = dummy.c OBJ = $(SRC:.c=.o) EXE = dummy all: $(EXE) @./$(EXE) .c.o: $(CC) -c $(CFLAGS) $< $(EXE): $(OBJ) $(CC) -o $(EXE) $(OBJ) $(LDFLAGS) ``` On Thu, Jan 7, 2016 at 7:08 PM, Greg Reagle wrote: > On Thu, Jan 07, 2016 at

Re: [dev] automating running and building

2016-01-07 Thread Leander S. Harding
On Thu, Jan 7, 2016 at 7:23 PM, Greg Reagle wrote: > On Fri, Jan 08, 2016 at 12:53:26AM +0100, hiro wrote: >> are you asking how to compile "make program; program" into a C program? ... > But this is all very ad-hoc and takes a lot of manual intervention and it > would be nice to make it more syst

Re: [dev] automating running and building

2016-01-07 Thread Greg Reagle
On Fri, Jan 08, 2016 at 12:53:26AM +0100, hiro wrote: > are you asking how to compile "make program; program" into a C program? Hi Hiro. I don't know whether you are being serious or joking but that gives me an idea which might be a solution. Let's say that it is the cal program that I want to b

Re: [dev] automating running and building

2016-01-07 Thread Greg Reagle
On Thu, Jan 07, 2016 at 05:22:38PM -0800, Louis Santillan wrote: > Do mean something like this in a makefile? Essentially adding a > `./$@` to end of `dwm` target: I tried it and it does not seem to be a solution. If dwm is up to date, Make won't run the recipe and ./$@ won't be run. So you hav

Re: [dev] automating running and building

2016-01-07 Thread Louis Santillan
Do mean something like this in a makefile? Essentially adding a `./$@` to end of `dwm` target: ``` SRC = drw.c dwm.c util.c OBJ = ${SRC:.c=.o} all: dwm .c.o: @echo CC $< @${CC} -c ${CFLAGS} $< ${OBJ}: config.h config.mk dwm: ${OBJ} @echo CC -o $@ @${CC} -o $@ ${OBJ} ${LDFLAGS}

Re: [dev] automating running and building

2016-01-07 Thread hiro
are you asking how to compile "make program; program" into a C program? On 1/7/16, Greg Reagle wrote: > In the same spirit as my previous post about automating with entr ... > > I would love to be able to have some way for running a compiled C > program that automatically runs make on the program

[dev] automating running and building

2016-01-07 Thread Greg Reagle
In the same spirit as my previous post about automating with entr ... I would love to be able to have some way for running a compiled C program that automatically runs make on the program before actually running the program. Of course I don't want all of my programs to work this way, but when