5 LIBRARYFILENAME= @LIBRARYFILENAME@
7 pcblibdir= $(PCBLIBDIR)
8 pcblib_SCRIPTS= ${LIBSCRIPTS}
10 CreateLibraryContents.sh \
12 ListLibraryContents.sh \
16 dist_noinst_SCRIPTS= \
19 pcblib_DATA= ${LIBCONTENTS} ${DAT_FILES}
23 ${LIBRARYFILENAME}.contents
26 # ######################################################
28 # Process the entire m4lib library and create a newlib
32 NEWLIB=${LIBRARYFILENAME}-newlib
34 all-local: $(NEWLIB).stamp
36 # if we have compiled in PNG export capability then
37 # generate previews of all the footprints. This has
38 # the added benefit of doing a PCB syntax check on all of them
41 PREVIEW_MSG= png-preview=yes
44 PREVIEW_MSG= png-preview=no
47 if BUILD_PCBLIB_NEWLIB
48 NEWLIB_DEPS= ${LIBCONTENTS} ${srcdir}/m4lib_to_newlib.sh
53 ${NEWLIB}.stamp : footprint.pcb ${NEWLIB_DEPS}
55 ${SHELL} ${srcdir}/m4lib_to_newlib.sh --contents \
56 ${LIBRARYFILENAME}.contents --output ${NEWLIB} \
57 ${PREVIEW} --pcb "${PCB}" --awk "${AWK}"
58 echo '${PREVIEW_MSG}' > $@
60 # Remove any rebuilt footprints
61 if BUILD_PCBLIB_NEWLIB
66 install-data-local: ${NEWLIB}.stamp
67 if test -d ${NEWLIB} ; then \
68 tar cf - ${NEWLIB} | (cd $(DESTDIR)$(PCBLIBDIR) && tar -xf -) ; \
70 cd $(srcdir) && tar -cf - ${NEWLIB} | (cd $(DESTDIR)$(PCBLIBDIR) && tar -xf -) ; \
74 chmod -R a+w $(DESTDIR)$(PCBLIBDIR)/${NEWLIB}
75 rm -fr $(DESTDIR)$(PCBLIBDIR)/${NEWLIB}
77 EXTRA_DIST= ${NEWLIB} footprint.pcb ${NEWLIB}.stamp png_diff.sh
79 if BUILD_PCBLIB_NEWLIB
80 DISTCLEANFILES= ${NEWLIB}.stamp
87 # ######################################################
89 pcblibm4dir= $(PCBLIBDIR)/m4
90 pcblibm4_DATA= $(LIB_FILES)
92 ##pcblibm4_SCRIPTS= update-pcb
93 ## XXX what was this about?
94 ##(cd $(pcblibm4dir) && sh ./update-pcb)
96 # note: only some of the scripts listed in LIBSCRIPTS are generated by autoconf
97 # and hence need chmod-ing. The others (ListLIbraryContents.sh in particular)
98 # is just one of the distribution files and thus will not exist in the build
99 # directory if the build is not done in the source directory
101 for f in ${LIBSCRIPTS} ${noinst_SCRIPTS}; do if test -f $$f ; then chmod 755 $$f ; fi ; done
103 COMMON_FILE= common.m4
122 texas_inst_amplifier.m4 \
123 texas_inst_voltage_reg.m4 \
126 # These files are for old footprint libraries and will be
127 # removed in future releases
128 OBSOLETE_LIST_DIST_FILES= \
135 resistor_0.25W.list \
136 resistor_adjust.list \
137 resistor_array.list \
138 texas_inst_amplifier.list \
139 texas_inst_voltage_reg.list \
173 resistor_adjust.inc \
182 M4_FILES= ${M4_DIST_FILES} amp.m4 bourns.m4 candk.m4 cts.m4 geda.m4 johnstech.m4 minicircuits.m4 nichicon.m4 optek.m4 panasonic.m4
183 LIST_FILES= ${LIST_DIST_FILES} amp.list bourns.list candk.list cts.list geda.list johnstech.list minicircuits.list nichicon.list \
184 optek.list panasonic.list
186 LIB_FILES= ${COMMON_FILE} ${M4_FILES} ${LIST_FILES} ${INC_FILES}
188 EXTRA_DIST+= ListLibraryContents.sh ${COMMON_FILE} ${M4_DIST_FILES} ${OBSOLETE_LIST_DIST_FILES} \
189 ${LIST_DIST_FILES} ${INC_FILES} \
191 ${DAT_FILES} gen_list.awk gen_m4.awk gen_geda_m4.awk gen_geda_list.awk
193 DISTCLEANFILES+= ${LIBRARYFILENAME} ${LIBRARYFILENAME}.contents amp.m4 amp.list \
194 cts.m4 cts.list bourns.m4 bourns.list \
195 candk.m4 candk.list \
196 geda.m4 geda.list johnstech.m4 johnstech.list minicircuits.m4 minicircuits.list \
197 nichicon.m4 nichicon.list \
198 optek.m4 optek.list \
199 panasonic.m4 panasonic.list
201 ${LIBRARYFILENAME}: ${COMMON_FILE} ${INC_FILES} ${DAT_FILES} ${M4_FILES} CreateLibrary.sh
202 ${SHELL} ./CreateLibrary.sh -I $(srcdir) $@ $(srcdir)/${COMMON_FILE} ${M4_FILES}
204 ${LIBRARYFILENAME}.contents: ${COMMON_FILE} ${INC_FILES} ${DAT_FILES} ${LIST_FILES} CreateLibraryContents.sh
205 ${SHELL} ./CreateLibraryContents.sh -I $(srcdir) $(srcdir)/${COMMON_FILE} ${LIST_FILES} > $@
207 amp.list: amp.inc gen_list.awk
208 ${AWK} -f $(srcdir)/gen_list.awk name=amp $(srcdir)/amp.inc > $@
210 amp.m4: amp.inc gen_m4.awk
211 ${AWK} -f $(srcdir)/gen_m4.awk name=amp $(srcdir)/amp.inc > $@
213 bourns.list: bourns.inc gen_list.awk
214 ${AWK} -f $(srcdir)/gen_list.awk name=bourns $(srcdir)/bourns.inc > $@
216 bourns.m4: bourns.inc gen_m4.awk
217 ${AWK} -f $(srcdir)/gen_m4.awk name=bourns $(srcdir)/bourns.inc > $@
219 candk.list: candk.inc gen_list.awk
220 ${AWK} -f $(srcdir)/gen_list.awk name=candk $(srcdir)/candk.inc > $@
222 candk.m4: candk.inc gen_m4.awk
223 ${AWK} -f $(srcdir)/gen_m4.awk name=candk $(srcdir)/candk.inc > $@
225 cts.list: cts.inc gen_list.awk
226 ${AWK} -f $(srcdir)/gen_list.awk name=cts $(srcdir)/cts.inc > $@
228 cts.m4: cts.inc gen_m4.awk
229 ${AWK} -f $(srcdir)/gen_m4.awk name=cts $(srcdir)/cts.inc > $@
231 johnstech.list: johnstech.inc gen_list.awk
232 ${AWK} -f $(srcdir)/gen_list.awk name=johnstech $(srcdir)/johnstech.inc > $@
234 johnstech.m4: johnstech.inc gen_m4.awk
235 ${AWK} -f $(srcdir)/gen_m4.awk name=johnstech $(srcdir)/johnstech.inc > $@
237 minicircuits.list: minicircuits.inc gen_list.awk
238 ${AWK} -f $(srcdir)/gen_list.awk name=minicircuits $(srcdir)/minicircuits.inc > $@
240 minicircuits.m4: minicircuits.inc gen_m4.awk
241 ${AWK} -f $(srcdir)/gen_m4.awk name=minicircuits $(srcdir)/minicircuits.inc > $@
243 nichicon.list: nichicon.inc gen_list.awk
244 ${AWK} -f $(srcdir)/gen_list.awk name=nichicon $(srcdir)/nichicon.inc > $@
246 nichicon.m4: nichicon.inc gen_m4.awk
247 ${AWK} -f $(srcdir)/gen_m4.awk name=nichicon $(srcdir)/nichicon.inc > $@
249 optek.list: optek.inc gen_list.awk
250 ${AWK} -f $(srcdir)/gen_list.awk name=optek $(srcdir)/optek.inc > $@
252 optek.m4: optek.inc gen_m4.awk
253 ${AWK} -f $(srcdir)/gen_m4.awk name=optek $(srcdir)/optek.inc > $@
255 panasonic.list: panasonic.inc gen_list.awk
256 ${AWK} -f $(srcdir)/gen_list.awk name=panasonic $(srcdir)/panasonic.inc > $@
258 panasonic.m4: panasonic.inc gen_m4.awk
259 ${AWK} -f $(srcdir)/gen_m4.awk name=panasonic $(srcdir)/panasonic.inc > $@
261 geda.m4: geda.inc gen_geda_m4.awk
262 ${AWK} -f $(srcdir)/gen_geda_m4.awk $(srcdir)/geda.inc > $@
264 geda.list: geda.inc gen_geda_list.awk
265 ${AWK} -f $(srcdir)/gen_geda_list.awk $(srcdir)/geda.inc > $@