diff --git a/genex/Makefile b/genex/Makefile index 7077e17..568cacd 100644 --- a/genex/Makefile +++ b/genex/Makefile @@ -33,9 +33,9 @@ endif .PHONY: all clean spotless -all: genex +all: genex-bin -genex: $(OBJS) +genex-bin: $(OBJS) $(CC) $(CFLAGS) -o $@ $(OBJS) $(LDLIBS) %.o: %.c @@ -52,4 +52,4 @@ clean: rm -f $(OBJS) $(OBJS:.o=.d) spotless: clean - rm -f genex + rm -f genex-bin diff --git a/genex/genex b/genex/genex new file mode 100755 index 0000000..faa45f7 --- /dev/null +++ b/genex/genex @@ -0,0 +1,3 @@ +#!/bin/sh +PATH=$PATH:. +exec genex-bin "$@" diff --git a/genex/pdf.c b/genex/pdf.c index f61609b..c8ab5b1 100644 --- a/genex/pdf.c +++ b/genex/pdf.c @@ -183,7 +183,7 @@ static void convert_comp(const struct node *node, FILE *out) make_title(out, node, i); if (!i && node->comment) print_comment(out, node->comment); - if (asprintf(&tmp, "./sym2xps '%s' '%s' %d '%s' '%s'", + if (asprintf(&tmp, "sym2xps '%s' '%s' %d '%s' '%s'", node->lib, node->names->s, i+1, "tmp", "tmp.ps") < 0) { perror("asprintf"); exit(1); diff --git a/genex/run b/genex/run index cb6a200..53a3c87 100755 --- a/genex/run +++ b/genex/run @@ -1,6 +1,6 @@ #!/bin/sh # Hack: ps2pdf is happy with the PS generate, but if we invoke gs diretctly, # isn't. Some voodoo is still missing ... -PATH=$PATH:. ./genex -p \ +./genex -p \ -L /home/qi/kicad-libs/components \ /home/qi/kicad-libs/components/EXPAND DESC >out.pdf