Diff

Differences From Artifact [bee1193267]:

To Artifact [a8fe70a2c7]:


    20     20   TCLCONFIG_SH_PATH = $(shell echo 'puts [::tcl::pkgconfig get libdir,install]' | tclsh)/tclConfig.sh
    21     21   endif
    22     22   TCL_CFLAGS = $(shell . $(TCLCONFIG_SH_PATH); echo "$${TCL_INCLUDE_SPEC}")
    23     23   TCL_LIBS = $(shell . $(TCLCONFIG_SH_PATH); echo "$${TCL_LIB_SPEC}")
    24     24   
    25     25   all: appfsd
    26     26   
    27         -appfsd: appfsd.o
    28         -	$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o appfsd appfsd.o $(LIBS)
           27  +appfsd: appfsd.o sha1.o
           28  +	$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o appfsd appfsd.o sha1.o $(LIBS)
    29     29   
    30     30   appfsd.o: appfsd.c appfsd.tcl.h
    31     31   	$(CC) $(CPPFLAGS) $(CFLAGS) -o appfsd.o -c appfsd.c
    32     32   
    33         -appfsd.tcl.h: appfsd.tcl sha1.tcl
    34         -	sed '/@@SHA1\.TCL@@/ r sha1.tcl' appfsd.tcl | sed '/@@SHA1\.TCL@@/ d' | sed 's@[\\"]@\\&@g;s@^@   "@;s@$$@\\n"@' > appfsd.tcl.h.new
    35         -	mv appfsd.tcl.h.new appfsd.tcl.h
           33  +sha1.o: sha1.c sha1.tcl.h
           34  +	$(CC) $(CPPFLAGS) $(CFLAGS) -o sha1.o -c sha1.c
           35  +
           36  +%.tcl.h: %.tcl
           37  +	sed 's@[\\"]@\\&@g;s@^@   "@;s@$$@\\n"@' $^ > $@.new
           38  +	mv $@.new $@
    36     39   
    37     40   install: appfsd
    38     41   	if [ ! -d '$(DESTDIR)$(sbindir)' ]; then mkdir -p '$(DESTDIR)$(sbindir)'; chmod 755 '$(DESTDIR)$(sbindir)'; fi
    39     42   	cp appfsd '$(DESTDIR)$(sbindir)/'
    40     43   
    41     44   clean:
    42     45   	rm -f appfsd appfsd.o
    43     46   	rm -f appfsd.tcl.h
           47  +	rm -f sha1.o sha1.tcl.h
    44     48   
    45     49   distclean: clean
    46     50   
    47     51   .PHONY: all test clean distclean install