Re: [dev] automating running and building

From: Louis Santillan <lpsantil_AT_gmail.com>
Date: Thu, 7 Jan 2016 17:22:38 -0800

Do mean something like this in a makefile? Essentially adding a
`./$_AT_` to end of `dwm` target:

```
SRC = drw.c dwm.c util.c
OBJ = ${SRC:.c=.o}

all: dwm

.c.o:
   _AT_echo CC $<
   _AT_${CC} -c ${CFLAGS} $<

${OBJ}: config.h config.mk


dwm: ${OBJ}
   _AT_echo CC -o $@
   _AT_${CC} -o $@ ${OBJ} ${LDFLAGS}
   ./$_AT_
```

On Thu, Jan 7, 2016 at 3:53 PM, hiro <23hiro_AT_gmail.com> wrote:
> are you asking how to compile "make program; program" into a C program?
>
> On 1/7/16, Greg Reagle <greg.reagle_AT_umbc.edu> 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 before actually
>> running the program.
>>
>> Of course I don't want all of my programs to work this way, but when I
>> am working on a program's source code, it would save a lot of time and
>> keystrokes.
>>
>> I know that I could use the compound command "make program; program" and
>> that is not a bad solution as far as it goes, except that if I am using
>> other programs that run/exec/fork program, then they fail to do the make
>> which I want to be automatic.
>>
>>
>
Received on Fri Jan 08 2016 - 02:22:38 CET

This archive was generated by hypermail 2.3.0 : Fri Jan 08 2016 - 02:24:10 CET